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
Next revision
Previous revision
en:toolworks:docs:apparatus:ecs [2021/12/03 20:28] vladiusen:toolworks:docs:apparatus:ecs [2021/12/18 15:19] (current) – поправил некоторые слова jispar
Line 7: Line 7:
 A large portion of C++ language is also OOP and it was one of the main reasons behind its original design. It seems like the general top-level UE's architecture was heavily based on C++ some features, or at least was heavily inspired by them. That's quite logical if you think of it. In the end C++ is the main language behind the tech. The Unreal build toolset (UBT and UHT) is implemented in C# which is also an OOP language by the way. A large portion of C++ language is also OOP and it was one of the main reasons behind its original design. It seems like the general top-level UE's architecture was heavily based on C++ some features, or at least was heavily inspired by them. That's quite logical if you think of it. In the end C++ is the main language behind the tech. The Unreal build toolset (UBT and UHT) is implemented in C# which is also an OOP language by the way.
  
-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 hierarchies of classes that are all derived from a single root ''UObject'' ancestor. Every time we create a new Blueprint (or a 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 goes we notice that our classes become more and more in common and begin to [[wp>Code_refactoring|refactor]] the codebase (or the Blueprint assets), while extracting those common facilities into some separate base classes. Those in turn become the ancestors and we derive certain types from them, that should share their functionality.+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 themThis 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 59: Line 59:
  
 You would hardly ever need to implement your own mechanisms. Should you wish to, you can also do it in C++. You would hardly ever need to implement your own mechanisms. Should you wish to, you can also do it in C++.
 +
 +==== Third-Party Resources ====
 +
 +Together with our community we have gathered a collection of useful information regarding ECS and data-oriented in general.
 +You may study it for a broader view on the subject:
 +
 +=== English ===
 +
 +{{youtube>tONOW7Luln8?medium}}
 +{{youtube>W3aieHjyNvw?medium}}
 +{{youtube>g1TsP60z2OQ?medium}}
 +
 +=== Russian ===
 +
 +These are in Russian, but you may still want watch them with automatically-generated subtitles.
 +
 +{{youtube>IsJmBiRWBj8?medium}}
 +
  • en/toolworks/docs/apparatus/ecs.1638552536.txt.gz
  • Last modified: 2021/12/03 20:28
  • by vladius