I’d like to start a discussion on how people are currently using entity systems, and how they’re structuring them. I’ve personally moved away from traditional inheritance-heavy (‘old’) game structure a while ago, but only recently tried using a more formal entity system to handle the gameplay logic side of things. I’ve also had two projects running concurrently, one using Artemis which uses ‘thin’ components (like the position example here) with no logic and just uses systems to do the logic, and one built in Unity, which uses a more ‘traditional’ approach where the components are ‘fat’ and contain their state and logic.
Initially I really got along with the Artemis style, defining aspect-like systems really helped with functionality that spanned multiple component types. However the more I use it the more I feel like I’m butting up against limitations. Often I’ll end up having to set flags in components in one system for another system to pick up on later, resulting in lots of polling-style code and the inability to have much event-based gameplay code (at least, without doing some slight mental contortions).
Of course, I could just use Artemis and write ‘fat’ components, which is what I’m going to do as an experiment in my next project. But I’m wondering what other people have made of the thin vs fat approaches, and if one really paid off one way or another.
The polling style wouldn’t be too bad except on android it really sucks up a lot of extra cpu time, just to enforce a seemingly arbitrary design separation. (Yes, I’m aware of artemis-odb and will be switching to that soon). Along with that, some task that feel like they should be simple end up being much harder than they should be.
Artemis still lists itself as “an experimental framework based on an experimental concept”. Do you think the experiment is a success or not?