Building Levels

There are lots of ways for programmers to move players between levels. One way is to remove everything from the screen—even the scene itself—before rebuilding a new scene from scratch on the next level. For this to work, the game has to store information like the number of points the player currently has, items the player may have picked up, and levels already completed. This approach works well on consoles like the Wii or Xbox.

Another way to handle moving between levels is to remove and create specific game elements—like platforms and obstacles—while the rest of the scene stays the same. As games get more complicated, this becomes a very hard way to do it. But in this game we only have a few obstacles, so this approach will ...

Get 3D Game Programming for Kids now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.