My take on handling slopes with Phaser and ARCADE physics

When you need an easy and fast physics engine your games, ARCADE physics is the best choice. It can handle movements and collisions like the ones you can see in games like Radical, Planet Revenge, 2 Cars, Flappy Bird and more.

But when you are building platform games, it can’t handle slopes. Well, until now:

Move the character up and down the slope with Z and X keys.

This is my first take on handling slopes with Phaser and ARCADE physics, and basically you can do it by checking for intersections and playing with trigonometry and gravity.

Just a prototype at the moment, but it will improved with more features, have a look at the source code:

And here is the project source code to download.

  • jb

    Excellent! I”m looking forward curved slopes as in Sonic.

    • chand1012

      If you are going for Sonic-like physics, the Ninja physics engine seems like the way to go, as its a near 1-to-1 JS part of the N+ physics engine which features moving around curved objects, such as the loop in Sonic.