dschwertfeger Posted August 5, 2014 Share Posted August 5, 2014 So, I wanted to write a game with Phaser. I came across some boilerplate projects and Yeoman generators but somehow I always missed something. I'll admit that I had pretty particular demands, though. This is when I spent a day making my own Yeoman generator which I'd like to share with you. Maybe someone else was not completely satisfied with available generators or boilerplate projects either and will find this useful. This is a Yeoman generator for writing HTML5 games with the Phaser game framework in CoffeeScript inspired by generator-phaser-official by codevinsky. It inlcudes a fantastic Gulp + Browserify build system based on the gulp-starter project by @greypants. You can install the generator through npm:$ npm install -g generator-phaser-coffee-gulpIf you don't have Yeoman and Gulp installed, yet, now is the time:$ npm install -g yo gulpWith all the necessary tools installed you can go ahead and create a new directory for your game project:$ mkdir my-awesome-phaser-game && cd $_Within your project folder you can finally invoke the Yeoman generator:$ yo phaser-coffee-gulpThe generator will ask you a few questions about the name of the game, the phaser version to use and the game display dimensions. Once you answered those, it will bootstrap your game project and generate all the required files. When the generator is done, you can run the local development server with Gulp:$ gulpOn MacOS, this will automagically open the URL of your game in Chrome if Chrome is installed. The development server is not only accessible on your localhost but even on other devices in your network. The livereload feature will push code changes to all your devices and reload all connected browsers. This means that you can develop and test your game on multiple devices at the same time. Enjoy! eguneys 1 Link to comment Share on other sites More sharing options...
Nepoxx Posted September 3, 2014 Share Posted September 3, 2014 No responses yet?!This is awesome! I'm a little scared of trying it since I never used coffee script, nor gulp, but it seems like a good way to start using those. Great work Link to comment Share on other sites More sharing options...
Recommended Posts