Original Post
Hi there, I'm a little confused about designing OO programs. I've got decent experience with regular old C and spent the past week learning C++, but I dont know quite how to structure an 00 game. For example say i was making a simple top down tank game, I presume that tank would be a class that was derived from a unit class, along with other enemies. In a C game i would generally have a source file for logic and it would have something like for (i=0; i< NUM_OF_UNITS; i++) {move_unit(&enviroment->unit);} , or something along those lines. Is the way to do that in OO to have a class called enviroment with an array of units inside and a function run_logic() that calls units.move_unit() for every unit? as in the whole program would have no functions outside of classes. heh i guess i dont really know what im asking :S, but any advice would be appreciated. Or links to good examples, most of what i could find on the net was either trivial examples of "this is what a inheritance is..." etc, or open source projects that are too large to for an OO noob to follow