Skip to content

fliklab/p5js-jumping-game

Repository files navigation

Game Project Readme

Project Overview

This project aims to implement a 2D side-scrolling jump game. Players control a character to avoid various obstacles and progress through stages, with increasing difficulty as the game progresses.

Features

  • Game Start: Press the spacebar to start the game.
  • Character Control: Use the spacebar for jumping and double jumping.
  • Obstacle Avoidance: Navigate through various obstacles as you progress.
  • Stage Progression: Complete each stage and move on to the next.
  • Game End: The game displays a final ending screen upon completing all stages.

Technology Stack

  • JavaScript: Implementation of game logic.
  • p5.js: Handling graphics and animations.
  • HTML/CSS: Construction of the game interface.

File Structure

game-project/
│
├── index.html      # Main HTML file of the game
├── style.css       # Game stylesheet
├── script.js       # Main game logic
│
├── assets/         # Game assets (images, sounds, etc.)
│   ├── images/     # Images for character, background, obstacles
│   └── sounds/     # Game music and sound effects
│
├── classes/        # Game classes (character, obstacle, etc.)
│   ├── character.js
│   ├── obstacle.js
│   └── background.js
│
└── lib/            # External libraries (e.g., p5.js)

Installation and Execution

  1. Clone the repository:
    git clone [repository URL]
    
  2. Open the index file: Open the index.html file in a web browser to start the game.

Developer Guide

  • Modify or add game logic in script.js.
  • To add new obstacles or character features, edit or create appropriate class files in classes/.
  • Manage graphic and asset changes in the assets/ folder.

Future Improvements

  • Optimization for mobile environments.
  • Implementation of user scoring system and leaderboard.
  • Development of additional stages and characters.

This README is written to provide a basic overview, structure, and usage of the project. Contents may be added or changed as the project progresses.

Releases

No releases published

Packages

No packages published