2014-07-24 19:37 GMT+02:00 Raoul Duke : > ... > > to kick the question up a meta-level: Does anybody have thoughts on > how to best orthogonalize actual memory allocation from where the > application says it wants it? I mean if I write a stupid loop that > makes a zillion particles in the middle of each frame render then yes > I'm an idiot, sure... but what things can be done to actually allow > such idiocy to squeak by? > ... > On the game world, they have invented entity-component-system ( https://en.wikipedia.org/wiki/Entity_component_system ) data-driven software architecture. The idea is to be very flexible with a "generic kind of object" (entity), with typed component. An entity is only an integer. The component are found inside a collection with the entity identifier. So each component are allocated in it's own contener, so data are more compact, and memory access appear less random.