Game Development Reference
In-Depth Information
17 The scene graph
A simple game may include an intro, a configuration screen, two or three
game levels, a successful end, an unsuccessful end and a play again
selection screen. Trying to manage all this in a single scene can be
complex and wasteful in terms of memory resources. In this chapter we
will look at how to break a project down into manageable sections so that
we can deal with one thing at time. We will look at how to manage texture
resources across scenes and how using shared libraries can prove
What are we going to store in a scene?
In true OOP style, we are going to create a class called CToon3DScene
that will contain all the data that will constitute a scene. A project may
contain several scenes and data that are stored globally, so that all
scenes can access these resources conveniently. The simplest project,
however, will contain just a single scene and no global resources. For this
reason, our scene class must provide a data structure capable of storing
everything that is to be used in a simple animated demo. A list of
resources a scene requires is as follows:
1 Meshes
2 Morph targets
3 Surface data
4 Images
5 Motion files
6 Text objects
7 Buttons
8 Cameras
Search Nedrilad ::

Custom Search