image

The LoonRide team are back with another blinding P2 tutorial: "This tutorial will cover a simple way to make vehicles in Phaser and create terrain for them to drive on. You can take a look at what we will be making here, and you can also download the source from Github here.

For this tutorial, I have created a Vehicle function in vehicle.js which you can use to quickly make a car or truck and add wheels to it. I have created a TerrainController function in terrain.js which has methods to add a P2 physics body to the bottom of your game world, and also to draw the outline of this body on the canvas."

Read More