Model
© 2000 - Zachary Booth Simpson. Copied with permission from http://www.mine-control.com/zack. If you find any of this work useful, please sign Zack's guest book: http://www.mine-control.com/cgi/gbook-zbs.cgi. IntentStore the state of an object which exists in the game world. Also calledDatabase Records, World Items, World Objects, Item Database ProblemMany games consist of a variety of objects which interact. In some cases, there are many kinds of objects, in other cases, only a few. However, in all cases, each object tracks its state as the game progresses. Game rules define the transition of these states, and are often implemented by the Controller pattern. SolutionMany Model implementations are polymorphic. For example, each type of Model is given its own class which extends a BaseModel class. Subclasses often overload basic methods to implement a special trait. StructureNot available at this time. ExamplesSome examples of state information that a model might track: hitPoints, name, type, position, orientation, size, status, animationState, meshPointers, isDead, identification. Related PatternsModel collections are also called a Model Database. Discuss this article in the forums
See Also: © 1999-2011 Gamedev.net. All rights reserved. Terms of Use Privacy Policy
|