Love this! Just when you think that a genre like tile puzzle games has been completely done, something like this comes along and shows a new way of thinking about it.
The most amazing thing about this game is how it manages to be so creative and different while being so simple.
Thanks! I shouldn't take all the credit for it though. The game is basically a clone of the two games I've been inspired by, as an attempt to make my own version and learn new things along the way!
It's similar, but different. With Threes you combine 1s and 2s to make 3s, then similar numbers to double them. Also, the tiles in Threes only shift at most one spot at a time - with this game, everything's flung to the other side of the board.
I agree, there's something satisfying about sliding all the things with just one keystroke. I wonder if it's like that desire to chuck things in parabolic arcs that made Angry Birds so popular? I actually bought Threes from the iOS App Store but I've spent much more time on this game for whatever reason.
I think I should consider the 256 tile that I got in the second game a moral victory and quit my browser before I seriously trash my schedule today. :)
I got the hang of it during my first play, and ended up with 512 with a 256. I suspect there may be a system that lets you clean up the mess without creating too much new mess.
Maybe Monday morning is finding me too pedantic, but this is similar to Threes (http://threesgame.com), not just like Threes. There are some pretty obvious differences, from the movement of the tiles to the requirements for tile mergers (multiples of 2 rather than 3). The comments thus far do not make that distinction.
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 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.
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.
This would be cool. I think winning in the fewest moves would be the most impressive. i.e. how few tiles you 'waste'. Though winning with the lowest score may approximate this.
Each turn, one 2 tile is added, and other tiles may be combined. So you can derive the move count by adding together the numbers on all the visible tiles and dividing by 2.
This is inaccurate, because you have a 10% chance of getting a 4 tile added instead of a 2. That part makes the game tricky, because otherwise you could optimize every solution like an algorithm without ever losing.
Oh, huh, I didn't even realize it was doing that. Even so, the move count will still be roughly proportional to the sum of the board (plus or minus some random variation), won't it?
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. :)
Best strategy (for me) seems to be to play it like tetris. Never ever use the up key and create a row at the bottom where everything collapses into it.
This sort of clicked towards, oooh I don't know about 1:30am this morning.
Downloaded and installed. Can you please remove the almost mandatory google games sign in, or make it optional. I tries to connect every time I move between the game and the menu, and I don't want it to connect...
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 did it by pressing up-left-down-right, repeating each direction as many times as possible. That's the worst part - knowing that your carefully calculated playthrough is actually no better than someone just pressing the keys in a set order.
Ran your strategy 162 times with autoit of which the following blocks came by: [128]: 150 times, [256]: 36 times, [512]: 13 times, [1024]: 0 times. Anyone else a good suggestion for an optimal "blind" strategy?
Perhaps I had a little bit of luck. But this shows you can easily get to 256 with little dedication. After which you can start to puzzle things together.
Also about your autoit "analysis" 36 + 150 + 13 != 162
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
Or an expansion on that. Keep track of how many 128s, 256s etc you've ever formed. Show them as big counters directly under the game with an animation when you create any of them.
Actually all you need to store is the highest block achieved, and the number of times it's been hit. For instance, if you've only ever generated 2 8's, then you know that you've had 4 4's, and 8 2's...
Edit 2:
Does the game allow four 2's to cascade into an 8? If so, maybe you could also store combo stats. It'd be way cooler to smash together four 256's than to smash together two 256's two times.
I was so addicted to Drop7, and so annoyed at the crappy Android version, I made my own HTML/JS version with appcache, so I could play it in chrome offline: https://github.com/pavellishin/drop7
Side note: I got hooked on Drop7 during my first semester in college. I was fascinated by the game and wrote a simulator to pick the optimal move:
https://github.com/keshavsaharia/Drop7Simulator
I have Threes and they way way over-designed it. Also it's rubbery interface is really quite annoying. This one however is a perfection - simpler idea, pure gameplay, subtle animations and UI mechanics. It really beats Threes hands down even if it's a "clone".
You can always pay some sort of % as tribute, but you've created something that we all find a horrendous waste of time :-) so a way of remunerating you to some degree is not in the least bit unethical.
It's good to get paid for your work, even if it was fun.
I thought about this for 5 minutes and really got nowhere. Can anyone come up with a nice analytic way to think about an algorithm?
There are a couple of brute force approaches: a) always pick the direction that will result in the most blocks to combine, b) always pick the direction that will result in the largest score.
Two hours lost at uni today and checking hn first thing back home... nooooooo! I will now proceed to waste time. Good job! :)
edit: Ok, some random friend just emailed me and told me to check out your game. This friend does not hang out at the online places I do. It seems to be on fire!
> this made it to the top of HN without me even thinking of posting it here
Good for beta testing it.
Unlike with Threes, there's no real reason to use numbers since they're all powers of 2. If you used letters (A, B, C, ...) you could market it to non-HN sorts, and have a version of the game in a 5x5 grid, or, more to the point, in a 6x6 grid with letters A to Z. Most people in the world know the order of letters in English.
Good idea with the simple numbers, and certainly necessary to use some tokens other than what this 2048 app uses so we can have a version of it in a 5x5 or 6x6 grid.
When you wrote "Good idea with the letters, but perhaps not necessary. People are happy with simple numbers. Just look at Sudoku which doesn't use A to I", I thought you hadn't noticed my mention of the larger grid, which was really the main point of my comment and maybe I should've worded it differently. Though if you'd begun your comment differently, i.e. "Good idea with the larger grid, but perhaps the letters aren't necessary. People are happy with simple numbers. Just look at Sudoku which doesn't use A to I", I wouldn't have felt the need to reply to correct a perceived communication mistake.
Oh, for a larger grid, you might want to have letters anyway, because your point still applies.
It's interesting that log_2 2028 is just above what you can represent in a single digit. That's very close to merging two 9s.
I'd like to actually see someone pit x, log_2 x, and letter(log_2 x) against each other in an A/B test of the game. The latter two are simpler, but the former might be more exciting, because of bigger numbers.
I can't tell if I despise you or admire you, all I know is that there was light outside my window when I first began playing this, and now it's pitch dark.
Just wanted to let you know (but wanted to wait before somebody would down vote such a comment here) that I really enjoyed your game, thanks and cheers!
Nice, only thing I don't like in the game is that I do better scores just doing (repeat((left or right once) + (up till it doesn't work anymore))) than when I think about my moves...
I looks like the new block appears randomly. If the new block appeared even if you didn't move anything it would be easy, but they don't and that can ruin your strategy.
I got to a 512 block in a corner and then got blocked by a new block in the same corner.
I think the strategy is very simple. Pick a corner and mash keys that move into that corner. For example for bottom-right corner, just mash right and bottom. When you can't move anything anymore, move into the direction that keep your highest block in a corner and then continue to mash and hope that a new block doesn't appear anywhere close your highest block.
I have gotten a 512 block in 2 minutes twice( score over 6000 ). It would only take time to reach more, and maybe actually look at the board instead of mashing; but that is problematic since the new block appears to be random.
1024 could be reached in under an hour and 2048 in a day, i think.
It would be better if you got the position of the new block. That way the game would be solvable in some normal time.
I tried a "tumbling" strategy, where I would press right, down, left, up, repeating. You'll see that the blocks end up tumbling around. I was able to get 256 several times.
I also tried a very deliberate (and slow) strategy of actively trying to build up the necessary matching blocks and was able to get to 512 with a score of 5900.
Damn... Nice job. Did you use any particular strategy? Obviously the random "birth" of new tiles adds an element of luck to winning, but I'm sure you must have used some technique!
One minor nit: if the board is full, but you can make a move that will free up a space, you can make that move and the new tile will appear in the newly opened space, but then the game immediately ends afterward. EDIT: OK, apparently this only happens if there are actually no more moves; as long as moves remain the game continues.
Also, hitting "space" reset the entire game; I'd expected it to either do nothing or add a tile without moving.
This is one of those games that I do best on my first try when I have no idea what I'm doing, and then do worse and worse the more I think I have a strategy.
exactly. I got up to 256 first try and it took quite a while before I ran out of open tiles. 2nd try hit the wall shortly after 128... third time it went so quick and I only had a single 64. addictive and ridiculousness! :-)
I played a round, and got to 512. But toward the end I wasn't sure if I was actually playing with a strategy, or just pressing buttons randomly with some thinking involved.
So I built a script to randomly press the arrow keys[0]! I let it play a few games, and the highest it got to was 128 before consistently losing. So I guess you'll need some decent strategy to get to 2048.
> So I built a script to randomly press the arrow keys[0]! I let it play a few games, and the highest it got to was 128 before consistently losing. So I guess you'll need some decent strategy to get to 2048.
That's a great idea for testing the depth of simple games. It's good to know a baseline score: players should be getting to the 128 tile or better, or else they're doing really bad.
419 comments
[ 3.3 ms ] story [ 292 ms ] threadThe most amazing thing about this game is how it manages to be so creative and different while being so simple.
I'd appreciate it, if someone can share a few more links with similar puzzlers on the web.
http://asherv.com/threes/
I have it on my iPhone and it's fun.
Or a truer JS clone: http://threesjs.com
http://i.imgur.com/nf25AVZ.png
That being said, this is a pretty well done clone clone.
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
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
x x x x
x x x x
o o o o
o o o o
where at no point the same numbers next to each other allow collapsing. Maybe it's the problem not growing from the corner.. hm.
Great game though - wasted waaay too much time last night playing.
http://puu.sh/7rKEF.png
I refuse to do these calculations in my head...
The author should do this, and create a counter of moves within the app.
:P I guess it was almost perfect attempt, and the quickest of mine so far (just a single 16 apart of 2048)
http://imgur.com/9FckZVX
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...
This sort of clicked towards, oooh I don't know about 1:30am this morning.
Won a few times and still keep picking it up. Now the Tetris dreams are starting; must stop.
Note: shameless parody plagarism, (original: https://news.ycombinator.com/item?id=7386459), but this thread has 20x points.
Also about your autoit "analysis" 36 + 150 + 13 != 162
Anyway managed to get to 1024 + 512 + 256 after that without random button mashing.
Hah. It's binary crack.
Edit:
Actually all you need to store is the highest block achieved, and the number of times it's been hit. For instance, if you've only ever generated 2 8's, then you know that you've had 4 4's, and 8 2's...
Edit 2: Does the game allow four 2's to cascade into an 8? If so, maybe you could also store combo stats. It'd be way cooler to smash together four 256's than to smash together two 256's two times.
Not sure how that plays into the histogram.
You know you've had at least 4 4's, but you could have had more.
Just in case anyone is looking at this and wants a direct link to play pavel_lishin's version, here's the raw github version: https://rawgithub.com/pavellishin/drop7/master/drop7.html
Side note: I got hooked on Drop7 during my first semester in college. I was fascinated by the game and wrote a simulator to pick the optimal move: https://github.com/keshavsaharia/Drop7Simulator
http://asherv.com/threes/
Nice clone but it's definitely a clone and so should be treated as such.
It's good to get paid for your work, even if it was fun.
Oh, no we have another Flappy Story in the making here!
There are a couple of brute force approaches: a) always pick the direction that will result in the most blocks to combine, b) always pick the direction that will result in the largest score.
http://forums.toucharcade.com/showthread.php?p=3142737#post3...
edit: Ok, some random friend just emailed me and told me to check out your game. This friend does not hang out at the online places I do. It seems to be on fire!
http://imgur.com/28YNfDS
That's pretty damn near optimal, might have had an extra 2 when doing the final collapse, can't remember.
Good for beta testing it.
Unlike with Threes, there's no real reason to use numbers since they're all powers of 2. If you used letters (A, B, C, ...) you could market it to non-HN sorts, and have a version of the game in a 5x5 grid, or, more to the point, in a 6x6 grid with letters A to Z. Most people in the world know the order of letters in English.
When you wrote "Good idea with the letters, but perhaps not necessary. People are happy with simple numbers. Just look at Sudoku which doesn't use A to I", I thought you hadn't noticed my mention of the larger grid, which was really the main point of my comment and maybe I should've worded it differently. Though if you'd begun your comment differently, i.e. "Good idea with the larger grid, but perhaps the letters aren't necessary. People are happy with simple numbers. Just look at Sudoku which doesn't use A to I", I wouldn't have felt the need to reply to correct a perceived communication mistake.
It's interesting that log_2 2028 is just above what you can represent in a single digit. That's very close to merging two 9s.
I'd like to actually see someone pit x, log_2 x, and letter(log_2 x) against each other in an A/B test of the game. The latter two are simpler, but the former might be more exciting, because of bigger numbers.
Upvoted you to show my anger! :)
(in case folks on Android want to play it)
But seriously, well done. :) Completely destroyed my productivity.
http://2048.mx/
:-) Hope that's fine. It might take an hour or so for the domain to be accessible for everyone due to DNS cache.
just because a 4 gets spawned 10% of the time, doesn't mean that there couldn't be a game where 4 does not get spawned
http://imgur.com/Y8oVTeQ
I hate you. ;)
I got to a 512 block in a corner and then got blocked by a new block in the same corner.
I think the strategy is very simple. Pick a corner and mash keys that move into that corner. For example for bottom-right corner, just mash right and bottom. When you can't move anything anymore, move into the direction that keep your highest block in a corner and then continue to mash and hope that a new block doesn't appear anywhere close your highest block. I have gotten a 512 block in 2 minutes twice( score over 6000 ). It would only take time to reach more, and maybe actually look at the board instead of mashing; but that is problematic since the new block appears to be random.
1024 could be reached in under an hour and 2048 in a day, i think.
It would be better if you got the position of the new block. That way the game would be solvable in some normal time.
I also tried a very deliberate (and slow) strategy of actively trying to build up the necessary matching blocks and was able to get to 512 with a score of 5900.
I'm pretty sure I never used the down arrow in this game (sometimes you have to). If your high numbers end up in the middle you're kind of screwed.
One minor nit: if the board is full, but you can make a move that will free up a space, you can make that move and the new tile will appear in the newly opened space, but then the game immediately ends afterward. EDIT: OK, apparently this only happens if there are actually no more moves; as long as moves remain the game continues.
Also, hitting "space" reset the entire game; I'd expected it to either do nothing or add a tile without moving.
Fun though!
I played a round, and got to 512. But toward the end I wasn't sure if I was actually playing with a strategy, or just pressing buttons randomly with some thinking involved.
So I built a script to randomly press the arrow keys[0]! I let it play a few games, and the highest it got to was 128 before consistently losing. So I guess you'll need some decent strategy to get to 2048.
0 - https://gist.github.com/Wayfarer247/9469272
That's a great idea for testing the depth of simple games. It's good to know a baseline score: players should be getting to the 128 tile or better, or else they're doing really bad.
https://news.ycombinator.com/item?id=7379821