Just like few others here, I wanted keyboard shortcuts so I just hacked it quickly. Will break if DOM classes change, but author should implement something better.
You have a pause in there where the tiles take a moment. Please let us use that pause to rotate a second time before the tiles fall so we can also get the pieces to move across the board rather than just slide parallel.
I think both modes would make for interesting gameplay - one where you can rotate 180 degrees, and one where you're restricted to 90 degrees at a time (kind of like those Game & Watch games with 'Game A' and 'Game B').
Very fun take on the old 2048 concept, but I'd better stop playing now otherwise I'll be on it all morning!
My only suggestion is to add control by cursor keys in addition to mouse.
I think the restrictions make the game more interesting. However the pause is a bit annoying. If you make a move before the animation finished then it should either speed up the animation or skip it.
I'd be down as heck for a 2D physx/femfx-accelerated 2048.
I have no idea what it would look like, but it'd open the pool for strat on solving the puzzles I think. May need to play around a bit with the shapes and materials to make it more interesting though.
Well the original 2048 has new tiles popping up constantly, this one doesn't. But indeed, with 180 degrees rotation this one would just be an easier 2048
That was fun! But I was able to solve the puzzle by continually rotating the same direction.
I bet this was tried, but what's play like with the same game mechanics of this version, but with the original game play, where each move gives you a new block?
> But I was able to solve the puzzle by continually rotating the same direction.
I’m not gonna ruin the original game’s mechanics for anyone who hasn’t already had them ruined, but I will say I recently tried exactly this strategy in the original and it gets you surprisingly far. But it’s definitely not a winning strategy.
I've spent unhealthy amounts of time playing 2048, and so far the best strategy I have come up with is never swipe up unless absolutely necessary and even then swiping up will likely cause the game to end in the next few moves (unless you get lucky and resolve the stuck block in some way)
In 2048 I find alternating between right and down swipes goes really far. Or any other 2 adjacent directions. I know I made it to 8192 at least once and perhaps 16384 - not by just alternating swipes of course.
2048 was similarly flawed (cycle up, right, down, left to win), so I doubt a new block on each turn will solve the issue any more than it did for the original.
Mhh it could be tried yes! It is a small idea I need to improve!
Normally, you would not have the best solution if you rotate in the same direction, but yes it's not really fun to win even doing that :/ Thanks!
I’ve been obsessively playing another 2048 variant which was a recent Show HN[1], and has confounded me since. Yours has a much gentler learning curve and obviously isn’t designed to be unbeatable. Rotating the whole board will probably continue confounding me in entirely different ways.
I feel like a more interesting piece of code would be one that generated random (but solvable) puzzles and showed what the minimum number of moves was to solve them.
Cool game.
```
const rotate = (direction) => { const directions = {counterclockwise: 0, clockwise: 1}; const buttons = Array.from(document.querySelector('.mt-16.flex.items-center.justify-between.w-72.h-12.px-2').querySelectorAll('div')).filter(el => el.className === ''); buttons[directions[direction]].click(); }
document.addEventListener('keydown', (ev) => { switch (ev.key) { case 'ArrowLeft': rotate('counterclockwise'); break; case 'ArrowRight': rotate('clockwise'); break; } });
```