Skip to content

laraelfar/2048

 
 

Repository files navigation

2048

A small clone of 1024, based on Saming's 2048 (also a clone).

Made just for fun. Play it here!

The official app can also be found on the Play Store and App Store!

Contributions

Anna Harren and sigod are maintainers for this repository.

Other notable contributors:

Many thanks to rayhaanj, Mechazawa, grant, remram44 and ghoullier for the many other good contributions.

Screenshot

Screenshot

That screenshot is fake, by the way. I never reached 2048 😄

Contributing

Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into master! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process.

You can find the same information in the contributing guide.

License

2048 is licensed under the MIT license.

Donations

I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: 1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i. Thank you very much!

Gameplay

2048 is played on a plain 4×4 grid, with numbered tiles that slide when a player moves them using the four arrow keys. Every turn, a new tile randomly appears in an empty spot on the board with a value of either 2 or 4. Tiles slide as far as possible in the chosen direction until they are stopped by either another tile or the edge of the grid. If two tiles of the same number collide while moving, they will merge into a tile with the total value of the two tiles that collided. The resulting tile cannot merge with another tile again in the same move. Higher-scoring tiles emit a soft glow, and the highest possible tile is 131,072.

If a move causes three consecutive tiles of the same value to slide together, only the two tiles farthest along the direction of motion will combine. If all four spaces in a row or column are filled with tiles of the same value, a move parallel to that row/column will combine the first two and last two. A scoreboard on the upper-right keeps track of the user's score. The user's score starts at zero, and is increased whenever two tiles combine, by the value of the new tile.

The game is won when a tile with a value of 2048 appears on the board, hence the name of the game. After reaching the 2048 tile, players can continue to play (beyond the 2048 tile) to reach higher scores. When the player has no legal moves (there are no empty spaces and no adjacent tiles with the same value), the game ends.

Tutorial in French

Demonstration in French

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 38.1%
  • CSS 35.3%
  • SCSS 19.6%
  • HTML 6.5%
  • Ruby 0.5%