henriquelalves / phaser-boilerplate

A Phaser project boilerplate with some built-in functionality.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phaser Boilerplate

A Phaser project boilerplate using Node, some assets loading automation, and dynamic screen resolution settings.

Instructions

  1. Clone this repo (git clone [this repo address])
  2. Install node modules (npm install)
  3. Change BOILERPLATE project name on index.html and package.json.
  4. Change screen resolution settings on boot.js state.
  5. ???
  6. Profit!

How to use

  • Assets loading: This is done automatically by the use of jsonfy.py; it gets everything under the assets/ folder on a .json file-tree structure, and the preloader.js state gets this json to load everything without the need of manually loading each and every file. The default boilerplate only loads .png (you can load spritesheets by naming them "spritesheet"; check preloader.js for more information), but you can easily add more extensions changing the source.
  • Game Resolution: The solution I found to get the most of different devices resolutions was to use this Phaser tutorial.
  • Testing the game: Just npm start!

Credits

About

A Phaser project boilerplate with some built-in functionality.

License:MIT License


Languages

Language:JavaScript 66.4%Language:HTML 18.0%Language:Python 12.8%Language:CSS 2.9%