“Mike Dangers” HTML5 game engine made with Phaser and ARCADE physics – adding spikes, death and more features

Here we go with another step in the making of Mike Dangers.

Since previous step, several features have been added, and a bug was fixed. Let’s see what changed:

* Each floor now contains one or two deadly spikes, which use object pooling to be placed on the screen

* Some code has been changed to have more than a diamond on each floor, exactly as for the spikes

* Ladders now are randomly placed on the floors

* The entire routine which handles a floor when it “falls down” has been rewritten

* Spikes are deadly and if the player touches a spike, it’s game over with a “fall down the tower” animation

* The bug having sometimes a floor with two stairs and another floor with no stairs has been fixed

* The game now covers the entire screen area if played on portrait devices or windows

Here it is the game:

Just tap or click to make the player jump. Try to climb the ladders and collect diamonds while avoding spikes. If you have a mobile device, you can play directly at this link.

At the moment, spikes and ladders are randomly placed without being sure each floor will be playable, and this feature will be introduced in next step.

Here is the source code:

How would you ensure each floor is playable? Wait for the next step to see the complete game, meanwhile download the source code.

  • mc

    The spikes can’t be 100% random…. since sometimes they are placed exactly over the ladder exit, making the game unfair