Game Development Reference
In-Depth Information
Events
Game/Application
Engine
Method calls
Level XML
Asset SWF(s)
UI elements
Responsibilities
Responsibilities
Level assembly and display
Sprite updates
Physics
Collision detection
Dispatching game events
Game state management
Handling engine events
Updating UI
Score
Lives/health
Timer (if applicable)
Audio playback (if applicable)
Define active rule set for engine
Figure 14.1 The application
and the engine have different
responsibilities that work in
tandem with each other.
'
ve outlined what each component of our game is
responsible for controlling. When I talk about the
In Fig. 14.1 ,I
m
referring to the set of classes that make up the core mechanics of a
platformer game. This engine is game-agnostic
engine,
I
'
it is the code that is
meant to be reused later. When I talk about the game or application-
level code, I
'
m referring to the current implementation of the engine.
Let
s say I wanted to build two different platformer games with
different art sets and basic behaviors (modified physics, for exam-
ple). The engine code should remain unchanged from one game to
the next (other than to add/fix features that affects all games), while
the game code and art are unique to each implementation.
We applied a similar process with MixUp in Chapter 13, just
not as explicitly outlined; the GameBoard class and the accompa-
nying interfaces were the engine and the other classes were the
implementation. It is important to delineate each component
'
'
s
ahead of time; it is easier than separating the code,
later, into different classes. When we look at the code for this game
later on in the chapter, it will be split into these two categories.
jurisdiction
The Game Flow and Features
As a platformer is more complicated than the simple puzzler
in Chapter 13, it requires even better definition of scope and
mechanics. This rule applies to game development across the
board
an increase in complexity necessitates an increase in docu-
mentation. There are so many possible feature sets that can be
included in a platformer, and it is important to narrow them down
to just what we will implement in this version of the engine; other-
wise, this chapter would engulf an entire book and take you weeks
Search Nedrilad ::




Custom Search