Skip to content

obiot/mario-2d-jumps-box2dcore-melonjs

Repository files navigation

Mario 2D Jumps (melonJS x @Box2D/core edition)


a port of the "mario-2d-jumps-box2dcore-webgl-js" demo by 8observer8 that showcase integration of melonJS with @box2d/core.

Screenshot 2023-07-28 at 10 27 46 AM

Description

a tiny mario 2d platformer game built with melonJS and the @box2d/core physics engine that showcase key features of melonJS :

  • WebGL rendering
  • integration with Box2D physics engine (as part of this demo)
  • Tilemap integration
  • Texture packing
  • Bitmap Font

Note: this is a proof of concept, not a accurate implementation of a super mario game physic & logic

Building the demo

If you wish to build the demo and expand on the current features, you will need to install :

  • The Node.js JavaScript runtime and the NPM package manager

then

  • npm run dev to start the dev server on watch mode at localhost:9000
  • npm run build to generate a minified, production-ready build, in the docs folder

Note: building the project under the docs folder will trigger the workflow for the GitHub Pages deployment.

To Do List

  • improve player movement and jumping logic to mimic super mario "real physic"
  • add enemies and collectables with proper contact/collision handling
  • add parallax background and other details to the mini level

Credits