RTS Netcode: any tips?

Miscellaneous Forums/General Discussion/RTS Netcode: any tips?

as long as what the player sees on his screen is the same as what someone elses player sees, with regards to where the units are, what action they are engaged in and their hp/energy/death/effects status' are. Then there is no problem.

In other words. If it doesn't effect gameplay. It can be different on each machine. For example. Idle animations. Hell.. Even character models (America's Army anyone?)..

As long as units move to the same locations, at nearly the same time (notice, you could give units identicle orders, know that the pathfinding will get them all to the same place in the same way, and just interrupt if that changes and readjust if units aren't -exactly- in the same place) the player won't know or care that his orc is dancing on his screen while on his friends screen the orc is giving you the finger.

As long as when something comes up to attack it, they both reflect the same HP. do the same attacks, and otherwise do the same things.

It is a lot less information than you think.

And you can get crafty and leave out info that one player doesn't know and can't see if you really want to. As long as when he 'discovers' the base it doesn't just blink in.

In other words.. the server could keep tabs on the map and if the 2 (or more) players can't see eachother, they just don't bother to send that info. I mean... If all the base building is going on under fog-of-war ... why send the info.

Then when the other player uses some magic to spy in that location. The server sends the info before it is 'enacted' and that info would be what buildings are where, how much HP they have, and where units are and where they are headed and what they are doing.

Unless you are dealing with thousands of on-screen units, you shouldn't run into any trouble.

And if you don't plan to have thousands of ON MAP units.. you prolly don't have ANYTHING to worry about.