SuperMarioWorldJS (Demo)
Super Mario World built with Phaser.
Featuring ES6, Node.js, Gulp, Browserify, Babel, and Browsersync.
Play the demo online at github.io/SuperMarioWorldJS
- Keyboard Mapping:
- ARROW KEYS - Left, Right, Up, Down
- A - Hold to Run
- S - Jump
- D - Spin Jump
- M - Toggle Mute
SuperMarioWorldJS uses node
and npm
to get up and running:
git clone https://github.com/kevin-chau/SuperMarioWorldJS.git
cd SuperMarioWorldJS
npm install
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.
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
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
.