
Unity-ECS Crowd Simulation
About
This game was a technical exploration where I made a crowd simulation using Unity & C# to learn Unity's ECS (Entity Component System).
Result:
I simulated 250,000 individual AI agents simulating a crowd behavior and still giving me 180-250 Frames per second.
Learnings:
- Unlike Unity's Gameobject and mono behavior system, ECS is a different programming paradigm where an Entity resembles a type of object.
- Component is just a bunch of data, unlike Unity's components they don't hold any behavior.
- The system is the one that takes data from components and changes and syncs them back. ex, my destination-finding system is changing the destination variable of agents.
Reflection:
- ECS is very powerful as well as tricky to work with.
- Don’t use ECS until v.1.0 comes.
This probably is best for simulation games for now than mainstream games.