Can a spectator cause lag or slow down the simulation?
I haven't seen any evidence of this happening in a long time but still always when I say "specs won't lag the game" several people say in half rage that definetly lag, it's a myth etc.
(I don't mean cases like dial-up or MARS autohost where drawing a line increases ping over 1000)
Spectator lag
Moderator: Moderators
Re: Spectator lag
A spec cannot lag the game from their ping, no matter how high it gets. A spec will slow the game when they have high cpu use IF the host is configured to let them. Many autohosts ignore spec cpu use.
Re: Spectator lag
It's not rocket science (for the millionth time).Pako wrote:Can a spectator cause lag or slow down the simulation?
Spectators run the simulation just like players, so they can cause the server to reduce game-speed for everybody just like players (without the enforceSpeed host option).
Spectators can send certain commands (eg. map-draw messages) just like players, so they can cause lag for everybody just like players.
Summary: a spectator is just another client, each of which eats up a little bit of the host's bandwidth to receive the network stream.
Where the myth part comes in is the simple fact that just because they can does not mean this is a problem at all in practice.
Re: Spectator lag
An other myth about specs lagging the game:
The Host will need more upload bandwidth, and if it has a fairly low limit there, specs could cause lag.
I doubt that this will likely be relevant ever, but i lack numbers.
In case this would be a problem, would it be possible to use Multicast?
Current way it is done:
The Host will need more upload bandwidth, and if it has a fairly low limit there, specs could cause lag.
I doubt that this will likely be relevant ever, but i lack numbers.
In case this would be a problem, would it be possible to use Multicast?
Current way it is done:
Code: Select all
void CGameServer::Broadcast(boost::shared_ptr<const netcode::RawPacket> packet)
{
for (size_t p = 0; p < players.size(); ++p)
{
players[p].SendData(packet);
}
...
Re: Spectator lag
Nope, this has changed in 0.81 so the default is NO slowdown for specs.Kloot wrote:Spectators run the simulation just like players, so they can cause the server to reduce game-speed for everybody just like players (without the enforceSpeed host option).
Re: Spectator lag
Yeah, atleast since 79.1.2 this line have been in the code where sim speed is calculated:
if(!enforceSpeed || !players[a].spectator)
I wonder why these myths are so persistent.
if(!enforceSpeed || !players[a].spectator)
I wonder why these myths are so persistent.
Re: Spectator lag
Cause people don't understand basics. I remember have been kicked when I was spec with 30% CPU usage, game at 0.5 speed and some players with 70% CPU usage. A simple : "WTF game is slow ?! kick specs !!!" was needed.
Re: Spectator lag
Nope, if you read the line more carefully, you will see that since enforceSpeed=0 normally, specs could indeed affect speed. But like I said not since 0.81. Case closed.Pako wrote:Yeah, atleast since 79.1.2 this line have been in the code where sim speed is calculated:
if(!enforceSpeed || !players[a].spectator)
I wonder why these myths are so persistent.