Skip to content

Moustafaa91/2048Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 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 the index.html file in a web browser.
  2. Play the game! Use the arrow keys to move tiles and try to reach the specified win condition.

Configuration

  • Customize the grid size by selecting 4x4, 6x6, 8x8, or 10x10 from the dropdown list.
  • Choose the win condition (256, 512, 1024, or 2048) from the second dropdown list.
  • Click the "Start Game" button to initialize the game with the selected configurations.

Game Controls

  • Arrow Keys: Move tiles in the corresponding direction.
  • Reset Button: Resets the game to the initial state.

Contributions

Contributions are welcome! If you'd like to contribute to the development of this game, feel free to submit a pull request.

Credits

Developed by ChatGPT Assistant for educational purposes.

Releases

No releases published

Packages

No packages published