Re: sparse components
Richard Fabian <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
On 31 May 2010 03:27, Warrick Buchanan <[email protected]> wrote: > > "Take your rogue-like for example; Are you really better off treating > health regeneration as a separate component and incrementing all live health > components at once, or since the health regen is such a trivial calculation, > should that be rolled in with something else? Where do you draw the line?" > > This highlights that is all about the data - it doesn't matter if you are > conceptionally using a component system or not. Organise your data/struct > of component data so that it only contains values that are useful at the > same time and get that as tight as you can but don't beat yourself up if you > can't get it completely perfect. This all becomes even more important if > you are working on a distributed system if you want to minimise data > traffic. > I've found that just normalising the data structures into 3NF gave me a very good starting point, and would take steps to organise the data into "commonly read together" except for the fact that a struct of arrays doesn't really need it as it automatically lends itself to cherry picking the memory accesses. -- fabs(); Just because the world is full of people that think just like you, doesn't mean the other ones can't be right. _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com