Skip to content
/ 2048 Public

Modern 2048 game built with React + TypeScript. Features smooth animations, touch controls, and responsive design.

License

Notifications You must be signed in to change notification settings

Ali-R-dev/2048

Repository files navigation

2048 Game

A modern React implementation of the classic 2048 puzzle game. This is a reimagined version of the original game created by Gabriele Cirulli, built with modern web technologies.

Screenshots

Gameplay Screenshot 1 Gameplay Screenshot 2

Play Now

Visit 2048 Game to play online!

Features

  • 🎯 Classic 2048 gameplay mechanics
  • 📱 Responsive design for all devices
  • 🎨 Smooth animations and transitions
  • 🔄 Touch and keyboard controls
  • 💾 Score tracking
  • 🌈 Modern UI with Styled Components

Tech Stack

  • Frontend Framework: React
  • Language: TypeScript
  • State Management: Redux Toolkit
  • Styling: Styled Components
  • Animations: Framer Motion
  • Build Tool: Vite

🚀 Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/2048.git
    cd 2048
  2. Install dependencies:

    npm install
    # or
    yarn
  3. Start the development server:

    npm run dev
    # or
    yarn dev
  4. Open http://localhost:5173 in your browser

🎯 How to Play

  1. Use arrow keys (↑ ↓ ← →) or swipe gestures to move tiles
  2. Tiles with the same number merge when they collide
  3. Create a tile with the number 2048 to win!
  4. Game over when no more moves are possible

🔧 Controls

  • Desktop: Arrow keys
  • Mobile: Swipe gestures
  • New Game: Click/tap "New Game" button

📱 Mobile Support

The game is fully responsive and supports:

  • Touch gestures for tile movement
  • Mobile-optimized layout
  • Smooth animations on mobile devices

🎨 Customization

The game uses a theme system for easy customization:

  • Color schemes
  • Tile sizes
  • Animation parameters
  • Responsive breakpoints

Credits

This game is a reimplementation of 2048 by Gabriele Cirulli. The original game is also open source and available under the MIT License.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Original 2048 game by Gabriele Cirulli
  • React and TypeScript communities
  • All contributors and users

🔗 Links


Made with ❤️ by [Your Name]