RTS client unit selections are stored best where?

Hi
For my RTS..
I am storing the units that my player-client selects on the client and adding which units are selected to the action encoding message to the server.
However, I can make it optimal, so that each time a unit is selected or deselected, the server is informed, so knows what is selected by each client, so ctrl-clicking groupings is simple and units associated with an activity is simple too if the server knows what units have been selected.
It is always either a grouping or a selection that is moved. If hundreds of units are selected, possible, the byte[] would be huge.
Is this what pro RTS's do?

Thanks
LVL 1
beavoidAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dpearsonCommented:
Passing the selecting of units in a group to the server seems perfectly reasonable.

This is worth doing if movements are common and selecting groups is less common because it's less total data to transmit to and from the server.

For n units in the group making k moves before the group changes the total data is:
O(n) + O(k)   // Send group O(n) and then send the k moves O(k)
if you send the group information.

If you don't send the group information the total data is:
O(k*n)   // Each move needs the list of units to move

For most RTS's that's exactly the situation - you might form a group once and then issue a dozen unique movement commands to it.  So this is a good plan.

Doug
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.