So i have been struggling with this for many years and haven't seen a solution that provides the right complexity (implementation/extension) and performance when it comes to managing the objects in a game scene. As far as i have seen there are 3 main approaches:
OOD / Components:
-Base Object (Actor), derive from this to make your new types: Character, NPC, Orc, Weapon…
-Derived type adds components (Composition over inheritance): MeshRendererComp, DialogueComp, PlayerInputComp etc.
-Objects are stored in a map or linked list? and iterated over in a Scene with Tick called etc.
Pros:
-Easy too implement/Think about …
↧
GameObject/Entity Managment
↧