3 ms·
I was expecting to see some example code, or some actual performance metrics to show why data-oriented design is better. I actually have written a game that wa
by davedx 5y ago
I was expecting to see some example code, or some actual performance metrics to show why data-oriented design is better.
I actually have written a game that was pure functional style with a single giant state object for the game data and it worked well for me. But I'd want to see some evidence for this approach before changing the entire architecture of my game.
- meheleventyone 5y agoThis graph made the rounds on Twitter last week and I think encapsulates the answer really well: https://twitter.com/eric81766/status/1407393532562841607 https://twitter.com/eric81766/status/1407393532562841607 Most games won’t benefit. Most AAA games won’t benefit for their gameplay code and are otherwise very data-oriented already.
- davedx 5y agoECS isn’t the same thing as data-oriented programming is it? I’ve worked on AAA games and this whole discussion is quite confusing, lol.
- meheleventyone 5y agoNope! If you want a concrete example I’d recommend looking at the Unity DOTS stuff which is their data-oriented stack and does include an ECS as part of it.