Skip to content

ThomasFraserDev/2048

Repository files navigation

2048

React Vite Tailwind CSS Node.js License: MIT

An implementation of the 2048 game, with more in depth stats and modes/modifiers. The standard game is played on a 4x4 board, starting with two randomly placed tiles and more generated after each move. Merge two tiles with the same number into one to increase your score, and the game ends when no more moves are possible. This project was built with React, Vite and Tailwind CSS and features multiple game modes, themes, modifiers and advanced stats.

Screenshots

Tropical theme limitless screenshot Christmas theme limited screenshot Default theme timed screenshot

How to play

  1. Use the arrow keys to shift the tiles on the board
  2. Tiles with the same value will merge when they collide, increasing score
  3. After each move, a new 2 or 4 value tile will randomly appear on the board
  4. Aim to reach the highest score as possible!

Features

Game Modes

  • Limitless Mode - Aim for the highest score, with infinite moves and time
  • Limited Mode - Aim for the highest score, with only 50 moves
  • Timed Mode - Aim for the highest score, with only 60 seconds

Themes

  • Default
  • Christmas
  • Tropical

Modifiers

  • Default
  • Spin To Win
  • Upside Down

Stats

  • Score
  • Moves
  • Average Score Per Move
  • Average Tile Value
  • Last Move
  • Last Move Score
  • Best Tile
  • Highest Score

Upcoming Features

  • More themes
  • More modifiers

Download and Run

Prerequisites

  • Node.js 18+ and npm

Run Locally

git clone https://github.com/ThomasFraserDev/2048.git
cd 2048
npm install
npm run dev

Contributing

Contributions are welcome! :]

If you’d like to help improve this project, please follow these steps:

  1. Fork the repository and create a new branch from main.
  2. For UI changes, screenshots or short clips are encouraged.
  3. Make sure the project runs locally:
npm install
npm run dev
  1. Open a Pull Request with:
  • A clear description of what you changed or added
  • The reasoning behind it

If you’re unsure about an idea or want feedback before starting, feel free to open an issue to discuss it first.

Thanks for helping make this 2048 implementation better! 💜

License

This software is licensed under the MIT license.

About

An implementation of the 2048 game, complete with extended stats, modes and modifiers.

Topics

Resources

License

Stars

Watchers

Forks