Creation of an HTML5 game like Rise Above using Phaser and Arcade Physics – step 2

Today it’s time to see the second step of the creation of Rise Above game. In step 1 we saw the basic mechanics of the game, now we’ll see how to create the main feature of the game: the ship rising up and going down when you think you can’t control it anymore.

While in the original game you take back your ship down with a swipe, here we will use a double click/tap.

That’s what we are going to create:

Click or tap to move the ship from one side to another, double click to take it back down and have a limited time while the ship will be indestructible.

The whole “rise and fall back” thing is managed by tweens, one which makes the ship slowly rise above, and one which makes the ship quickly fall down.

Here is the source code with new lines highlighted:

Now we are close to recreate the whole original game: during next step I’ll show you how to add final touches. Meanwhile, download the source code.