Implementing 2048 Puzzle Game with Pixi.js and ChatGPT
This is a simple implementation of the classic 2048 game using HTML, CSS, and JavaScript with the PIXI.js library for graphics rendering. The game features a responsive grid that adapts to different screen sizes, smooth tile movements, and a customizable grid size.
This game is built with the assistance of ChatGPT as an experiment of coding with AI
- Responsive Design: The game grid adapts to different screen sizes for a seamless playing experience.
- Smooth Animations: Tile movements are animated using the PIXI.js library for a polished look.
- Customizable Grid Size: Players can choose grid sizes of 4x4, 6x6, or 8x8.
- Win and Lose Conditions: The game ends when the player reaches the specified win condition or can no longer make moves.
- Configuration Controls: Players can customize the grid size and win condition before starting the game.
- Moves Counter: The number of moves made during the game is displayed.
- Reset Game: Players can reset the game at any time.
- Credits and Instructions: Information about the game's creator and instructions for educational purposes are included.
- Clone the repository to your local machine:
git clone https://github.com/Moustafaa91/2048Game.git- Open
home.htmlin your web browser - Choose your preferred grid size and win condition
- Click "Start New Game" and enjoy!
- Use arrow keys to slide tiles in any direction
- Tiles with the same number merge when they collide
- Try to reach the target number to win!
- The game ends when the board is full and no moves are possible
- Grid Size: 4ร4 (Classic), 6ร6 (Medium), or 8ร8 (Easy)
- Win Condition: 256, 512, 1024, or 2048
- Difficulty: Larger grids make the game easier
- PIXI.js Graphics: High-performance 2D rendering
- Modern CSS: Glassmorphism effects and smooth transitions
Contributions are welcome! Feel free to:
- Submit bug reports
- Suggest new features
- Create pull requests
- Improve documentation
This project is open source and available under the MIT License.