Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

2048Game

Implementing 2048 Puzzle Game with Pixi.js and ChatGPT

Description

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

Features

  • 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.

๐Ÿš€ Getting Started

  1. Clone the repository to your local machine:
git clone https://github.com/Moustafaa91/2048Game.git
  1. Open home.html in your web browser
  2. Choose your preferred grid size and win condition
  3. Click "Start New Game" and enjoy!

๐ŸŽฎ How to Play

  • 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

โš™๏ธ Configuration Options

  • 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

๐Ÿ› ๏ธ Technical Features

  • PIXI.js Graphics: High-performance 2D rendering
  • Modern CSS: Glassmorphism effects and smooth transitions

๐Ÿค Contributing

Contributions are welcome! Feel free to:

  • Submit bug reports
  • Suggest new features
  • Create pull requests
  • Improve documentation

๐Ÿ“„ License

This project is open source and available under the MIT License.

About

Implementing 2048 Puzzle Game with Pixi.js and ChatGPT

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages