2 ms·
> The entity component system (ECS) is one of the main reasons why programming games in Unity is so pleasant. I agree programming in Unity can be very pleasant
by anchpop 6y ago
> The entity component system (ECS) is one of the main reasons why programming games in Unity is so pleasant.
I agree programming in Unity can be very pleasant. To avoid confusion, I wanted to point out that traditional Unity programming isn't really a typical example of an ECS. Unity's system actually lacks most of the performance benefits you can get from one. This is relevant because Unity is actually currently developing a "real" ECS architecture they call DOTS (data oriented technology stack).
- meheleventyone 6y agoTo be ultra confusion avoiding you don’t necessarily get great perf benefits from the merely organising things as per the ECS pattern. You still need to organise your data around how it is used. Which is why Unity uses archetypes which trade fairly automatic organisation based on entities component signature for increased cost if you add and remove components from them (as it triggers reorganising where that entities components are stored). There are other patterns with different trade offs. In terms of just mental overhead any form of composition is useful be it Components in the Unity sense or Components and Systems in the ECS sense.
- gentleman11 6y agoPersonally, the performance benefits are secondary. It is a lovely way to program to be able to use composition like you can in Unity. If only they didn’t revoke usage rights on their asset store without warning during license updates, I would be a much bigger fan of the company