Skip to content

kevin-chau/SuperMarioWorldJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperMarioWorldJS (Demo)

Super Mario World built with Phaser.

Screenshot

Featuring ES6, Node.js, Gulp, Browserify, Babel, and Browsersync.

Demo

Play the demo online at github.io/SuperMarioWorldJS

Controls

  • Keyboard Mapping:
    • ARROW KEYS - Left, Right, Up, Down
    • A - Hold to Run
    • S - Jump
    • D - Spin Jump
    • M - Toggle Mute

Installing

SuperMarioWorldJS uses node and npm to get up and running:

git clone https://github.com/kevin-chau/SuperMarioWorldJS.git
cd SuperMarioWorldJS
npm install

Running

To start a development server, simply run :

npm start

By default the port will be set to 3000 so go to the following URL in your browser:

http://localhost:3000

That's it to start playing!

npm start will also run a watch task that continuously monitors the src and static directories, automatically triggering a build process and browser refresh if anything changes.

Building

SuperMarioWorldJS uses gulp to build and minify the source code via UglifyJS. To build the project, run:

npm run production

This will copy the minified scripts to the build/ folder. Additionally, asset images will be copied with lossy compression using pngquant and JSON atlases will be minified using JSON.minify.

To clean the build folder:

gulp clean

Phaser Debug

You can monitor frame rate and other Phaser stats by turning on the Phaser Debug plugin. In src/js/objects/constants.js, change DEBUG_ON: false to DEBUG_ON: true.

To Do List

gist