Game Development Reference
In-Depth Information
Chapter 4. Mission
One
-
Future
Proofing the Code
We have designed and implemented a working first pass on the first mission of our
game. Take a moment to step back and celebrate! To make sure we can finish creat-
ing the last two levels and finish polishing this level, we will need to revisit some of the
code we have already written to ensure it is extensible to meet the needs of the other
two missions in our game.
We will restructure the existing game into a number of subscenes. Then we will rein-
tegrate the code so that the game can support multiple scene files; hence, it will sup-
port multiple levels. We will extend our interactive object system so that it supports
more general purpose operations with transforms, which are necessary for future mis-
sion requirements. Finally, we will finish the trivia cards with an eye towards testing
and application for the last levels.
In this chapter, we will cover the following topics:
• Reorganizing our GameObjects in the Scene view
• Adding new scenes to the project
• Creating the PopupMainMenu GameObject
• An introduction to Finite State Machines
• Implementing the GameMgr script
• Reflecting on our code changes
• Analyzing of code functionality
• Updating some systems
Reorganizing our GameObjects in the
Scene view
The following GameObjects will be the focus of our design activities in this chapter:
GameMgr : This script will handle the choreography between the game and
its particular states. It will hold the logic that moves the game from the main
screen and between the individual levels.
Search WWH ::




Custom Search