O'Reilly logo

Android Game Recipes: A Problem-Solution Approach by J. F. DiMarzio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required