Phaser Coding Tips 3 "Ride on" Platforms Revisited

image

Another one of my “revisits” of the classic Phaser 2 tutorial series by Richard Davey. Tips 3 is about making player object ride on horizontally moving platforms (slippery and non-slippery type). This is in fact very easy to create in Phaser 3 - I’ve commented on my experience in this blog here (together with a link to the example codes converted to Phaser 3).

I then went on to explore vertically moving platforms and got truly stuck in tweens vs physics engine quagmire!! This is an area discussed in various posts, but other people looking into this topic may like to read about my learnings here to save themselves some heartache - I explore the use of tweens as well as path follower objects, eventually getting Mr Dude to ride on diagonally moving platforms using just the arcade physics engine.

I end this particular exploration by making Mr Dude ride a platform that moves in an elliptical path (short blog here).

In all my examples, move left & right, jump with arrow keys.

3 Likes

Thanks for this. It will be super useful to anyone making a platform game.

I remember having to solve this problem over and over again in different game engines back in the day. The one I never quite got right was to prevent the character from going into falling mode when riding the platform down.

Thank you for your comment!