Hacker News new | ask | show | jobs
by dkersten 5468 days ago
It looks to me that a lot of game programmers are moving away from OO in favour of data-oriented approaches, emphasizing things like structures of arrays (while OOP more or less emphasizes arrays of structures), entity systems (they are becoming increasingly popular, a lot of engines now contain some kind of ES layer) and other similar concepts.

Why? Because OO isn't a perfect fit to modern hardware, is often not the most cache or out-of-order-execution friendly way to organise code and data, doesn't lend itself well to parallelism and isn't suited for stream processors (GPU, PS3's SPEs...)

Actually, the PS3 pretty much forces data to be organised in structures of arrays for the SPEs, as far as I know.

So, yes, as far as I can tell, games do use some form of OO these days, but they also seem to be moving more and more to a data-oriented parallel/streamcache friendly non-OO architecture. I don't think OOP will be forgotten any time soon, of course, as it is still a useful means of modelling games and code, but I do think OO will become increasingly less important.

http://research.scee.net/files/presentations/gcapaustralia09...

http://gamesfromwithin.com/category/data-oriented-design

http://t-machine.org/index.php/2007/09/03/entity-systems-are...

http://entity-systems.wikidot.com/start

http://justinliew.com/blog/?p=2890