This is a small demo for the P2JS implementation on DwD-Game: https://github.com/damian-pastorini/dwdgame
- 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.
Feel free to contact me at [email protected] if you have any questions.