Skip to content

amjadkamara/p5js-platformer

Repository files navigation

p5.js Platformer Game

Demo Screenshot

Project Overview

This project is a platformer game built using p5.js. Developed as part of my university of London coursework, the game combines dynamic graphics, interactive gameplay, and engaging sound effects to create a unique gaming experience. It features various in-game elements such as enemy drones, collectables, canyons, and platforms, all brought to life with creative animations and responsive controls.

Key Features

  1. Dynamic Environments:

    • Realistic night sky with moving clouds and detailed mountain ranges.
    • Animated backgrounds with smoke effects and glowing particles.
  2. Interactive Gameplay:

    • Responsive character controls including movement, jumping, and laser firing.
    • Challenging obstacles such as canyons, platforms, and enemy drones.
    • Game state management for game over scenarios and level completion.
  3. Audio-Visual Effects:

    • Integrated background music and sound effects (jump, laser, death, etc.).
    • Immersive visual animations that enhance the overall gameplay experience.
  4. Mission Briefing & Story Elements:

    • In-game mission briefings provide narrative context and objectives.
    • State-driven gameplay that evolves as the player interacts with the game world.

How the Game Works

  1. Game Initialization:

    • The game sets up a canvas and preloads all assets (images, sounds, and video).
    • It initializes in-game elements like clouds, mountains, collectables, and drones.
  2. Gameplay Mechanics:

    • The character is controlled using the keyboard (A/D for movement, W for jump, Enter for laser fire).
    • Collision detection, enemy interactions, and platform physics ensure challenging gameplay.
    • The game continuously updates the score, lives, and in-game states.
  3. Audio-Visual Integration:

    • Sound effects are triggered by player actions and game events.
    • Visual effects such as glowing particles and dynamic lighting enhance immersion.

Installation

  1. Clone the Repository
    git clone https://github.com/yourusername/p5js-platformer-game.git
    

Navigate to the Project Directory

cd p5js-platformer-game

Run the Game

Open the index.html file in your web browser. Alternatively, use a local development server (for example, the Live Server extension in VS Code) to run the project.

How to Play

  • Movement: Use the A and D keys to move left and right.
  • Jump: Press W to jump.
  • Fire Laser: Press the Enter key while moving to fire a laser.
  • Help Screen: Press H to toggle the help screen.
  • Restart: Press Space after a game over to restart the game.

Technologies Used

  • p5.js: For interactive graphics and game mechanics.
  • JavaScript: The core programming language for game logic.
  • HTML/CSS: For structuring and styling the web page.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Special thanks to my university course instructors for their guidance and inspiration throughout this project.

About

A dynamic platformer game built with p5.js. Featuring interactive gameplay, vibrant visuals, sound effects, and creative challenges, this project showcases a variety of game mechanics including collectables, drones, and laser firing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors