Hey, author here! I'm pretty overwhelmed that this made it to the top of HN without me even thinking of posting it here :)
I made this game as a fun weekend project, inspired by another game called 1024 (https://itunes.apple.com/us/app/1024!/id823499224) and a spinoff called 2048 (http://saming.fr/p/2048/). I did mine to add animations to the latter, which was a bit hard to play without them. I discovered Threes only today, and I had no idea it looked so similar. I searched a bit and it appears as if 1024 is also inspired by Threes, so my game is probably the last of a long chain of clones :P The code is also open-source. You can find it here: https://github.com/gabrielecirulli/2048 Feel free to ask me anything, and thanks to everyone for the attention! :) By the way, my highscore is somewhere around 6000. Admittedly, I'm quite bad at playing my own game :P EDIT: Make sure not to get addicted! EDIT 2: The game now has swipe gestures and vim keys support (added by @rayhaanj)!
The latest stats show no "game-win" events :P It might just be a matter of time though.
EDIT: oops, there was a bug in the win/lose tracking so I probably missed out on a few wins. I fixed it now, so it should hopefully track it if someone else wins!
With enough tries anything is possible. There is probably even a person who ascended nethack on his first try (using the wiki of course, we're still talking things with p > 0) and didn't play it again because it's too easy and boring.
There's actually a semi-optimal strategy that nearly guarantees winning if you're diligent about it. Just build a stairstep pattern with the highest numbers in the bottom corner of the stairs. Then basically combine sideways and downward and "always" resist the temptation to push up. Its kind of how some tri-diagonal matrix algorithms work. The only problem is you have to be fastidious about never using the one direction you've reserved as your excluded case (Up in my example) as that can screw your staircase by putting a [2] right underneath your wonderful [1024]. Just move blocks back and forth, waiting for the right blocks to create combo patterns, while generally storing lower cost blocks on the outside of the stairs, and then snake them through the stairs when you get a chain set up.
I was surprised at how well that worked. I was basically blindly cycling between left,down,right (with one accidental up) and got to 1024 on my first try.
function press(key) {
var eventObj = document.createEvent("Events");
eventObj.initEvent("keydown", true, true);
eventObj.which = key;
document.dispatchEvent(eventObj);
}
for (y=0; y<=1000; y++) {
press(39); //right
press(40); //down
press(37); //left
press(40); //down
} this gave me 1024 in couple of tries :D
http://i58.tinypic.com/am9sh4.png
I found one not-completely-horrible strategy was just blindly running round the curser keys.. eg. up - right - down - left, repeatedly. Got near 4000 points with that..
Great game though - wasted waaay too much time last night playing.
It's a good start but you will get stuck at higher level. in your case focus on increasing the value on the bottom left. When possible, shift the last line to the right. Never go up.
I've started playing threes a week ago. Both threes and 2048 are fun to play. Except that I think in threes the challenge starts earlier in the game and every step counts and you can easily get into a deadlock.
Can't wait to see the source code and analytics. Maybe you want to add on the page the highest score :)
So addictive. You know since tiles slide to the edge it would be great if this took advantage of accelerometers to allow tile combining by tilting. I know this is a browser game but if you ever create an app using the tilt motion to combine tiles would be awesome. :)
I was reading all your "I wasted x hours on this" and I rolled my eyes - "My god, these guys fall for everything". Then I tried it. Couldn't sleep. Damn it!
Likewise. I had one game where I had a 256 block and two 128 blocks, but I ran out of room to maneuver before I could combine the 128s to another 256 and then combine the 256s to a 512.
I prefer Trip actually, it has the same rules as Threes, but it's much harder to get a high score compared to Fives. Because you only ever get 1, 2 or 3 as the new card, everything needs to be built up from there, it requires a lot more thought and planning. https://play.google.com/store/apps/details?id=ca.ginik.trip
Comments (410) 175 threads
Show all comments
Showing thread 1 of 175
I made this game as a fun weekend project, inspired by another game called 1024 (https://itunes.apple.com/us/app/1024!/id823499224) and a spinoff called 2048 (http://saming.fr/p/2048/). I did mine to add animations to the latter, which was a bit hard to play without them.
I discovered Threes only today, and I had no idea it looked so similar. I searched a bit and it appears as if 1024 is also inspired by Threes, so my game is probably the last of a long chain of clones :P
The code is also open-source. You can find it here: https://github.com/gabrielecirulli/2048
Feel free to ask me anything, and thanks to everyone for the attention! :)
By the way, my highscore is somewhere around 6000. Admittedly, I'm quite bad at playing my own game :P
EDIT: Make sure not to get addicted!
EDIT 2: The game now has swipe gestures and vim keys support (added by @rayhaanj)!
EDIT: oops, there was a bug in the win/lose tracking so I probably missed out on a few wins. I fixed it now, so it should hopefully track it if someone else wins!
http://i.imgur.com/nf25AVZ.png
Continue this thread — 1 reply
Ex:
x x x 2
x x 2 4
x 2 4 8
2 4 8 16
for (y=0; y<=1000; y++) { press(39); //right press(40); //down press(37); //left press(40); //down }
this gave me 1024 in couple of tries :D http://i58.tinypic.com/am9sh4.png
Continue this thread — 1 reply
Great game though - wasted waaay too much time last night playing.
http://puu.sh/7rKEF.png
Continue this thread — 9 replies
Continue this thread — 1 reply
http://imgur.com/9FckZVX
Continue this thread — 1 reply
At least I don't have to spend any more time on it.
My simple strategy was to keep the biggest blocks in a corner at all times.
https://developer.mozilla.org/docs/WebAPI/Detecting_device_o...
Continue this thread — 1 reply
Continue this thread — 7 replies
Continue this thread — 1 reply
Continue this thread — 1 reply
Note: shameless parody plagarism, (original: https://news.ycombinator.com/item?id=7386459), but this thread has 20x points.
Continue this thread — 6 replies
Continue this thread — 1 more reply
Continue this thread — 29 more replies