Making Your First Phaser 3 Game in Modern Javascript

Making Your First Phaser 3 Game in Modern Javascript - Part 1
by on 5 minute read updated on

Games can be some of the most complicated types of software you can create. And the most fun. It helps to use modern best practices to avoid messy bugs or more easily fix ones that come up. Doing so saves you time and headaches. Most importantly it will help you make a better game. In this article, we will show you how to create games in Phaser 3 using modern JavaScript and best practices.

Making Your First Phaser 3 Game in Modern Javascript - Part 2
by on 5 minute read

We created a new project and added a GameScene in Part 1. Now we will create platforms and a player character using modern JavaScript. We also apply the DRY or Don't Repeat Yourself principle to string literals.

Making Your First Phaser 3 Game in Modern Javascript - Part 3
by on 4 minute read updated on

In Part 2 we added platforms and created a player character. Here we will handle collisions between the player and platforms as well as add keyboard controls using modern JavaScript. We also discuss pure functions and unintended side effects.

Making Your First Phaser 3 Game in Modern Javascript - Part 4
by on 6 minute read

With collisions between the player and platforms taken care of in Part 3, we will tackle creating and keeping score of collected stars. We deviate from the official Phaser guide in how we handle score logic and display using a separate class.

Making Your First Phaser 3 Game in Modern Javascript - Part 5
by on 7 minute read

In this final part we make the game more exciting with bombs created by a BombSpawner class. The code looks significantly different from the official Phaser 3 guide as we take everything we've learned in previous parts and apply it!