RTS Netcode: any tips?

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


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.


Not only can you omit sending the information if they can't see it, you SHOULD NOT send the information - otherwise people will be able to sniff the packets and get information that they shouldn't have. Ever hear of ShowEQ, the everquest program that read the info off the incoming packets and then displayed things on a players map they normally couldn't see? There are a ton of programs like that for every MMO that sends data that way, and there will be some for your program too if it gets popular.

I suppose you could send the info right away if you wanted, if you encrypted it. Of course, the extra time the server spends encrypting every message is going to be more overhead and more of a pain then just sending the info *only* when it is needed.