RTS Networking talk

I am currently designing the network communication for the RTS elements in my game.

More or less all articles on the web point to 1500 arcers ‘AoE’ description…

Since it is pretty straightforward i already implemented the ‘command frames’. All in all i am already kind of happy that the basic system seems to work in a LAN environment.

I currently process 3 command frames / sec.

For testing purposes i have includes some random execution delays which simulates lags on one client

My CommandFrame System.

a) Server Starts Frame 1

b) Clients push command to server

c) Server pushes Frame 1 to the clients and starts Frame 2

d) Client pushes command to server and confirms Frame 1

e) Server confirms execution for Frame 1 on all clients.

f) Server start Frame 3, Frame 1 gets executed on the Clients and Frame 2 gets pushed to the clients.

If the introduced lag happens during frame propagating i have no problem since it simply gets delayed for all clients. But as soon i have some lag during the execution of the actual commands the client with the lag is out of synch.

Anyone with some ideas about that? I am really thankful for the smallest link/idea.

Well the modern games either have the same lag, slowdown issues, or use a more fps like networking, so if one pc lags and si slow he is simply a bit behind. If the lag/lost updates reaches a limit, the game is paused and the other players can wait and/or vote to lagkick the problematic player.

Thanks for the response. I am fully aware that modern games have the lag/slowdown issues. Thats not a problem however, the real problem is that the whole system gets out of synch if some delay happens after ‘command’ confirmation and before execution…

The only solution which comes into my mind is to revert all actions belonging to that command frame on every client and redo the actions one frame later. For this i would need to revert any possible action…

You should not try to sync frames, just sync values and care for drift by periodically checking the absolute outcome.

1 Like

mhm, i am not sure if it’s possible to sync a few hundred objects without syncing only the commands the player give.

In worst case i have to sync even projectiles…

A other question, any tools out there which allows to simulate packed drops, latency spikes and similar issues on a local machine?

I strongly suggest to send the absolute values every time, it makes live easyer, and wont need that much bandwidth compared to a sending only the delta of the value approach.

I guess you already found that one, but I put it here as a reference in case of :slight_smile:

@kwando said:
I guess you already found that one, but I put it here as a reference in case of :)


Indeed, i have implemented the 1500 archers design, however the article does not cover the scenario when a command gets confirmend but the execution is delayed

Sorry for the stupid question, but…

I’m having trouble understanding the unerlining approach. It seems counter-productive to hinge the entire system around the weakest link. I want to second what @normen had to say.

Whats the weakest link in your opinion?

The system in the article (1500 archers in age of empires) says that is actually not possible to synch 1500 objects perfectly. Maybe (since it is an old article) this does not apply anymore to the current internet connections.

As solution the article suggests to only synch the player actions necesarry to have all games 100% synched all the time. The command framing actually works pretty well most of the time. However when a client lags after confirmation of the command frame and before executing it’s commands this client is out of synch.

Acutally i am going to write a stress test. Since i don’t use a peer to peer technology but a authoritative server even if the clients are slightly off synch it maybe is not noticable…