Live data from Hacker News

Show HN: Looptap – A minimal game to waste your time

looptap.vasanthv.com

151–160 of 183 posts

Re: Show HN: Looptap – A minimal game to waste your time

#151
Fantastic!

I feel really superior when I succeed in clicking immediately after the previous click. I clicked on the target arc and was relieved. But I immediately realize the next arc is right there, or I'm even on the arc now! Then adrenaline kicks in, and I click again immediately! Don't think, feel! And it continues because I haven't missed it.

Like I was a top F1 driver...

Re: Show HN: Looptap – A minimal game to waste your time

#153

Earlier quoted context omitted.

Well, I don’t need to download an iOS app to play OP’s game.

you don't need to download anything, the game is playable on that page click and test by yourself: https://coogyloop.com/

I see, it only has that demo on desktop.

On mobile, it just presents a link to the app store.

Re: Show HN: Looptap – A minimal game to waste your time

#154
post #119
post #42

One 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.

Thank you! I didn't peek and ended up with the same solution as you, so for an extra bit of fun I tried to golf it to be as short as possible. There's probably room for much improvement: (94 chars) setInterval("l=loopTapApp;b=l.getBallAngle();a=l.arc;b+6>a[0]&b-6<a[1]&&l.tap(new Event(1))")

Nice! Managed to shave off a couple of bytes:

  setInterval("l=loopTapApp;b=l.getBallAngle();[a,c]=l.arc;b+6>a&b-6

Re: Show HN: Looptap – A minimal game to waste your time

#156
post #84

Earlier quoted context omitted.

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!

Definitely seems like alfon's solution is faster/better, as it's more accurate when the game speeds up. However, it's also more resource intensive! getBoundingClientRect (used to at least, long time I go I did browser performance stuff) forces a new layout calculation each time it's called, which is one of the most expensive things you can do in the DOM, and can lead to jank in the website. Some more information here…

It is a bit of a slippery slope, because at some point, you could just do "GameApp.AddScore(10000)" which is clearly not playing the game. The line of what's "fair" and what's not isn't too clear. I do think staying out of the game code is actually a fairly good line though.

EDIT: Looked down thread and basically saw a bunch of examples of just that!

Re: Show HN: Looptap – A minimal game to waste your time

#157

It'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!

That is how it works, I thought that was the whole point. It's a game about greed. You can either play it safe and go up 1 by 1, or go fast. The max you can get is 5 if you press immediately, seems to drop down to 1 after half a turn.

EDIT: Found the code

    (tapInterval 
So 5 points for under 0.5s, 2 points for under 1s, 1 point otherwise.
Post reply on HN