
2048
The open-source source code for the 2048 sliding-tile puzzle game, playable in a browser.
- Stars
- 13.5k
- Forks
- 17.6k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 2.0 years ago
- Type
- App
No commits in over a year — check for forks or alternatives before adopting.
What it is
This repository holds the source code for 2048, a number puzzle game where you slide tiles together to build a 2048 tile. The README says it is a small clone of the mobile game 1024 and was made just for fun. You can play the game in a browser at the author's site, and the code is MIT licensed, so anyone can read or reuse it.
- Play the game in a browser at the project's hosted page
- Read the JavaScript source to see how tile sliding and merging can be implemented
- Fork the repository and modify the game rules or look
- Study mobile swipe handling, based on the contributor notes in the README
Great for
- People who want to play 2048 without installing anything, via the hosted site
- Developers who want a small, readable JavaScript browser game to study
- Students learning how simple game logic and mobile swipe handling can be built
- Anyone who wants to fork a short, self-contained game as a starting point
Not ideal for
- People looking for a large, actively developed framework: the README describes the project as made for fun, with no release published and a last push in October 2024
- Developers who need a production-grade game engine, since the README does not describe any engine or tooling beyond the game itself
How to get it
- 1
Clone and build from source
Clone the repository
git clone https://github.com/gabrielecirulli/2048.git - 2
Run it
- Clone the repository with git.
- Open the index.html file in a web browser, or use the hosted version at play2048.co.
- Use the arrow keys or swipe to move tiles and combine matching numbers.
- 3
Get the most out of it
- Read the CONTRIBUTING.md guide if you plan to send changes back upstream
- Check the best score storage feature, which the README credits to a contributor
- Use the MIT license terms in LICENSE.txt if you reuse the code
Downloads
Strengths
- Small, self-contained codebase that is easy to read for a beginner programmer
- MIT license allows reuse and modification
- Widely known project with a long history of community contributions listed in the README
Trade-offs
- The README is brief and does not document a setup process or project structure
- No release is published, so there is no versioned download to rely on
- Maintainers describe it as made for fun, so support and updates are not guaranteed
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| 2048 (this) | 13.5k | App | beginner | 2.0 years ago | People who want to play 2048 without installing anything, via the hosted site |
| osu | 19.4k | App | intermediate | 4 days ago | Rhythm game fans who want a free, open-source client |
| Craft | 11.1k | App | intermediate | 2.6 years ago | Developers who want to read a compact, real example of a voxel game in C |
| pixijs | 48.6k | Library | intermediate | 6 days ago | Web developers building interactive 2D graphics or animations |
| flame | 10.8k | Library | intermediate | 4 days ago | Flutter developers who want to add a game to an app |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.