Pixel Platformer
A sample showcasing how to create a simple platformer with a map from Tiled Map Editor.
In the source code, you can see:
- How
StateMachine
is used in thePlayer
class to plug different behaviour when jumping, walking... - How to create an animated spritesheet from code (still in
Player
class, but also non-animated sprite inBox
class) - How to enable
arcade
physics so that the player can move around and collide with tilemap - How to extract data from Tiled's
TMX
format to add additional boxes on the map and define player position
(Assets from Kenney Game Assets)
Next example ➔ Immediate GUI