Timeline for How to represent a modular FSM for AI using ECS?
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 31, 2018 at 12:39 | comment | added | Christian Ivicevic | The general gist is actually right and useful which helped me get a better picture of what I might attempt. It's just that a component won't be able to store objects (especially with functions). I will update my question to reflect that I am going for pure ECS in the first place. | |
| Aug 31, 2018 at 12:28 | comment | added | LifGwaethrakindo | I am sorry, I didn't consider that you wanted to exclude MonoBehaviour and use pure ECS. But, the implementation does not depend on it, I just put the inheritance for the sake of putting it into a Unity context, you may take out the MonoBehaviour keywords and it would be the same, as technically components are decoupled of their entities (unlike Unity's components). | |
| Aug 31, 2018 at 12:19 | comment | added | Christian Ivicevic |
Unfortunately, your suggestion requires the use of MonoBehaviour since you rely on non-blittable data which is inherently incompatible with pure ECS. Nonetheless your suggestion is making me consider to write a system for each enemy type (AiGruntSystem, AiEliteSystem, AiJackalSystem) that has one job per state indicated by component (AiGruntIdleComponent, AiGruntFollowComponent, ...) of that particular enemy type and run those in parallel in the system leveraging the Job system.
|
|
| Aug 31, 2018 at 11:45 | history | edited | LifGwaethrakindo | CC BY-SA 4.0 |
added 3 characters in body
|
| Aug 31, 2018 at 11:39 | history | answered | LifGwaethrakindo | CC BY-SA 4.0 |