Game Engine Architecture
719 A game object class hierarchy usually begins small and simple, and in that form, it can be a powerful and intuitive way to d ...
720 14. Runtime Gameplay Foundation Systems Understanding, Maintaining, and Modifying Classes The deeper a class lies within a c ...
721 ingly logical class hierarchy describing diff erent types of vehicles, depicted in Figure 14.4. What happens when the game d ...
722 14. Runtime Gameplay Foundation Systems The Bubble-Up Effect When a monolithic class hierarchy is fi rst designed, the root ...
723 object creation and destruction, actor iteration (i.e., the ability to iterate over all actors meeting a certain criteria an ...
724 14. Runtime Gameplay Foundation Systems One big problem with this class hierarchy is that it limits our design choices when ...
725 encapsulated when they are integrated together for use by a particular game object. Figure 14.8 shows how our class hierarch ...
726 14. Runtime Gameplay Foundation Systems AnimationController* m_pAnimController; RigidBody* m_pRigidBody; public: GameObject( ...
727 // Construct vehicle-specific components. m_pChassis = new Chassis(*this, *m_pAnimController); m_pEngine = new Engine(*this) ...
728 14. Runtime Gameplay Foundation Systems hard-coded design permitt ed only a fi xed number, determined by how many pointers t ...
729 an instance of the type is created. Our GameObject hierarchy used to handle construction of components for us. Instead, we m ...
730 14. Runtime Gameplay Foundation Systems z Object3 □ Orientation = (0, –87, 10) However, it is possible to think primarily in ...
731 a particular game object is determined by the aggregation of the behaviors of all its properties. For example, if a game obj ...
732 14. Runtime Gameplay Foundation Systems virtually irrelevant in many cases. You can call your design a pure component model ...
733 // Cache-friendlier struct-of-arrays approach. struct AllGameObjects { U32 m_aUniqueId [MAX_GAME_OBJECTS]; Vector m_aPos [MA ...
734 14. Runtime Gameplay Foundation Systems 14.3 World Chunk Data Formats As we’ve seen, a world chunk generally contains both s ...
735 been loaded into memory, we have ready-made images of all our objects, so we simply let them fl y. Well, not quite. Storing ...
736 14. Runtime Gameplay Foundation Systems proprietary binary format that is faster to parse and more compact than XML text. Th ...
737 14.3.3. Spawners and Type Schemas Both binary object images and serialization formats have an Achilles heel. They are both d ...
738 14. Runtime Gameplay Foundation Systems z defi ning the location at which a particle eff ect or audio eff ect should origina ...
«
33
34
35
36
37
38
39
40
41
42
»
Free download pdf