Timeline for How to benefit from cpu cache in a entity component system game engine?
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 5, 2013 at 3:51 | comment | added | DMGregory♦ | Not sure if this may be relevant too? gamasutra.com/view/feature/6345/… | |
| Dec 5, 2013 at 0:47 | history | tweeted | twitter.com/#!/StackGameDev/status/408397205822001153 | ||
| Dec 4, 2013 at 21:33 | vote | accept | Johnmph | ||
| Dec 4, 2013 at 21:20 | comment | added | Johnmph | It's my example which is bad, in fact, it's more the "update all transforms with the finished rigid body data" system than the Physic system. But the problem stays the same, in these systems (update transform with rigid body, update rendering with transform, ...), we will need to have more than one type of component at the same time. | |
| Dec 4, 2013 at 21:17 | comment | added | DMGregory♦ | Your example loop presumes that component updates are interleaved per-entity. In many cases it's possible to update components in bulk by component type (eg. update all rigidbody components first, then update all transforms with the finished rigidbody data, then update all rendering data with the new transforms...) - this can improve cache use for each component update. I think this type of structure is what Nick Wiggill is suggesting below. | |
| Dec 4, 2013 at 21:15 | comment | added | Johnmph | With a simple pool allocator and a Handle manager for having component reference to manage relocation of components in the pool (to keep the components contiguous in memory). | |
| Dec 4, 2013 at 20:51 | comment | added | concept3d | can you show us how are you allocating each component? | |
| Dec 4, 2013 at 20:45 | history | edited | Johnmph | CC BY-SA 3.0 |
Added informations
|
| Dec 4, 2013 at 17:55 | answer | added | Engineer | timeline score: 14 | |
| Dec 4, 2013 at 17:41 | history | asked | Johnmph | CC BY-SA 3.0 |