Earlier quoted context omitted.
The problem with 2048 is that it’s not a very good game. You can solve it algorithmicly. Repeat swipe left then down down. If the board gets stuck swipe right then down and repeat.
I believe that that strategy is decent but not optimal.
Show HN: 2048.cpp – Play 2048 in directly your terminal
41–48 of 48 posts
Re: Show HN: 2048.cpp – Play 2048 in directly your terminal
#42Earlier quoted context omitted.
Maybe it's a knockoff, but I'd call it improved. I never liked number 3, and for me the additions in Threes look completely arbitrary. Whereas 2048 features nice, round (base 2) numbers. And I'm only half-joking. I've been working with base 2 for two thirds of my life now, so powers of two are really more pleasant emotionally to me than multiples of 3.
The problem with 2048 is that it’s not a very good game. You can solve it algorithmicly. Repeat swipe left then down down. If the board gets stuck swipe right then down and repeat.
Every game is susceptible to algorithms by definition, by itself, it doesn't make a game more or less good, or more or less fun.
For me, 2048 hits a perfect spot where I can play it during meetings/conference calls/regular phone calls, to give that 20% of my mind that gets bored something to do, while not impacting my ability to focus on the discussion itself.
Re: Show HN: 2048.cpp – Play 2048 in directly your terminal
#43Earlier quoted context omitted.
> trying to reproduce what was once a tech demo of what you could do in a browser 2048 was never that, it was a shitty knockoff of Threes and remains so.
Maybe it's a knockoff, but I'd call it improved. I never liked number 3, and for me the additions in Threes look completely arbitrary. Whereas 2048 features nice, round (base 2) numbers. And I'm only half-joking. I've been working with base 2 for two thirds of my life now, so powers of two are really more pleasant emotionally to me than multiples of 3.
The two games are obviously very similar, and you can list their rules pretty easily, and how those rules differ. I'm going to attempt to write them out below for my benefit more than anything else, but my point is mostly about rule number (4):
In Threes! tiles combine if they are 3 or greater and the same, or if they add to 3; in 2048 they combine only if they are the same.
This means that the 'base level' tiles, 1 and 2, cannot combine with copies of themselves. Coupled with (7) this means that there is a lot of planning to make sure that new tiles can be combined with the correct type of tile.
This mechanic is not possible using powers of 2, unless you had two 'types' of 2-tile that cannot combine with themselves. For example, a black 2 and a white 2, that combine to make a grey 4. That would be interesting, but less clean than using 1+2=3, I think.
The other differences in the rules are important but have less to do with multiples of 3 (where the multipliers are powers of 2) vs powers of 2.
While both games have randomness inherent in them, Threes! allows forward planning a lot more. You can keep track of which tiles are left in the deck, and as tiles only move one grid square at a time they are somewhat more manoeuvrable. Tiles only combine if you squeeze them together, while in 2048 they feel a lot more 'magnetic', jumping together as soon as they can. This gives you more control over when tiles combine, which is really important for positioning moves. It also means that Threes! has more tiles on it and feels more crowded as the game goes on, because many moves will not combine any tiles at all, while in 2048 almost any move will combine some tiles.
==== Rules ====
Start with a grid that has tiles on it, each tile taking one space and containing a number. A turn consists of pushing all tiles in one direction, either up, down, left, or right.
Tiles will either stay where they are or slide in the direction pushed, and may combine with tiles next to them (in the direction of pushing). When tiles combine they create a new tile with number equal to the sum of the two that combine, and this new tile replaces the other two.
We will say a tile is next to another tile only if they are adjacent in the direction of the push.
In Threes!
1. the grid is 4x4
2. a tile stays where it is if it is next to a wall, or next to a tile that is staying where it is and that it cannot combine with
3. a tile that moves will only ever move one tile
4. two tiles can combine if their sum is 3, or they are 3 or greater and the same
5. two tiles that can combine will combine if they are next to each other and both cannot move
6. after each move a new tile will appear next to the opposite wall, on a line where at least one tile moved
7. new tiles are drawn from a shuffled 'deck' of twelve tiles - four 1s, four 2s, and four 3s. Occasionally a large 'wild' tile will be picked instead of the next tile from the deck
8. to start, the grid has 9 new tiles placed randomly on it
In 2048
1. the grid is 4x4
2. a tile stays where it is if it is next to a wall, or next to a tile that is staying where it is and that it cannot combine with
3. a tile will move as far as possible in the direction it is pushed
4. two tiles can combine if they are the same
5. two tiles that can combine will always combine if there are no other tiles between them
6. after each move a new tile will appear in a random empty square
7. new tiles will be either a 2 (90%) or 4 (10%)
8. to start, the grid has 1 new tile placed randomly on it
Re: Show HN: 2048.cpp – Play 2048 in directly your terminal
#44Have we really come so far? This has to be full circle, right? First we had a wave of “see what can be done in a browser!” kind of demos. Which at the time was massively impressing, because nobody thought you could seriously use the browser for other things than documents and very slow and clicky applications. These days impressive browser-based experiences are the norm and native software is often accused of being v…
Re: Show HN: 2048.cpp – Play 2048 in directly your terminal
#45Another, in Python: https://github.com/darius/sturm/blob/master/2048.py This one animates the sliding of the pieces. The terminal input-handling might not work in your OS -- I gave up trying to find a nice cross-platform approach to that.
> The terminal input-handling might not work in your OS -- I gave up trying to find a nice cross-platform approach to that. I wrote a terminal version of 2048 back in 2014 [1] and the input-handling works on all platforms I know of. You may want to look at the code: https://github.com/bfontaine/term2048/blob/master/term2048/k... [1]: https://github.com/bfontaine/term2048
Re: Show HN: 2048.cpp – Play 2048 in directly your terminal
#46Re: Show HN: 2048.cpp – Play 2048 in directly your terminal
#47Earlier quoted context omitted.
There is version written in sed, too.
That was mine! https://github.com/themattrix/sed2048
EDIT: Not only because of the technical achievement, but because this little has allowed me to waste some time playing a fun game, while looking very busy to passers-by to whom anything being done in a terminal looks like black magic from The Matrix. ;-) That game can be seriously addictive.