Unit selection in RTS

Started by
0 comments, last by pasman 21 years, 6 months ago
Hi there, I''m working on a 2D RTS game written in Delphi and i got into a little optimisation problem. I keep my units in an array, containg a lot of things, including the world coordinates(i don''t use tile related coordinates) anyway when i''m trying to select a group of units and the player controls at the moment say 100 units, it takes some time to select the group because i search the entire list of units for those who are inside the selection rectangle. What i''m asking is how should i store the units or how can i usee a faster search algorithm. Hope i''m not very confusing. Thanks in advance.
Advertisement
donno if this helps you or not
http://www.gamedev.net/community/forums/topic.asp?topic_id=104743

This topic is closed to new replies.

Advertisement