pull down to refresh

Hi! This is a little game I've been working on over the past few weekends.

It's heavily inspired by lastpaywins.com by @alex_lewin.

It works similarly, except that you invite a friend to join your game—so you're not playing against strangers. Also, the timer is 24 hours instead of 300 seconds.

I think this game could be fun because winning sounds simple: you just need to remember to zap back within 24 hours. But the same goes for your friend. So, over time, the pool grows, and eventually—maybe after months??—someone will forget, and the winner gets the full pool!

I'm glad I can finally release the first version to get some feedback and see whether it's worth continuing to work on alongside SN in my spare time. It can get quite depressing to work on the same codebase day in, day out for two years.

I don't have high expectations for this game; I mostly just wanted to prove to myself that I can execute on an idea from start to finish completely on my own that others might also find cool. Oh, and I wanted to try out a different tech stack instead of only working with Stacker News' tech stack. This game is built with Echo+HTMX+Templ.

Here are some screenshots:

Let me know if you want to play, then I will create a game with the default of 100 sats per zap and reply with the invite link. You can of course also create your own game and drop the links in here so others can join! I am just offering to play with anyone using the default zap setting (or lower if requested).

PWA with push notifications is planned

Are you paying me to be your friend or am I paying you?

Either way, I'm in!

reply
reply

You know I love getting to accuse you of cheating.

I made my payment two hours ago, but your countdown clock has only advanced 16 minutes.

reply
38 sats \ 9 replies \ @ek OP 5 May

There’s a bug, I suspect clock drift between my JavaScript counting down each second vs real time

But when you refresh the page it should show the correct time

I just paid and it did show 22h left for example

edit: ohhh, or my JavaScript countdown is only running when it’s in the foreground. If I were a browser, I also wouldn’t keep JavaScript running in the background.

reply

Yeah, I remember lastpaywins had something similar going on where timers would not sync between tabs... @alex_lewin resolved it somehow, but don't know how.

reply

payment notifications are emitted via websocket that contain a timestamp of the payment. then the browser calculates how much time is left based on its own clock

reply
10 sats \ 0 replies \ @ek OP 5 May

Ohh, thank you, that would also fix my issue probably:

I currently fetch the timestamp when the invoice will expire once and then I let the browser count down the seconds.

But instead, I should let the browser calculate the difference between now and the expiration timestamp every second. Then there would be no clock drift, for example if the browser doesn't run the JS interval every second for whatever—probably good—reason.

reply
40 sats \ 0 replies \ @ek OP 5 May

See @Undisciplined, we have a real OG here

reply

I can already tell that this game is going to get out of hand.

reply
27 sats \ 3 replies \ @ek OP 5 May

Yes, but #971692 is probably going to get out of hand even faster

reply

Depends how often they zap each other.

reply
34 sats \ 1 reply \ @ek OP 5 May

I’m playing with him

He‘s an expert in Last Pay Wins iirc, it’s going to be though

Cool idea! I'm writing a bitcoin zine, can I recommend this game in it?
#971708

reply
21 sats \ 0 replies \ @ek OP 5 May

Sure, I feel honored!

reply

Sounds cool, if I had friends lol

reply
reply

Engaged!

reply
100 sats \ 4 replies \ @ek OP 4 May

Your turn again but no pressure, you have 24 hours!

reply

deleted by author

reply

hey, that's cheating lol

reply

lol I can cancel it

reply

nah it was okay, you can use it if you want

Interesting! What’s min zap amount?

reply
73 sats \ 5 replies \ @ek OP 4 May

1 sat

wanna play with 1 sat per zap? I'd be paying more in fees with Phoenix though lol

reply

But can you handle so many games at once?

reply
88 sats \ 1 reply \ @ek OP 4 May

yes or we will see

reply

I’m in!

reply
82 sats \ 0 replies \ @OT 4 May

Ek vs SN

reply
100 sats \ 6 replies \ @OT 4 May

Cool

I'm up for it. Who wants it?

reply
100 sats \ 5 replies \ @ek OP 4 May

You can play with me if you want:

https://zapback.ekzy.is/game/60aa490b9d02cf00

reply
55 sats \ 4 replies \ @OT 4 May

OK let's go!

Is that lightning address an LNURL?

reply

What do you mean?

Your Stacker News lightning address is OT@stacker.news for example

reply
21 sats \ 2 replies \ @OT 4 May

Yeah, got it.

It's your turn

reply
0 sats \ 1 reply \ @ek OP 4 May

Check again 👀

reply
21 sats \ 0 replies \ @OT 4 May

My turn.

Looks like its working

reply

I definitely picked a bad time to do this, traveling for several days. I missed my turn, so you win!

reply
23 sats \ 8 replies \ @ek OP 8 May

Haha yes, same here, I went to bitcoin++ today and I lost against @Undisciplined

reply

Excuses are like assholes...

reply

Oh yea. I’ve got an excuse, and an asshole, and I’m also kind of an asshole too lol

reply

But the good news is I’ll be back home tomorrow so I’ll be primed for more NBA playoff discussion soon

reply

The games have gotten worse without your discussion threads.

reply

I’ll aim to make a discussion thread for tomorrows games!

reply

You better. These last two games were rough.

Well my lost sats cover half of your lost sats lol

reply
100 sats \ 3 replies \ @Car 5 May

Cool want to check this out tomorrow in the lab.

reply
50 sats \ 2 replies \ @ek OP 5 May

there's not much to check out, the screenshots already show everything haha

reply
55 sats \ 1 reply \ @Car 5 May

Ya but I don’t understand it, via screenshots, I could get into it but rather just ask irl.

reply

ah ok, makes sense

reply

One piece of feedback: in addition to the countdown for time remaining on the current turn, I think you should also display the exact time at which the turn ends/expires. That way any sort of bugs in the countdown itself would be eliminated.

I've encountered this when switching out of the zaprank tab and then back into it later - the countdown doesn't correct itself until I refresh the page.

reply
103 sats \ 1 reply \ @ek OP 6 May

Mhh, if I fix the countdown, do you still want to see the exact timestamp?

Maybe clicking on the countdown could toggle between timestamp and countdown though.

reply

I think the latter makes sense

reply
100 sats \ 14 replies \ @OT 7 May

I get a feeling this isn't going to turn out well for one of us...

reply
74 sats \ 13 replies \ @ek OP 7 May

I feel the same about this game with @south_korea_ln ...

reply

This is going to end badly, indeed~~

With LPW, I think, at some point, node liquidity could become a problem.
But things could get out of hand much faster there...

reply

I run phoenixd which has automated inbound liquidity so that at least won't be a problem here

But things could get out of hand much faster there...

Yes, maybe you should just give up now rather than later 👀

reply

Maybe I should~~

@remindme in 1 year.

reply

Maybe I should add an option to ask for a draw where we split 50:50

but that would also be kind of boring

reply

Or a specific split chosen by the person who asks for it. The other one can accept or refuse.

I'll probably just forget to pay at some point. Or I won't have internet access for 24 hours.

reply
0 sats \ 0 replies \ @OT 8 May

Maybe dynamic time blocks between 8 and 24 hours.

0 sats \ 0 replies \ @OT 8 May

Maybe you should try to zap after 23 hours and 59 minutes.

That would be exciting!

reply
0 sats \ 3 replies \ @OT 8 May

It ends up being who has more bitcoin

reply

zapback - the real way to 2x your bitcoin

reply
0 sats \ 1 reply \ @OT 8 May

deleted by author

reply
0 sats \ 0 replies \ @OT 8 May

Zap till big pot. Then kidnap counterparty for 24hours.

0 sats \ 0 replies \ @OT 8 May

might have to negotiate

reply
0 sats \ 0 replies \ @OT 7 May

Ooofff

reply

so cool man!! thanks for the shout out. Love the modifications to the concept. gives the game a whole new feel :)))

Congrats on shipping.

reply

Thank you and thank you for the inspiration!

Let me know if you want to play 👀

reply
100 sats \ 1 reply \ @beejay 22 May

Ha ha this reminds me of the old days of facebook, where you would have poking wars

reply

Yeees, I was inspired by them!

I used to explain zapback by saying it's basically a combination of Last Pay Wins + Facebook pokes. Very cool that you saw that, too!

reply

Anyone care to join for a 1000 sat game?

https://zapback.ekzy.is/game/0978ba688173f8d2

reply

Oof, LFG haha

reply

This is a nice idea. Can I make a bitly link for this to post in my discord server?

reply
0 sats \ 1 reply \ @ek OP 5 May

sure

reply

Thanks! Are you available for a game now?
https://zapback.ekzy.is/game/e5f74fc92d4a2063

reply
51 sats \ 2 replies \ @sox 5 May

LFG! I wanted to know more about it during our displacement lol

reply
95 sats \ 1 reply \ @ek OP 5 May

We can play too if you want 👀

reply
21 sats \ 0 replies \ @sox 5 May

Yes!! Let’s play tomorrow 😸

reply

Great work @ek. I'm definitely going to try this out with my friends.

It can get quite depressing to work on the same codebase day in, day out for two years

Random question - do you have any tips for wrapping your head around the SN codebase? I'd love to contribute, it just seems overwhelming to start

reply

That game would be interesting to play

reply
0 sats \ 1 reply \ @jasonb 5 May

Very cool!

reply

Thank you!

reply
It works similarly, except that you invite a friend to join your game

Uh 🥺

reply

it could be promising game however what is concept of zap it is gambling or tips from people?

reply

gambling

reply

Who am I gonna zap here?

reply

How do I know that my friends has zapped the pool and how come @ek keep winning all the time?

reply

What's the game about,?

reply

That's cool.
For once I thought a new game for comments!

Aren't the Stackers already playing similar (kind of) game for the "Cowboy Hat" on SN?

*We need to pay/spend daily, or we lose the hat/game.

I'm in... for a 10 sat game..is it ok?

reply
0 sats \ 1 reply \ @ek OP 5 May
I'm in... for a 10 sat game..is it ok?

sure

reply

Let's do it.

reply

deleted by author