This is a basic bootstrap to start developing games using the HTML5 game framework, Phaser.
Originally made for the SESA Game Jam 2014 by Chris Morgan.
To use this bootstrap you’ll need to install a few things before you have a working copy of the game.
Navigate into your workspace directory.
Run:
git clone [email protected]:ausesa/phaser-bootstrap.git
Windows users will need to install git. Despite my hatred for graphical clients, I recommend the Github client.
This can usually be done in one step, see here for details.
Windows users will have a harder time, but there are install instructions on the site.
Windows users, open up the node.js terminal client to do this. Also, you might not have to use sudo
.
Navigate to the cloned repo’s directory.
Run:
sudo npm install -g grunt-cli
npm install
Run:
grunt coffee
This will compile all the .Coffee
files in the src directory into build/game.js
.
Run:
node server.js
This will run a server so you can run the game in a browser.
Open your browser and enter localhost:12345
into the address bar.
To constantly compile the CoffeeScript, run:
grunt watch
This will watch the files in the src folder, if they change it will recompile them and output any errors that occur.
Here are some documentation links to help you with development and debugging:
- Phaser Documentation
- Phaser Examples
- CoffeeScript syntax & documentation
- Awesome “Book” on CoffeeScript
- Grunt Documentation
- Google <= The most important one!
- Pigvane, a game I made (along with Fred and Oscar) for Global Game Jam 2014.
Have fun!