/p2js-tiledmap-demo

P2 JS Tile Map - Demo

Primary LanguageJavaScript

P2JS - Tiledmap - Demo

About

This is a small demo for the P2JS implementation on DwD-Game: https://github.com/damian-pastorini/dwdgame

Description:

  • The tilemap was exported in JSON from the Tiled map editor: https://www.mapeditor.org/
  • This use the p2.renderer framework (like in the P2JS demos) and a few key events to simulate the user actions.
  • The endContact event was used to stop the player movement when a wall is hit.
  • Some walls were marked as "action" walls based on specific tiles values (for example, tiles that could be considered doors).
  • This example match the same town used on the dwdgame.
  • The P2 rendered was customized to show specific colors set on the boxes. In this case each color is a different map layer.

Contact:

Feel free to contact me at damian.pastorini@gmail.com if you have any questions.