To view parent comment, click here.
To read all comments associated with this story, please click here.
I have found Noel Llopis' Data-oriented design paper to be an eye opener. http://gamesfromwithin.com/data-oriented-design
With OO, it is easy to end up with a menagerie of objects all referring to each other with deep complexities. With data oriented design you tend to end up with flatter architectures and fewer dependencies.
I'm a game programmer, and I like his advice on how you could code most of your game engine subsystems as you would code your particle system.
With C, I feel more easily guided to data oriented, structures-of-arrays, instead of the OO and arrays of structures/objects.
bram,
That's an interesting link. From a technical standpoint I don't think anything is inherently bad with C++ features. However there's no doubt that it encourages rather different approaches to software design.
C programs often use no abstractions whatsoever and will directly call the external libraries and kernel.
C++ facilitates rich levels of abstraction, which is generally a selling point for developers to choose it over C, and yet these very abstractions can be responsible for adding many more inefficient layers than we typically find in C programs.
OOP interfaces significantly help with contract-oriented programming in teams and help make problems much more manageable. I think a good OOP programmer will know where to draw the line without going crazy about everything needing to be a proper object.
There's no reason a high performance game should not be written in C++, just be mindful of too much indirection in critical loops.
Edited 2013-01-11 06:37 UTC




Member since:
2006-12-15
And this is a good thing
Uhm. I dare to disagree. Depends on what you call 'large system'. It may be the feeling that OO causes bloat because it's easy to get bloaty when you're using OOP. But that doesn't mean that it will happen.
At the core of OOP we have the association of data and the methods that work with that data, through encapsulation. I see nothing wrong with that. It does help you to be more productive, it makes more sense for larger systems to go OOP. OOP systems are simply easier to handle and to extend.