I’ve created and open sourced Enclave Games’ starter template for building HTML5 games with Phaser and I hope you can use it in your next gamedev project.
I’m building my games with Phaser and the more projects and demos I have, and work on them simultaneously, the harder it is to keep track of the “latest core” with helper functions. Every time I started a new one I was usually picking one of the current projects and quickly throwing away most of the code, and then realizing that some parts of it that was left was outdated compared to other experiments. So, to keep track of that I decided to finally create a starter pack with the basic template that I can reuse for the new games.
The template itself contains a bunch of useful stuff and is organized in states. You’ve got a main menu with buttons, audio and highscore management, paused and game over screens, with some extra tweens here and there. The graphic assets were created by Ewa, and I built that template mainly for my own, but as doing open source gamedev is my thing anyway, I decided to post the source code of the Enclave Phaser Template on GitHub - check out the online demo to see how it works. It’s my approach in doing things and you may do them differently, but feel free to send a pull request if you have ideas on how to improve it.
The first project using the template is the new version of Captain Rogers, which is a story on it’s own. Now every new feature that can be useful for all the next games will be pulled into the template right away. Let me know if you want to use it and need help with or have any questions.