Show HN: Looptap – A minimal game to waste your time
101–110 of 183 posts
Re: Show HN: Looptap – A minimal game to waste your time
#102One of my favorite things to do with these neat little games is to build something that plays them for me by just pasting stuff into the browser JS console. https://pastebin.com/aTYuaNVS At a score of 1,619 the ball is moving so fast it no longer works! I switched to a new tab (hoping that the event loop would be sent to the background/context switch/whatever) and ta-da - it misclicked. High score of 1,637.
loopTapApp.startPlay();
setInterval(() => {
if(loopTapApp.getBallAngle() > loopTapApp.arc[0] && loopTapApp.getBallAngle() {}, stopPropagation: ()=>{}});
}
}, 50);Re: Show HN: Looptap – A minimal game to waste your time
#103Simple addictive games like this always remind me of that ball-in-a-cup game that everyone got addicted to in that "The Game" episode of "Star Trek: The Next Generation".
Re: Show HN: Looptap – A minimal game to waste your time
#104Safari, iOS (whatever the latest update is)
Re: Show HN: Looptap – A minimal game to waste your time
#105Re: Show HN: Looptap – A minimal game to waste your time
#106Re: Show HN: Looptap – A minimal game to waste your time
#107Re: Show HN: Looptap – A minimal game to waste your time
#108Earlier quoted context omitted.
You beat me to it, haha, This is what I just did: function intersectRect(rectA, rectB) { return !( rectB.left >= rectA.right || rectB.right = rectA.bottom || rectB.bottom const arc = document.getElementById("arc"); const ball = document.getElementById("ball"); setInterval(() => { if (intersectRect(arc.getBoundingClientRect(), ball.getBoundingClientRect())) { window.dispatchEvent(new KeyboardEvent('keypress', { keyCod…
Oh neat! You did the Harder version and didn't use the game's own code to check it. I find that with JS games it's better to imitate the game's exact logic and call it's functions to make sure the state is working/updates correctly. Of course, for how delightfully simple this one is, your approach is definitely faster/better!
Just adding this information for the ones who don't know and like to know more about browser performance :)
Re: Show HN: Looptap – A minimal game to waste your time
#109It'd be more fun if you somehow got "bonus points" for reducing the time between clicks. I kept playing it safe trying to time the ball but it kind of felt like cheating!
This is in the event handler for the tap: this.score = this.score + (tapInterval
Also I should have lead my original comment with kudos to the maker, didn’t mean to only leave (apparently inaccurate) critical feedback!
Re: Show HN: Looptap – A minimal game to waste your time
#110One thing that you could improve is add user-select:none to the page. Quickly tapping the document did select the counter text and opened a google mini popup, distracting from the game.
Well done!