Game Development Reference
In-Depth Information
Chapter 25
Creating the Main Game Structure
25.1 Introduction
In this chapter, we will layout the framework that we will use for the Tick Tick game.
Because of all the work we already did for the previous games, we can rely on a lot
of pre-existing classes. In fact, we will build the game upon the GameManagement
library that we developed and used in the PenguinPairs game. This means that we
already have a basic design for handling game states and settings, a hierarchy of
game objects and more. We are going to extend the GameManagement library later
on by adding classes related to animated game objects. You can already see these
classes in the library, but we will discuss these classes in the next chapter.
25.2 Overview of the Game Structure
We will be following a very similar structure as for the Penguin Pairs game. There
will be a title screen that allows us to go to either the level selection menu, or a help
page. To keep things simple, we will not implement an options page, even though
adding it would be very straight forward since we can simply use the same approach
as we did in Penguin Pairs . Since this menu structure is so similar, we will not discuss
it here. If you want, you can have a look at the code by opening the TickTick1 project
in the solution belonging to this chapter.
The PlayingState class maintains the current level, and deals with loading and
saving level status (solved/locked), just like the Penguin Pairs game. There is a minor
difference in the way that we load levels from files, as we will discuss next.
25.3 The Structure of a Level
Let us first look at what kind of things can be inside a level in Tick Tick .First,there
will be some kind of background image. For now, we will display a simple back-
ground sprite, there is no need to store any information about that in the text file.
 
Search WWH ::




Custom Search