Show HN: ThreesJS – iOS game Threes for the browser
threes.meteor.com
threes.meteor.com
I had this layout (with some other unrelated tiles):
- - - -
- - - -
1 - - -
2 - - -
And, pressed down to combine the 1 and 2, but it wouldn't let me until the column was full of tiles to "push" them together. In the iOS app, swiping down at that point would have combined the 1 and 2 into a 3 at the bottom-left position.I hate to nitpick though. Great job overall.
edit: Strange. I just tried again and can't reproduce that behavior now.
(The game mechanics should be identical to the iOS app though, with the exception of the occasional high-number tiles provided. Also in my todo list to figure out the algorithm the game uses to generate them, haha.)
I got this far (http://imgur.com/MR3lC4U) before realizing I should really get some sleep.
http://js1k.com/2014-dragons/demo/1667
Such a great game.
*edit Someone figured it out here: http://bitsplitting.org/2014/02/11/threes-scoring/
3 -> 3 * 2^0 -> 3^1 -> 3 pts
6 -> 3 * 2^1 -> 3^2 -> 9 pts
192 -> 3 * 2^6 -> 3^7 -> 2,187 pts
I may have an off-by-one (degree) error though. It helps to be a big math geek who looks for exponents everywhere.Should call it Threes for PCs.
I found it interesting that you used Meteor to build this game -- I initially thought it was a fully client-side Javascript only canvas-based game. Is there any reason for using it considering this app doesn't appear to be using any backend?
Out of curiosity, what distribution of "next" tiles is produced?
As mentioned in an earlier comment and in the article, the actual iOS game also inserts higher-number cards (6, 12, 24, ...) into the stack occasionally, though I haven't added that element to this version yet.
I believe the higher numbers work like this: every 21 turns, Threes generates a number from 0-20. After this number of turns elapses, if the highest number seen is 48 or greater, Threes skips drawing from the normal set of ones, twos, and threes, and instead generates a "special spawn". The special spawn is a number between 6 and <highest number seen> / 8 (I believe the distribution is uniform).
Source: Threes writes a preference plist that allows it to resume games if the app is killed in the background. The keys to look at are "PseudoSpawnSpecialIndex" and "PseudoSpawnSpecialList".
The simple alert at the end for the score is a bit of a weakness.
I agree about the partial slide movement testing. Perhaps hit the arrow to test the move and double-tap it to actually make the move.
Confusing name, I immediately though you were using three.js
Great job!