|
|
|
|
|
by cies
753 days ago
|
|
I prefer the FP approach of separating data and logic. you could end up with a box of functions (logic) that can be reused by the different "entities". Last time i checked the FP world is slowly producing ECS frameworks that are needed to make the game performant. They used to be nearly C++ (or OO) exclusive. |
|
Entity component systems are pretty cool, as is functional programming, but I don't see the relation.
In addition, object-oriented languages seem well-suited to making entity component systems. There are some tutorials on them in different object-oriented programming languages:
C++: https://austinmorlan.com/posts/entity_component_system/
C#: https://matthall.codes/blog/ecs/
Common Lisp: https://edoput.it/2023/11/19/data-oriented-clos.html