In this part of the series endless obstacles are added into the mix.

Posted on 22nd Jan 2019. Follow @phaser_ and get the Phaser World newsletter.


From Emanuele Feronato: "Did you enjoy my posts about the circular endless runner prototype?

When I was playing with it, a doubt came into my mind: how to create endless obstacles? Or coins?

In ordinary horizontal or vertical endless runners, it’s quite easy because they appear from the right or the top of the stage, then disappear to the opposite side.

Troubles knocks your door when you have a circular endless runner, where obstacles – spikes in this case – won’t leave the stage.

So this is what I made: when a spike is placed on the stage – or reused, if you love object pooling – a custom property called approaching is set to false."

Read More

The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
  • By Emanuele Feronato
  • 155 Pages
  • 28 Source Code Examples
  • Build a complete game from start to finish
  • Cross Platform
  • Scaling for devices
Buy Now