Top
Best
New

Posted by mday404 6 hours ago

Show HN: bouncemarket – a live prediction market game for a bouncing ball(bouncemarket.minhanhday.com)
a ball will fall. trade on where it lands.

I made this game! Some technical details:

The entire drop of the ball is simulated server-side, then streamed to each client as server-sent events with a small buffer. Every drop is deterministic from its starting position, so rounds can be replayed exactly for later analysis, but tiny variations in starting position can change the ultimate outcome.

There's some AI traders to keep the market moving, but they drop out in any round that has more than five people. They operate using a naive set of rules that I wrote for them, so they're not too hard to beat -- it's when the market is full of real people that it gets tricky.

Curious to get feedback on anything you would change, and especially whether the mechanics were clear right away or not.

294 points | 89 commentspage 2
Lightbody 3 hours ago|
Fun! Can you update it so double tapping the bet buttons doesn’t zoom in on mobile? Should be a one line CSS tweak.
mday404 3 hours ago|
should be fixed now!
trwhite 4 hours ago||
The latency on the button press is much too slow to actually make a decision about the price. It feels pretty random as to what price you’re gonna get
Andr2Andr 3 hours ago||
Could be expanded with futures, indexes, hedge funds, shares etc. to teach the general public about the financial topics. A user is first prompted to play a few rounds, and then has the ability to invest, to buy some shares etc. I think it could become the go to page to understand the financial markets. Just my thoughts what to make of this in future
2bird3 3 hours ago||
Nice! Claude was able to recreate the simulation pretty quickly- it might be worth adding a little randomness to the bounces.
mday404 3 hours ago|
I'm curious, were you able to actually trade on the simulation's results?

My assumption was that the data you get as a browser doesn't have sufficient resolution to reverse-engineer the simulation, since the simulation operates on full 64-bit floats and you only get 0.1px granularity in display, so you don't know where the ball "really" is to guess it super early.

e1ghtSpace 1 hour ago||
I made a bot with claude. Yes it does get to 100% accuracy before the ball lands. However most of the time the entire market jumps to 0.99 at this point. However you can usually get in slightly earlier before that point or the market sometimes dips so you can get the shares cheaper.

Heres some results: calls 146/146 right · 146/181 rounds called · profit +98.80

Sometimes the bot can't calculate where the ball will land in time so those rounds are skipped.

Claude is now working on a new version to basically determine the seed for the random number generator used to set the ball's starting position. That way we can buy before anything even happens and get it right. However I'm not sure yet whether this is actually possible. I'll wait and see.

frenchmajesty 6 hours ago||
Surprising fun and awesome! Love it.

It was not immediately clear how the game was played but it came to me soon enough. I think one or two "trial/tutorial" rounds would go a long way to give me a proper shot at the leaderboard.

I wasted my first 2-3 balls as I was looking at the UI trying to understand how to play.

mday404 6 hours ago|
Thanks for the feedback! I'll work on some kind of tutorial to start the game
theturtletalks 4 hours ago||
This is actually how the formula for options came about!
matthova 5 hours ago||
Love the concept. Great implementation
joshribakoff 6 hours ago||
So fun, and easy to profit, at least for a few minutes. Seems like if you played this professionally 40hrs a week full-time it would get tiring fast. Maybe there is a metaphor in there.
hellojomp 4 hours ago||
I had a similar idea a few months ago https://hellojomp.com/mob-market/ but instead of a ball bouncing it was about the dynamics of webpage links turned into hawks and pigeons and random predictions regarding them i.e. will X spawn Y times in _ seconds.
darepublic 3 hours ago|
I would prefer if it were a known 'fair' plinko machine that was being automated physically and you were live streaming that. It would make it a lot more interesting to me. That or a roulette wheel
More comments...