Game Objects in a Structure
Games often require that game objects are adhering to some kind of structured game world. Many board or puzzle games have this requirement. These games impose a set of rules, which binds the playing pieces to certain positions or configurations on the playing board. Furthermore, game objects can be part of a hierarchy. For example, a tire object is part of a wheel object, which, in turn, could be a part of a car object. In this chapter we show how to create these kinds of structures using the collection classes. We introduce the scene graph as a representation of this structure. We also talk about local and global (world) positions of game objects.
Unable to display preview. Download preview PDF.