Settings

Theme

Introduction to Data-Oriented Design [pdf]

gamedevs.org

15 points by tosh an hour ago · 3 comments

Reader

inigyou 22 minutes ago

Serious question. Does DOD mean anything more than array programming, in practice?

  • laladrik 8 minutes ago

    Have a look at the talk Practical Data-Oriented Design by Andrew Kelly [1]. He covers the following techniques:

    1. Indexes instead of pointers. This allows you to avoid alignment of 8 bytes in your structure for x86_64.

    2. Storing booleans out-of-band. Booleans cause padding all the time.

    3. Struct of Arrays. Based on your question I assume you're familiar with it.

    4. Store sparse data in hash maps. I remember one time when it allowed to eliminate inheritance.

    5. Encoding the data instead of OOP/polymorphism. I haven't got an occasion to use it. The idea is to add extra tags to avoid boolean properties.

    [1] - https://vimeo.com/649009599

  • RobRivera 17 minutes ago

    Yes

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection