During game jams I had used various Phaser templates to get started. These handle some of the boiler plate code and have a way to run the game. After Global Game Jam 2020 I decided to create my own one based on everything I had learned and put in all the things I wanted in a polished way.

I wanted it to be really easy to get setup for a new person so it is just three steps: Check out the code, npm install then npm run start. This live updates so changes can be tested quickly and seamlessly. Often there are a few build options but I kept it simple with npm run build to create the output. It even creates a zip since I am usually uploading to itch. The games I had made followed a pretty similar pattern of having an instruction screen, the main game play, end screen, credits and licenses. I added all of these in so there would not be a mad rush at the end trying to squeeze in credits. It also let me take the time to do interesting text effects and have an easy layout for different screen sizes. There is also a boot strap screen to show a loading bar while everything is loaded.

The example game is rolling around as a piece of toast collecting coins. This let me have examples of different input methods which are abstracted away. It also uses events to pass information around rather than coupling elements together. There are also a number of code quality tools such as TypeScript for types, Jest for tests, eslint for linting and prettier for the formatting. The goal of all of these are that they help keep the quality up through the jam so you are not dealing with avoidable bugs near the end.

I was pretty happy how it turned out and it has been a fun project to iterate on. It lets me focus on the gameplay with all the tooling happily in the background. It was also a great chance to try out a number of repository level tools. Whitesource checks the security of the packages and keeps them up to date, codebeat and SonarQube keep an eye on the quality and Shields.io provides all the nice badges. If you are looking for a template for your next gamejam then check it out on GitHub.