Advertisement

Organizing Unit Data

Started by January 15, 2003 11:52 AM
0 comments, last by MrMichaelH 21 years, 10 months ago
I have setup a linked list for my units (RTS game), with a data segment pointing to the actual unit object. This list then is part of my players class. Player object has AddUnit, RemoveUnit etc functions. I also have it code so when player.addunit is called it adds a reference it to a linked list under each map cell, so I can call the units draw function from there. Is this the best way to organize my units data structures? Thanks, Mike
No, it's not. There is no "best" way to program something. Just go with what works well, cleanly, and fast. Your way looks good enough to me.

[edited by - Programmer Three on January 15, 2003 2:41:53 PM]

This topic is closed to new replies.

Advertisement