top | item 33578110

(no title)

james7132 | 3 years ago

https://en.wikipedia.org/wiki/Data-oriented_design

The intent is to layout structures in memory in a way that is conducive to how it's actually accessed in the physical hardware.

For video games, this typically means leveraging contiguous pieces of memory to minimize cache misses while iterating over the objects in the game. This can see some huge performance gains over other ways of structuring the game's code.

Think of Bevy's ECS as a ultra-high performance in-memory columnar database that you're scanning 60+ times a second. Then building your game as a series of (potentially parallelizable) mutative queries over that database.

discuss

order

No comments yet.