Conclusion
Submitting
I would like to setup a CVS system for us to update and change the game. But since we dont have a final design doc or goal, I dont
know how well this will work. Basically what we're going to do is, if you make a change that you want in the final game
, send it to me (dratti@umich.edu). I'll look over it, possibly test it a bit. If it works right and fits in the game, It will be included
in the release.
Coding Standards
We talked about this in the begining. I wasnt going to strictly enforce and coding standards/style. However, there are a few things
I find very helpful:
- Every class is in a file: CClassName (letter 'C' then the class's name without spaces or underscore. each new word first letter caps)
- Make member variable names start with m_. God I hated this for so long. I couldnt understand why anyone would do this. But it
makes reading someone's code so easy. When you have a rather long routine and you see a variable named m_foo, you instantly realize
that is declared inside the class. All variables whos scope are inside a function or if statement or whatever, can have whatever
name you want. But leave member variables named m_variableName.
- Keep class variables private. IE - use get/set functions to modify variables. Why? well 90% of the time it doesnt make any
difference, however there are some cases where you least expect it to matter. For example in a sound system every time the volume
is changed you need to reset a flag. Or maybe for debugging a players X position keeps getting moved around, you can setup
some traces inside the setX function. Just take the time to write them out.
Wrapping it up
Thats pretty much it. I'm sure I left out a lot of stuff so feel free to email me (dratti@umich.edu) or talk to me on AIM (ratmanLX)
I'll try to answer you're question.
If you feel this may be a bit lacking - I suggest looking through the examples and seeing how the current objects are implemented.
It may not all make sense at first but if you stick with it and experiment on you're own, you'll get it.