Skip to content

turkishfilms/platformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platformer Game

This is a platformer game built using p5.js and Matter.js.

Installation

Before running the game, make sure you have Node.js installed on your machine. Then, follow these steps:

  1. Clone this repository to your local machine.

git clone https://github.com/turkishfilms/platformer.git

  1. Navigate to the project directory in your terminal.

cd platformer

  1. Run the following command to install the necessary dependencies:
npm install

Usage

To start the game execute the command:

npm start

Then open localhost port 3011 (127.0.0.1:3011) in a web browser.

Controls

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.

Files Structure

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.

Dependencies

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.

Credits

This game was created by CodingGang.

About

Heng and Hsings first platformer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •