Skip to main content
gamedev.net
🔒 Locked

Code structure

Started by Kipple 1 reply 1.1k views
Original Post
Kipple
Kipple
My team has made sufficient headway into our project that faults of our code structure have begun to make themselves apparent. It's very important to us (and to everyone, I'm sure) that we have a clear organization of the classes so people can be up and running quickly. I have been trying to find some information about this but other than Mike McShaffry's "Game Coding Complete" and some occasional tidbits here and there on GameDev and the web I was unsuccessful. Can you suggest some articles or books that would be informative? I am interested in being able to answer questions like "what's the correct way to split a hardware event handler between the player view and the logic layer?" I think I know the answer to that particular one, but I'd like to solidify my knowledge of the subject. We work in Python, but I don't think that should make a difference. Implementing functionality has been and continues to be reasonably easy, but we want the engine to be as maintainable as possible in the long haul. We'd rather invest extra time now than towards the end when it's crunch time (again, an obvious statement). Thanks in advance!
SiCrane
SiCrane
Well, I've got good news and bad news. The good news is that project and code structure organization principles in game programming and other programming fields is pretty much the same, so you don't need to look for game programming specific sources. The bad news is that, even now, these topics are still more of a craft than a science, which means that the only truly effective way to learn how to create good code is to create bad code and learn to never, ever, make that particular mistake again. Still, one source for object oriented design advice is the published articles section of Object Mentor. In particular pay attention to the object oriented design section and the articles on the Open Closed Principle, Interface Segregation Principle, Single Responsibility Principle, Dependency Inversion Principle and the Liskov Substitution Principle.
Kipple
Kipple
Those articles were very informative. Thanks for your help!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.