Using P2 Physics and Tiled for Tilemaps

Article by Richard Davey. Posted on 21st Aug 2015.   @phaser_


From the Tales - Told & Untold blog: "While there are several TileMap tutorials for Phaser out there, I didn't find any using Phaser 2.3 with the P2 physics. For this reason I decided to write my own tutorial about. Phaser is a cool javascript library that for turning a HTML5 canvas elements into games.

Our goal in this tutorial is to use the program Tiled to create a map for our game. We will have a separate layer for collision data. In phaser we will display the background and foreground layer, but use the invisible collision layer for collision. We will use P2 physics, as some comments suggest that this physic works best with tilemaps."

Read More