Skip to content

GamedevJS/Momentum

 
 

Repository files navigation

Momentum

A physics-based platformer game that challenges players to master momentum, timing, and environmental interactions. Built using the Advanced P5.js Platformer Engine.

About the Game

Momentum is all about understanding and controlling physics as you navigate through challenging levels. Use your momentum to break through glass barriers, swing on ropes, bounce off trampolines, and balance on seesaws. Each level introduces new mechanics that build upon your skills.

The game emphasizes the importance of maintaining and controlling momentum - consecutive jumps reduce your speed, downhill slopes increase it, and precise timing is required to overcome obstacles.

Features

  • Physics-Based Gameplay: Master realistic momentum and inertia
  • Diverse Mechanics: Wall jumping, rope swinging, trampolines, and more
  • Challenging Level Design: Test your skills with increasingly complex challenges
  • Dynamic Obstacles: Interact with seesaws, breakable glass, and moving platforms
  • Responsive Controls: Precise movement with momentum-based consequences

Controls

  • Arrow Keys/WASD: Move the player
  • Up Arrow/W/Space: Jump
  • E: Grab/release ropes
  • Escape: Restart the current level

Development

Momentum was built using JavaScript with the P5.js library for rendering and Matter.js for physics simulation. The game is based on the Advanced P5.js Platformer Engine but has been extensively customized with:

  • Enhanced momentum physics
  • Improved rope swinging mechanics
  • Realistic slope movement
  • Breakable glass with particle effects
  • Dynamic seesaw platforms
  • Consecutive jump penalties
  • And much more!

Installing

run npm i to install all dependencies.

Getting Started

To play the game, simply run npm run dev.

For developers interested in the code structure:

1. Configuring the environment - docs/config.md

2. Understanding The Base Variables - docs/vars.md

3. Understanding Matter.js Bodies - docs/bodies.md

4. Creating Levels - docs/levels.md

5. Customizing the Player - docs/player.md

6. Customizing & Creating Blocks - docs/blocks.md


Acknowledgments

This game was built using the Advanced P5.js Platformer Engine as a foundation, with significant customizations and gameplay enhancements.

License

This project is available under the MIT License. Feel free to use, modify, and distribute as you see fit.

About

an entry for the 2025 gamedev.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.4%
  • Other 0.6%