en:toolworks:docs:apparatus:ecs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:toolworks:docs:apparatus:ecs [2021/12/03 21:45] vladiusen:toolworks:docs:apparatus:ecs [2021/12/18 15:19] (current) – поправил некоторые слова jispar
Line 9: Line 9:
 So, when we develop games (and software in general) the OOP-way, we usually decompose all of the available entities and concepts into the hierarchies of their corresponding types. In terms of Unreal Engine those are mainly called Objects (or ''[[ue>API/Runtime/CoreUObject/UObject/UObject|UObjects]]'' if we are talking about C++ coding part). We create the hierarchies of those classes where each class introduces some new properties and methods while also inherting the properties and methods of its parent (base) class. All of Unrealean classes are derived from a single root Object (''UObject'') ancestor class in the end. Every time we create a new Blueprint (or a new C++ class) it basically derives from this root class. So, when we develop games (and software in general) the OOP-way, we usually decompose all of the available entities and concepts into the hierarchies of their corresponding types. In terms of Unreal Engine those are mainly called Objects (or ''[[ue>API/Runtime/CoreUObject/UObject/UObject|UObjects]]'' if we are talking about C++ coding part). We create the hierarchies of those classes where each class introduces some new properties and methods while also inherting the properties and methods of its parent (base) class. All of Unrealean classes are derived from a single root Object (''UObject'') ancestor class in the end. Every time we create a new Blueprint (or a new C++ class) it basically derives from this root class.
  
-As the time developing our game goes we usually start to notice that some of our classes tend to have more and more in common. So we begin to [[wp>Code_refactoring|refactor]] the codebase (or the Blueprint assets), extracting those common properties and methods into some separate base classes and try to derive the other classes from them. This task can already be quite sophisticated since Unreal's object model does not support multiple inheritance (while C++ actually does), so you basically can't derive your class from the two common ones. Anways, those new common classes in turn may become too common so the new common common class is introduced and the process repeats.+As the time developing our game goes we usually start to notice that some of our classes tend to have more and more in common. So we begin to [[wp>Code_refactoring|refactor]] the codebase (or the Blueprint assets), extracting those common properties and methods into some separate base classes and try to derive the other classes from them. This task can already be quite sophisticated since Unreal's object model does not support multiple inheritance (while C++ actually does), so you basically can't derive your class from the two common ones. Anyways, those new common classes in turn may become too common so the new common common class is introduced and the process repeats.
  
 A quite popular example for that approach is a tree of animal inheritance, where a root class represents basically any animal existing (something like ''UObject''), while others derived represent some separate animal sorts and kinds on their own: A quite popular example for that approach is a tree of animal inheritance, where a root class represents basically any animal existing (something like ''UObject''), while others derived represent some separate animal sorts and kinds on their own:
Line 73: Line 73:
 === Russian === === Russian ===
  
-These are in Russian, but you may still wann watch them with automatically-generated subtitles.+These are in Russian, but you may still want watch them with automatically-generated subtitles.
  
 {{youtube>IsJmBiRWBj8?medium}} {{youtube>IsJmBiRWBj8?medium}}
  
  • en/toolworks/docs/apparatus/ecs.1638557131.txt.gz
  • Last modified: 2021/12/03 21:45
  • by vladius