ENTITY-COMPONENT-SYSTEMS (2022-2023)

 




Oh boy. This one's need more than a blog post but still I'll try*. First of all, I would like to show-off a little by saying I built this framework which works just like Unity's ECS. Of course, not same, but close enough. But I would also like to credit my manager/mentor Santosh Shedbalkar here for the support and guidance throughout. I built this while working for PTW India. I learned a lot memory management, Data oriented programming and about C# itself.

Followings were the highlight of the framework:
ECS at Core : The core was Entity Component System built in C# by carefully laying out the data for optimal cache use. Also making use of source generation for boiler plate code.
2D Physics : Upon this ECS core, I built a 2D Physics system for simple shape collisions such as Spheres and N-gons using grid partitions for broad phase and SAT (Separating Axis Theorem) for the narrow phase.
Modular Skill System : Player skills were modularised in components and linked to form a complete skill. For eg. The initialisation, target collection, 
execution, cooldown etc were designed as components with their own systems.  
Session Recording : Since everything was data oriented it allowed to record the key elements such as user inputs and random number generation to accurately playback the session, which was helpful for debugging.