An open API service indexing awesome lists of open source software.

https://github.com/lostjared/generic.puzzle.game.javascript

conversion of my Rust Demo "Generic Puzzle Game" to HTML5/JavaScript
https://github.com/lostjared/generic.puzzle.game.javascript

blocks javascript-game puzzle puzzlegame

Last synced: 9 months ago
JSON representation

conversion of my Rust Demo "Generic Puzzle Game" to HTML5/JavaScript

Awesome Lists containing this project

README

          

# Generic Puzzle Game

![screenshot](https://github.com/lostjared/Generic.Puzzle.Game.JavaScript/blob/main/screenshot.jpg)

This is a JavaScript implementation of a generic puzzle game that involves managing a grid and manipulating blocks. The game features different levels, a scoring system, and resets the game if blocks fill up to the top of the grid.

## Features

- Dynamic grid and block management
- Scoring and leveling system
- Game reset functionality
- Responsive to keyboard input for block movement

## Game Controls

- **Arrow Up**: Rotate the block colors
- **Arrow Down**: Move the block down
- **Arrow Left**: Move the block left
- **Arrow Right**: Move the block right
- **A Key**: Shift Left
- **S Key**: Shift Right

## Installation

1. Download or clone the repository.
2. Ensure you have a local web server setup to serve the game files, or simply open the `index.html` file in a browser.

## File Structure

- `index.html`: The main HTML file that sets up the canvas and includes the JavaScript.
- `puzzle.js`: Contains the game logic and rendering functions.
- `img_converted/`: Directory containing all the game graphics.

## Usage

Open `index.html` in a web browser to start the game. Use the arrow keys to control the blocks.

## Development

### Prerequisites

- A modern web browser
- A text editor or IDE for editing HTML and JavaScript files

### Running the Game

1. Open `index.html` in your web browser.
2. Use the arrow keys to control the game blocks.

### Editing the Game

1. Open `puzzle.js` to modify the game logic.
2. Open `index.html` to modify the HTML structure or styles.

## Contributing

Feel free to fork this repository, make improvements, and submit pull requests. All contributions are welcome!

## License

This project is licensed under the MIT License.