In the next part of this series Emanuele adds in a scrolling parallax background.

Posted on 18th Jun 2019. Follow @phaser_ and get the Phaser World newsletter.

image

Emanuele Feronato continues his series: "Here we go with the 4th part of the HTML5 endless runner prototype powered by Phaser and Arcade physics.

Time for a small recap: in first step, I was able to set up a basic endless runner with double jump and room for customization using object pooling to save resources.

In second step I added even more room for customization and – most important – a player animation.

In third step I added texture to platforms – no more white boxes – and coins to collect. Coins have their own animation and once collected they disappear in a way similar to the one you used to see in Super Mario series.

Now it’s time to add a scrolling parallax background, which is made by a series of images moving at a slower speed than the platform, giving the illusion they are moving in the distance."

Read More

Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.

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
$19