Data-Oriented Design - Review

A basic review/fanboy write-up on Data-Oriented Design by Richard Fabian.

- 4 min read

Let me first put a disclaimer here, I am by no means a literature expert nor am I a technical expert on the topic of this book. I am a software engineer who’s having a crack at game development and has been frustrated by not having enough tools in my belt to tackle some problems I’ve faced.

It’s all about the data

I somehow managed to stumble onto this book mostly because of talks1 2 by Unity’s Joachim Ante that delved into leveraging some new technology in Unity that allows for some pretty impressive volumes of data transformations. It piqued my interest and at a later stage I came across the term Data-Oriented Design. Joachim Ante’s talks had shown me the importance of how thinking about the data and it’s structuring in memory has an effect on performance. I was instantly hooked and I wanted to know more and quick google put me on the website for Richard Fabian’s book aptly titled Data-Oriented Design.

Data-Oriented Design book

The early chapters in the book does a really good job of easing you into the topic. There’s a good focus on showing how different sets of data relates to other sets and how one can model this. There’s plenty of examples with actual functioning code samples to bring the concepts home. I had my mind blown with how object graphs were compared to a relational model and what impact this has on the way you’re processing data.

Adding on top of this toolbelt the ability to reason about these datasets in terms of searching and sorting there are other interesting ways that emerge and allows you to write some really simple data transforms. Now admittedly all of the samples are written in C++ and it was a little intimidating to me initally as I’m a C# developer by trade and I’ve grown accustomed to being able to use C# in Unity as well. In the end a lot of programming concepts easily translate across languages and with the examples being very focused towards the simplest solution it’s still very easy to understand.

Data & performance

Another aspect of the book that I really liked was delving into how the structure of data impacts the performance of your data transforms. A lot of the talks by Joachim Ante had focused on this concept, but had left me wanting more in terms of how to build processes like this myself. There’s an interesting look into how to handle the level of detail of entities, procedurally generated entities and when they become important to the player.

There’s a myriad of topics related to hardware that Richard also covers, but I’m not qualified to cover these. If you’re in the slightest interested in being gently introduced to this it’s still a valuable resource.

The Verdict

This book has been an eye-opening experience to read. I’m a predominantly Object-oriented Programming (OOP) focused developer who’s had some contact with Functional Programming (FP), but the flamewars regarding the two topics had kept me away from exploring FP a little more. The concept of Data-Oriented Design had fundamentally changed the way I look at problems now as it had brought together a very interesting perspective on what we do as developers. I highly recommend this book to anyone who’s found themselves wanting to learn about something a little different, but something that can still apply to your daily craft. This is DEFINITELY a great book and it’s one that I’m sure I’ll be reading a few more times to better get to grips with the wealth of information it contains.

If you’re interested in buying this book there are links to places where you can buy the book on the Data-Oriented Design book website

  1. Unite Europe 2017 - C# job system & compiler ↩︎

  2. Unite Austin 2017 - Writing High Performance C# Scripts ↩︎