Chapter 13
Moving a Character with Obstacles
If games, especially platform games, featured flat levels where the character simply ran from left to right unencumbered, they would not hold a player’s interest for very long.
Platform games such as Super Mario Brothers, LittleBigPlanet2, and countless others contain obstacles that the player must navigate around. Using obstacles in your games is a great way to add excitement and also brake up action. However, obstacles can also be an added level of complication when it comes to coding your game.
This chapter will cover a number of scenarios where you might have had problems working with obstacles in your games. The first scenario covers letting a character jump between platforms.
13.1 Jump Between ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access