User Tools

Site Tools


ecs-core-overview

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ecs-core-overview [2026/04/27 15:33] – A divinerecs-core-overview [2026/04/27 15:43] (current) – [ECS Core Architectural Overview] diviner
Line 4: Line 4:
  
 * **Data Model** * **Data Model**
-  * Runtime State  
-    * [[Entity]] 
-    * [[Component]] 
   * Static State   * Static State
     * Entity Static Data     * Entity Static Data
     * Component Static Data      * Component Static Data 
     * System Static Data     * System Static Data
 +  * Runtime State 
 +    * [[Entity]]
 +    * [[Component]]  
 * **Business Logic** * **Business Logic**
   * Services   * Services
Line 25: Line 25:
 The architecture defines two different types of Static State: EntityStaticData (and its dependent ComponentStaticData) and SystemStaticData.  The architecture defines two different types of Static State: EntityStaticData (and its dependent ComponentStaticData) and SystemStaticData. 
  
-The EntityStaticData defines instructions for the [[IEntityFactory]] used to generate a type of Transient Runtime State called [[Entity]] (described below). From the same EntityStaticData configuration, multiple Entities can be instantiated. There can also be multiple different EntityStaticData serialized files, each configuring a different type of [[Entity]].+The EntityStaticData defines instructions for the [[IEntityFactory]] used to generate a type of Transient Runtime State called [[Entity]] (described below). From the same EntityStaticData configuration, multiple Entities can be instantiated. There can also be multiple different EntityStaticData serialized files, each configuring a different type of [[Entity]]. The EntityStaticData class is sealed and concrete. The way it defines different behaviors for different Entities is via composition, by a populated ComponentStaticData array. ComponentStaticData cannot exist on its own, it only makes sense as an entry to an EntityStaticData's Component collection, and each ComponentStaticData needs an implementation. For example, the [[ITransformComponentStaticData]] defines an Entity that has a Transform, and by extension can have a position and rotation in 3D space, as well as be part of Transform hierarchies. EntityStaticData without this specific ComponentStaticData will lack this capability.
  
-Unlike EntityStaticData, SystemStaticData is meant to be implemented by concrete implementations and cannot exist as is. Each implementation can only have one serialized file, and the implementation is registered by the dependency injection framework as Singleton. Therefore every reference to the same SystemStaticData always points to the same object, and that singleton instance can be injected via constructor injection. +Unlike EntityStaticData, SystemStaticData is meant to be implemented by concrete implementations and cannot exist as is. Each implementation can only have one serialized file, and the implementation is registered by the dependency injection framework as Singleton. Therefore every reference to the same SystemStaticData always points to the same object, and that singleton instance can be injected via constructor injection. Where EntityStaticData define Entities and their behaviors, SystemStaticData usually act as configuration files for specific systems and services (hence their name).
- +
-Where EntityStaticData define Entities and their behaviors, SystemStaticData usually act as configuration files for specific systems and services (hence their name).+
  
 === Runtime State === === Runtime State ===
  
-Runtime state is further split into Transient and Singleton StateTransient and Singleton qualifies how this state+Runtime state is any state created during the lifetime of the ApplicationAs such, it can be any class necessary to service the business logic. However, there is one structure that is treated exceptionally by the architecture: the [[Entity]]. The following diagram showcases how an [[Entity]] structure is composed. 
 + 
 +{{ :2026-04-27_17h50_45.png?669 |}}
  
ecs-core-overview.1777304038.txt.gz · Last modified: by diviner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki