Show HN: Logarithmic Flappy 2048
logarithmic-flappy-2048.ajf.me
logarithmic-flappy-2048.ajf.me
Or maybe exponential if you consider your score to be 2^(number of walls you've jumped).
I don't get logarithmic, though.
s_n = k (-1)^n
for n = 0, 1, 2, ...
and nonzero constant k is a non-constant geometric sequence that doesn't exhibit exponential behavior."Therefore, despite these two functions being the inversely related, the correct relationship is 2^x."
There is no "correct relationship", there is a relationship that (depending on choice of variables) we can describe as y=2^x or y=lg(x).
However, as you said, one choice of describing the relationship is certainly more natural. The exponential description assigns a score to every natural number. While the logarithmic description does not.
I would interpret correct in the way that it is sometimes said, "the correct way to think about X is..." which doesn't say other ways of thinking are wrong, but limited or not illuminating.
An early version of the code did use log2() on the score internally, but now it does pow(2) externally.
http://i.imgur.com/Q2qHoSs.png
Also, it seems that at a certain point length, the two score boxes will shift to being on top of one another instead of side by side[1], which moves the whole playfield's place in the window. Adds a bit of an added challenge!
I literally just made the display code use Math.pow(2) on everything, after discovering that changing the internal score by doubling instead of incremental would increase the speed exponentially with each hop, rendering it unplayable.
Note though you missed the first two statements of 'somaWrapper' and in the return statement of 'optimxWrapper'.
I got 8096 btw!
i can't believe you got 8096, i got like 8
edit: a new high, 16