Create a HTML5 game like Space is Key using Phaser, tweens and ARCADE physics

With the last Phaser official update at version 2.6.2, while we wait for Phaser v3 it’s time to update old prototypes made with previous Phaser versions to 2.6.2 in order to have an up-to-date series of prototypes.

Space is Key prototype was made with Phaser almost three years ago using Phaser 1.1.3 – LOL – and its source code looks a bit obsolete now.

So this is the first prototype to be rebuilt, using ARCADE physics and tweens rather than frame by frame operations I used in the original prototype

This is the prototype we are going to build:

Click or touch the canvas to make the square jump.

The completely rewritten source code is here, with full comments:

This code is more readable and more modern, next time I will add obstacles, meanwhile you can download the source code.