This is a platformer game built using p5.js and Matter.js.
Before running the game, make sure you have Node.js installed on your machine. Then, follow these steps:
- Clone this repository to your local machine.
git clone https://github.com/turkishfilms/platformer.git
- Navigate to the project directory in your terminal.
cd platformer
- Run the following command to install the necessary dependencies:
npm install
To start the game execute the command:
npm start
Then open localhost port 3011 (127.0.0.1:3011) in a web browser.
Use the 'd' key to move the player right.
Use the 'a' key to move the player left.
Use the 'w' key to make the player jump.
Use the 'p' key to advance to the next level.
Use the 'o' key to go to the previous level.
Use the 'e' key to reset the level.
Press 'q' to pause/unpause the game.
index.html: HTML file containing the game structure and script references.
static/js: Directory containing JavaScript files for game logic.
static/js/class: Directory containing JavaScript files for various game classes.
static/js/level: Directory containing JavaScript files defining level data and obstacles.
static/js/constants.js: File containing constant values used in the game.
static/js/index.js: Main JavaScript file initializing the game.
package.json: File containing metadata and dependencies information.
README.md: This file, containing information about the game and how to run it.
This project uses the following dependencies:
p5.js: JavaScript library for creative coding and visualization.
Matter.js: JavaScript physics engine for simulating rigid bodies.
Express: Fast, unopinionated, minimalist web framework for Node.js.
This game was created by CodingGang.