Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
realPubkey
· 2y ago · 0 comments
But it seems that the balls speed increases with a bigger are.
Comments
[–]
teraflop
2y ago
From what I can see from a quick glance at the code, you have the causality backwards. Each bounce adds a small random variation to each ball's velocity, and if one of them randomly ends up moving faster, then it will tend to gain more territory.
[–]
throwup238
2y ago
I think the changes to speed are random:
https://github.com/vnglst/pong-wars/blob/main/index.html#L16...