Terrible latency when playing VS AI online/lan

Game Version:

  • Build: 06-04-2020
  • Platform: Steam
  • Operating System: Windows 10
  • Gamertag: Benis

Issue: Terrible latency when playing VS AI online/lan

We played 2v2 against AI and got unbearable latency

Reproduction Steps:

Here’s how to reproduce the problem:

  1. Make an online/lan lobby
  2. Invite a friend and add 2 AI
  3. play for 10 minutes.

Now every command takes 10 seconds to register.

This is always worse on the lobby creators end.

1 Like

Yup. For me it comes after more like 20 min, but still. Specifically, commands take a long time to input, but the game goes on (more or less) at normal speed, sometimes slowing down or speeding up a little.

I imagine the AI is just spamming 1000s of commands a second, multiplied by the # of units it has. Like I watched a villager building a mining camp by my ally’s. The whole time the villager was flickering rapidly between the build animation and standing up straight, but the HP of the camp was going up at a constant rate. If the network has to transmit the commands for a single villager to pause and resume building 1000x per second, and everyone is at 800 pop, no wonder my commands get put in a queue already a million long. You can also see them spamming queued commands at ridiculous rates sometimes if you watch replays from their perspective.

Since this doesn’t happen with human players, even ones who spam commands super quickly like Hera, maybe it could be solved by implementing human-like limits on commands. Even something way above humanly possible like max 50 separate commands per second would still be enough for it to do well, especially considering that it uses humanlike strategies these days. And individual units no more than 5 commands per second or something.

Another solution that at least would solve the human perception issue would be to create a shared network command budget. Say send no more than 200 commands per second, and everyone is guaranteed to get at least 25 of those. Since humans don’t send more than 25 commands per second we would never perceive any lag.

Obviously my understanding of the exact netcode and the numbers are probably faulty, but you get the general idea :slight_smile: