No longer under active development This has now been made into a Slush template which can be found here
A starting point to build a game with Phaser, using CommonJS modules to organise your code.
Parts included:
- Phaser: to build your games with
- Browserify: to organise your code in a CommonJS format
- BrowserSync: to test your code
You will need to have node, gulp and slush setup on your machine.
Navigate to where you want to develop your game (you can create a new folder too if you like).
$ cd /path/to/folder
$ mkdir myGreatGame
$ cd ./myGreatGame
Then call the slush template to begin.
$ slush phaser-node
Finally run gulp to launch a server.
$ gulp
When editing, make sure you update the files within the src
directory. These files will then be compressed and added to the bin
directory ready for publishing.
The JavaScript files have been set in a modular way using browserify. This means you can treat the files like you do with node
modules.
Happy coding!