Original Post
Hi all, I''ve been reading the forums for a while, and thought I''d take the plunge and ask some questions. I''m in the planning stage for my game at the moment, and am curious about the best way to organise the game objects (People, vehicles, projectiles, etc).
All game objects descend from a base class, so a list of base class pointers seems sensible. I''m considering an STL Vector, for the fast "random" [] operator, but as the game is an RTS type, I may also need separate Vectors for the units that are currently selected, and for user defined "teams" of units. Would it be better to declare many STL Vectors, or just loop through the same one, performing if(unit->selected) type tests?
Any of you guys had similar design procedures? What do you recommend? I''m more concerned with code readability than speed really, as it''s only my first DirectX effort (2D top-down RTS), but any help/experiences would be helpful.
Cheers - Chime.
Chime - SNES Mariokart veteran, 10 years on and still red-shelling on a weekly basis.