tag:blogger.com,1999:blog-5255286524625277161.post4687668291148645532..comments2023-06-18T06:43:58.739-07:00Comments on Byte56 GameDev: Entity system differencesAnonymoushttp://www.blogger.com/profile/06624340630711937187noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5255286524625277161.post-34118649758333806082014-02-17T07:31:58.762-08:002014-02-17T07:31:58.762-08:00Yep, it's one of those things where it depends...Yep, it's one of those things where it depends on what you're doing. Personally, if I were designing my own system from the start, I'd go with the systems approach. I can see more flexibility and opportunities for customization/optimization.Byte56noreply@blogger.comtag:blogger.com,1999:blog-5255286524625277161.post-37200975551217655242014-02-17T07:29:00.942-08:002014-02-17T07:29:00.942-08:00Great point Roy. When processing all the component...Great point Roy. When processing all the components of one type together, it's easier to also cache common data. One might be able to do this with the component based approach as well, having some kind of per-frame cache, but the implementation would likely be more-error prone and harder to predict behavior. Thanks for your input.Byte56noreply@blogger.comtag:blogger.com,1999:blog-5255286524625277161.post-15743386151074930692014-02-17T06:12:04.465-08:002014-02-17T06:12:04.465-08:00Thank you, Michael.
So really the biggest thing i...Thank you, Michael.<br /><br />So really the biggest thing is how it fits your coding style and design at hand. For me, it's more natural to put logic right into components. But roytriesscheijn has a good point, too, though.zajonoreply@blogger.comtag:blogger.com,1999:blog-5255286524625277161.post-12199940856311510122014-02-17T02:21:54.042-08:002014-02-17T02:21:54.042-08:00There is another, more subtle difference. In the s...There is another, more subtle difference. In the systems approach you often have better data locality. For example when performing path finding: in a system everything related to path finding can be brought into cache and mostly stay there untill path finding has been performed for all entities. In a component based approach path finding data might be thrown out of the cache in favour of other data that the component needs to process before the next component starts and has to load path finding data again.roytriesscheijnnoreply@blogger.com