Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.84 KB

README.md

File metadata and controls

81 lines (55 loc) · 2.84 KB

JS2048

Introduction

Welcome to the JS2048 project, a JavaScript-based implementation of the popular 2048 puzzle game. This project provides an interactive and engaging experience where players combine numbered tiles on a 4x4 grid to reach the 2048 tile. The game is developed using modern web technologies and aims to offer a seamless user experience.

Key Features

  • Smooth Tile Movement: Implements fluid animations for tile movements and merges.
  • Responsive Design: Ensures the game is playable on various devices, including desktops, tablets, and mobiles.
  • Score Tracking: Keeps track of the player's score and updates it in real-time.
  • Win and Lose Conditions: Alerts the player when they win or lose the game with appropriate messages.
  • Restart Functionality: Allows players to restart the game at any time.

Challenges

Developing JS2048 posed several challenges, particularly around implementing the game's core mechanics and ensuring a smooth user experience.

Key Challenges:

  1. Tile Movement and Merging: Implementing the logic for moving and merging tiles required careful handling to ensure accuracy and performance.
  2. Responsive Design: Making the game playable and visually appealing on different screen sizes involved extensive testing and adjustments.
  3. Animation Performance: Ensuring smooth animations for tile movements and merges was crucial for a good user experience.
  4. Game State Management: Keeping track of the game state, including the board configuration, score, and win/lose conditions, needed efficient and bug-free handling.

Technical Requirements

To run this project, you will need:

  • Modern web browser (latest versions of Chrome, Firefox, Safari, or Edge)
  • Node.js (version 14.x or newer)
  • NPM (version 6.x or newer)

Installation and Setup

To install the project and run it locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/username/js2048.git
  2. Navigate to the project directory:

    cd js2048
  3. Install dependencies:

    npm install
  4. Start the local development server:

    npm start

Usage

After starting the project, it will be available at http://localhost:8080. You can use this project to play the game and interact with interface elements.

Example

Technologies Used

This project was built using the following technologies:

  • HTML5: For structuring the content.
  • CSS3: For styling the game and ensuring responsiveness.
  • JavaScript (ES6): For implementing the game logic and interactivity.
  • Git: For version control.
  • GitHub: For hosting the repository and demo.

Design Specifications

  • Design Sizes:
    • Desktop: 1280px
    • Tablet: 640px
    • Mobile: > 320px