2048--: a single-file 2048 with unlimited undo
2048++:An enhanced version based on the classic sudoku game 2048, adding interesting recall and cheat features!!
At a glance
- What is it?
- 2048-- is a browser remake of the tile game 2048 with an undo button that rewinds any number of moves and a hidden fast mode that turns every tile into a 128, packaged as one index.html so it can be opened locally or dropped on any static host. It suits someone who wants a playable 2048 they can hack on, and it is a game rather than a library.
- Who is it for?
- 2048-- fits a player who wants the 2048 loop in a browser tab with an undo button, since the undo is unlimited and rewinds all the way to the start of the game, and since the whole thing is one file that opens with a double click or deploys to any static host.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 180 days ago.
- What is it written in?
- Mainly HTML, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Two features over the classic game
2048-- is described as an enhanced version based on the classic 2048 game, adding recall and cheat features, and the readme summarises it as an enhanced version of the classic 2048 game with an undo mechanic and a fast mode.
The undo is the more serious of the two. The readme lists what it does in plain terms: made a wrong move, no worries, hit the Undo button to go back one step, and you can undo as many times as you like, all the way back to the start. That last clause is the important one, because it means there is no undo budget and no penalty. In the original game, a misjudged move at the 1024 tile is unrecoverable, and the only remedy is to restart and replay the whole sequence. Here the whole run can be walked back.
That changes what the game is. Without undo, 2048 is partly a test of not making mistakes, and the score is a measure of how cleanly you executed. With unlimited undo, the game becomes closer to a pure search problem, since you can explore a line, hit a dead end, and back out of it. Whether that is better is a matter of taste, but it does mean the difficulty curve of the original is largely removed.
The fast mode is explicitly a joke. You enter a magic sequence, left left right right then right right left left, and all the tiles will magically turn into 128. The readme describes it as an Easter egg to skip the early grind, just for fun. It is the kind of feature that exists because the single-file architecture makes it a few lines of code, and it is also the only place in the project where the arrow key handling is treated as an input channel rather than a move.
The badges in the readme confirm the shape of the thing: HTML5, JavaScript, GPL-2.0, and a PRs welcome badge. There is a live demo at 2048.765431.xyz and a screenshot in assets/demo_v2.png. The readme is available in English, Simplified Chinese and Traditional Chinese, and the repository is the same for all three.
One file, and what that buys
The repository listing is short: a .gitignore, DEPLOYMENT.md, LICENSE.txt, README.md, the two translated readmes, an assets/ directory and index.html.
The readme explains the structure. assets/ stores historical project files and media resources such as the demonstration screenshot demo_v2.png. DEPLOYMENT.md is the step-by-step guide for static hosting and VPS deployment. And index.html is the core file, described as containing all HTML, CSS and JS.
The description of that file is unusually emphatic: the game has been extremely stripped down, and all structure, styling, matrix calculation and game mechanics are encapsulated in this single file. The readme attributes the approach to the KISS principle and says it makes distribution and hosting extremely easy.
That claim is borne out by the deployment options. The project has been refactored into a pure frontend single-page application, and Method 1 is to clone the repository or download the zip, unzip it and double-click index.html to start playing in the browser. There is no build step, no package manager, no dev server and no backend. Opening the file from the local filesystem works.
The counterweight is that the CSS and the JavaScript are inline in that same file, so there is no separation between presentation and logic. The readme's customisation section describes it plainly: locate the style block at the top to overhaul theme colours, tile border-radius or typography, and scroll down to the script block where all matrix logic and scoring live.
For a game with a few hundred lines of logic, that is a reasonable trade. It makes the project trivially forkable and trivially hostable, and it makes contributing unusually easy, since a pull request changes one file. It also means there is no test suite, no build pipeline and no module boundary, which matters only if you intend to grow it.
Three ways to deploy it
The readme gives three deployment methods, and the middle one is the recommended path.
Method 1 is local play, described as the easiest: clone the repository with git clone https://github.com/sz30/2048--.git or download the zip, unzip it and double-click index.html.
Method 2 is static site hosting, described as recommended, with zero-cost one-click deployment with a global CDN using hosting platforms. There are deploy buttons for Cloudflare, Vercel and Netlify, and then the manual equivalents for two of them. For GitHub Pages the steps are to fork the repo, go to Settings, then Pages, enable Deploy from a branch selecting main, and save. For Cloudflare Pages the steps are to connect to Git selecting the repo, choose the framework preset None, and deploy.
Choosing None as the framework preset is the one instruction worth understanding. Because the project is a plain HTML file with no build, there is nothing for a framework detector to recognise, and telling the platform there is no framework is what stops it from trying to run a build that does not exist.
Method 3 is the traditional VPS route for advanced users with their own servers, with Serv00 given as the example. Install Nginx, upload index.html to the Nginx web directory, usually /var/www/html, optionally configure a virtual host for the domain and restart the service. The readme points at the built-in DEPLOYMENT.md for the full step-by-step.
The whole surface is worth pausing on. There is no server-side component at all, no scoring backend, no account system and no update mechanism, which means the deployment is genuinely a file copy and the operational burden is close to zero. It also means the game is entirely client-side, and the only state is whatever the page holds in memory.
Where 2048-- is the wrong choice
The first limitation is that it is a game, not a component. There is no build output, no npm package, no importable module, and no API. If you want to embed the mechanic in something else, the single-file design means you would be copying the script block out of index.html and maintaining that copy, which is the opposite of what a package would give you.
The second is that unlimited undo removes the game's tension. This is the deliberate choice, and it is defensible for a casual browser game, but it means the score you get is not comparable with a normal 2048 run and the skill being tested is different from the original. If you play 2048 for the discipline of not misplaying, the cheat is the feature you would want to remove, and it is baked into the same file as the game logic.
The third is that everything is inline and there is no test suite. The repository listing shows no tests directory and no build configuration, so a change to the matrix logic is verified by playing the game. That is proportionate for a small game, and it does mean a contributor cannot rely on any automated check catching a regression.
The fourth is that the project is small and quiet. The readme ends with Last updated: May 2026, the releases are v3.0.0 from 2026-04-26 and v2.0.0 from 2026-03-01, and the last push was on 2026-04-26. The refactor into a single file is the reason for that quietness, and it also means the history of the project lives in a repository that no longer contains most of the old code, since the assets directory is described as historical files.
The fifth is the licence constraint on reuse. The project is GPL-2.0, so anyone who takes this code and modifies it into something distributed has GPL obligations for the result. For a game meant to be forked and tweaked that is usually fine, and for a snippet someone wants to drop into a larger proprietary product it is not.
Editorial conclusion
2048-- fits a player who wants the 2048 loop in a browser tab with an undo button, since the undo is unlimited and rewinds all the way to the start of the game, and since the whole thing is one file that opens with a double click or deploys to any static host. It is the wrong choice if you want a maintained game with accounts, scores or updates, because the repository is a single page with no build and no server, and it is the wrong choice if you want to extend it in a real codebase, because the logic lives inline in one script block. Before adopting it, note that the source is one index.html with the style and script blocks inside, the project is GPL-2.0, and the last push was on 2026-04-26 with v3.0.0 released the same day.
Frequently asked questions
What is 2048--?
It is an enhanced version of the classic 2048 tile game with an undo mechanic and a fast mode. The undo button rewinds one step and can be used as many times as you like, all the way back to the start, and the fast mode turns every tile into a 128 through a hidden arrow key sequence.
How do I play 2048-- locally?
Clone the repository with git clone https://github.com/sz30/2048--.git or download the zip, unzip it and double-click index.html. The project has been refactored into a pure frontend single-page application with all HTML, CSS and JavaScript in that one file, so there is no build step and no server.
How do I deploy 2048-- to a static host?
The readme gives one-click buttons for Cloudflare, Vercel and Netlify, plus manual steps for GitHub Pages, where you fork the repo and enable Deploy from a branch on main, and Cloudflare Pages, where you connect to Git and set the framework preset to None. DEPLOYMENT.md in the repository has the full guide.
How do I customise the 2048-- game?
Everything lives in index.html. The style block at the top holds the theme colours, tile border-radius and typography, and the script block lower down holds the matrix logic and the scoring, so changing the board size or adding a cheat code means editing that one file in a text editor.
What licence is 2048-- released under?
GPL-2.0, with the licence text in LICENSE.txt at the root of the repository. The newest release is v3.0.0 from 2026-04-26 and the last push was on the same day.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/sz30-2048)Was this useful?