Re:Data-oriented design or why you might shoot yourself in t...
by tffgg on Monday June 28, 2021 @08:38AM
(#27661094)
ECS ist Standard for enterprise web apps as well
Re:Data-oriented design or why you might shoot yourself in t...
by tompazourek on Monday June 28, 2021 @11:54AM
(#27663494)
I have seen some enterprise web apps, but they never used ECS. Can you please share more details about your experience?
Re:Data-oriented design or why you might shoot yourself in t...
by pphysch on Wednesday June 30, 2021 @05:10PM
(#27693447)
May be referring to the common 3 layer architectures (see Fowler's PoEAA) which map closely to ECS:
Top layer is for "frontend", whatever that means for the product (UI, sound, simulation, etc.), the stuff with side effects. "Systems".
Middle layer is purely functional, for business/domain logic AKA utility functions. The most liquid layer, but should not be confused as trivial.
Bottom layer is where state (or a way to access & modify it) lives. Data access layer, component layer, etc.
Re:Data-oriented design or why you might shoot yourself in t...
by tompazourek on Friday July 02, 2021 @12:35PM
(#27713730)
I don't think they really map that closely... But you might be right. Thanks.
Re:Data-oriented design or why you might shoot yourself in t...
by sdeframond on Monday June 28, 2021 @10:27AM
(#27662430)
I am curious as to what you are referring to. Are you thinking of redux-like architectures?
Why pretense? Because behaviors (Systems in ECS terms) are completely separated from data (Components) and data for different game objects (Entities) is kept together in regular or sparse arrays.
Encapsulation is nowhere to be seen, code is written to specify the components it depends on and run on these arrays.
ECS is very fashionable in gamedev lately as it allows for efficient multithreading, explicit depencencies for each subsystem, cache locality and trivial (de)serialization. Used together with handles (tagged indexes instead of direct pointers) it reduces likelihood of dangling pointers and other memory management bugs.