Gamespeed
Moderator: Moderators
Gamespeed
Since many games get ruined because of low gamespeed, I'm opening this thread to discuss the issue.
Low gamespeed is mainly caused by:
* Players that have slow machines.
* Accidental adjustments of the gamespeed during gameplay that go unnoticed.
* Intentional adjustments of the gamespeed made by players who have slow computer or network.
I suggest some changes to remedy the problem:
* Gamespeed locked to 1.0 by default when hosting.
* The code in GameServer that adjusts the gamespeed should be based on the median player instead of the slowest player.
* The code in GameServer that currently allows speed to drop to 0.5*userspeed should be changed to 0.8*userspeed, and perhaps configurable
* The ability to pause the game may need to be restricted somehow, because players who cannot keep up the speed tend to abuse it.
* I previously considered the possibility to make some kind of voting system that triggers automatically and suggests kicking of slow clients, but I'm not so sure this is needed with the above changes.
FYI, the CPU usage has a different meaning for those who will be running the multithreaded version. With multithreading, any CPU usage less than 100% means that your system can keep up the speed, while the single threaded version can start to slow down the game at any CPU usage really (usually around 50%). It will be highly dependent on the graphics card since the rendering must be run on the same CPU, at least once every 15 game frames. This complicates things further for the algorithm that adjusts the speed based on CPU usage.
Low gamespeed is mainly caused by:
* Players that have slow machines.
* Accidental adjustments of the gamespeed during gameplay that go unnoticed.
* Intentional adjustments of the gamespeed made by players who have slow computer or network.
I suggest some changes to remedy the problem:
* Gamespeed locked to 1.0 by default when hosting.
* The code in GameServer that adjusts the gamespeed should be based on the median player instead of the slowest player.
* The code in GameServer that currently allows speed to drop to 0.5*userspeed should be changed to 0.8*userspeed, and perhaps configurable
* The ability to pause the game may need to be restricted somehow, because players who cannot keep up the speed tend to abuse it.
* I previously considered the possibility to make some kind of voting system that triggers automatically and suggests kicking of slow clients, but I'm not so sure this is needed with the above changes.
FYI, the CPU usage has a different meaning for those who will be running the multithreaded version. With multithreading, any CPU usage less than 100% means that your system can keep up the speed, while the single threaded version can start to slow down the game at any CPU usage really (usually around 50%). It will be highly dependent on the graphics card since the rendering must be run on the same CPU, at least once every 15 game frames. This complicates things further for the algorithm that adjusts the speed based on CPU usage.
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Gamespeed
set[min|max]speedzerver wrote:* Gamespeed locked to 1.0 by default when hosting.
Useless. Having lots of fast clients doesn't make the slowest faster.zerver wrote:* The code in GameServer that adjusts the gamespeed should be based on the median player instead of the slowest player.
Too less to be effective.zerver wrote:* The code in GameServer that currently allows speed to drop to 0.5*userspeed should be changed to 0.8*userspeed, and perhaps configurable
nopausezerver wrote:* The ability to pause the game may need to be restricted somehow, because players who cannot keep up the speed tend to abuse it.
Yay, instead of slow games, we have ruined games. Beside that, only the host should be allowed to kick people.zerver wrote:* I previously considered the possibility to make some kind of voting system that triggers automatically and suggests kicking of slow clients, but I'm not so sure this is needed with the above changes.
Indeed an issue. Any ideas?zerver wrote:FYI, the CPU usage has a different meaning for those who will be running the multithreaded version. With multithreading, any CPU usage less than 100% means that your system can keep up the speed, while the single threaded version can start to slow down the game at any CPU usage really (usually around 50%). It will be highly dependent on the graphics card since the rendering must be run on the same CPU, at least once every 15 game frames. This complicates things further for the algorithm that adjusts the speed based on CPU usage.
Re: Gamespeed
When a speed down occurs, logging it in the console could be useful for host to manage players.
As you can't see the speed downs, after 30mn of intensive gaming, you realise "WTF the game runs at 0.35 !? Is a single player screwing the whole game ?".
As you can't see the speed downs, after 30mn of intensive gaming, you realise "WTF the game runs at 0.35 !? Is a single player screwing the whole game ?".
Re: Gamespeed
The purpose is to get rid of the slowest players. If I understand correctly, players will drop if they cannot keep up with the server gamespeed.Auswaschbar wrote:Useless. Having lots of fast clients doesn't make the slowest faster.zerver wrote:* The code in GameServer that adjusts the gamespeed should be based on the median player instead of the slowest player.
This is a matter of taste. Personally I'd much rather have a fast game with some people that get kicked than a slow one without the kicking. The remaining players can always take...Auswaschbar wrote:Yay, instead of slow games, we have ruined games. Beside that, only the host should be allowed to kick people.zerver wrote:* I previously considered the possibility to make some kind of voting system that triggers automatically and suggests kicking of slow clients, but I'm not so sure this is needed with the above changes.
Re: Gamespeed
It is even worse when u discover that the game has been set to run at 0.6 the whole game, for no particular reason.Masure wrote:When a speed down occurs, logging it in the console could be useful for host to manage players.
As you can't see the speed downs, after 30mn of intensive gaming, you realise "WTF the game runs at 0.35 !? Is a single player screwing the whole game ?".
Re: Gamespeed
Just put a dot next to the slowest player when the game is running at full slowdown, then let the players decide what to do. Having to guess from CPU usage isn't helpful.
Re: Gamespeed
I don't know if the engine should really be doing that, and such a marker should be able to show how much faster it'll go without that person. If it's something like 2%, kicking isn't a good idea.
Re: Gamespeed
Good point. But focusing on one player at a time raises another problem - suppose we have two equally slow players. The system will have a hard time detecting which is the slowest, and it will also say that it will be 0% faster if either of them is kicked.lurker wrote:I don't know if the engine should really be doing that, and such a marker should be able to show how much faster it'll go without that person. If it's something like 2%, kicking isn't a good idea.
I think it is much better and simpler to enforce the gamespeed and simply let some players drop - Any player being slower than the median player if the game speed is not within the acceptable range.
Re: Gamespeed
I think so. The necessary time spent in Draw() should be counted as "Sim time" for the single threaded version. One Draw call every 15 Sim frames, that is.Auswaschbar wrote:Indeed an issue. Any ideas?zerver wrote:FYI, the CPU usage has a different meaning for those who will be running the multithreaded version. With multithreading, any CPU usage less than 100% means that your system can keep up the speed, while the single threaded version can start to slow down the game at any CPU usage really (usually around 50%). It will be highly dependent on the graphics card since the rendering must be run on the same CPU, at least once every 15 game frames. This complicates things further for the algorithm that adjusts the speed based on CPU usage.
Re: Gamespeed
Mystery meat GUI?YokoZar wrote:Just put a dot next to the slowest player when the game is running at full slowdown, then let the players decide what to do. Having to guess from CPU usage isn't helpful.
Re: Gamespeed
That won't work. In the heat of the battle, do you expect anyone to have time checking for small dots? ROFLYokoZar wrote:Just put a dot next to the slowest player when the game is running at full slowdown, then let the players decide what to do. Having to guess from CPU usage isn't helpful.
Re: Gamespeed
IMO none of these automatic things should be changed, but possibly a menu should pop up when the game is lagging badly (whether it's network or CPU). This menu should pause the game.
If it's network lag and the player(s) kept up again, then the menu should disappear silently and game continue.
If it's CPU lag the menu could offer the host the possibility to kick this player, or to continue (in which game menu shouldn't come up again for CPU lag).
If Sim has a single full core this would be wallclock time used for Sim divided by total wallclock time.
If Sim has to share it's core with rendering, use wallclock time used for Sim divided by wallclock time spend doing pointless things while waiting for next NEWFRAME message. (pointless things = rendering second, third, fourth etc. time after a single NEWFRAME)
If it's network lag and the player(s) kept up again, then the menu should disappear silently and game continue.
If it's CPU lag the menu could offer the host the possibility to kick this player, or to continue (in which game menu shouldn't come up again for CPU lag).
Don't send CPU speed over the net, but send some corrected CPU speed over the net.Auswaschbar wrote:Indeed an issue. Any ideas?zerver wrote:FYI, the CPU usage has a different meaning for those who will be running the multithreaded version. With multithreading, any CPU usage less than 100% means that your system can keep up the speed, while the single threaded version can start to slow down the game at any CPU usage really (usually around 50%). It will be highly dependent on the graphics card since the rendering must be run on the same CPU, at least once every 15 game frames. This complicates things further for the algorithm that adjusts the speed based on CPU usage.
If Sim has a single full core this would be wallclock time used for Sim divided by total wallclock time.
If Sim has to share it's core with rendering, use wallclock time used for Sim divided by wallclock time spend doing pointless things while waiting for next NEWFRAME message. (pointless things = rendering second, third, fourth etc. time after a single NEWFRAME)
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Gamespeed
Simpler yes, better no. Slow game is better than dropped players. I personally prefer to play games till the end instead of letting half of the players drop during mid-game.zerver wrote:I think it is much better and simpler to enforce the gamespeed and simply let some players drop - Any player being slower than the median player if the game speed is not within the acceptable range.
You only need to check dots when game runs slow, and when it's slow you have time to check them. QED.zerver wrote:That won't work. In the heat of the battle, do you expect anyone to have time checking for small dots? ROFLYokoZar wrote:Just put a dot next to the slowest player when the game is running at full slowdown, then let the players decide what to do. Having to guess from CPU usage isn't helpful.
Still better than having half of the players drop during heat of the battle (beside they would not lag after the battle has ended).
I either get you wrong, or everyone will have 100% CPU usage then (because there aren't more CPu-time consumers other than Draw and SimTime).zerver wrote:I think so. The necessary time spent in Draw() should be counted as "Sim time" for the single threaded version. One Draw call every 15 Sim frames, that is.
No, its purpose is to reduce CPU load so players don't drop.zerver wrote:The purpose is to get rid of the slowest players. If I understand correctly, players will drop if they cannot keep up with the server gamespeed.
1. you can kick them any time. No change required.zerver wrote:This is a matter of taste. Personally I'd much rather have a fast game with some people that get kicked than a slow one without the kicking. The remaining players can always take...
2. imho, if you aren't playing dsd 6v6 or speedmetal, dropped players means gg and no game at all
Re: Gamespeed
Not all Draw calls, only one every 15 Sim frames.Auswaschbar wrote:I either get you wrong, or everyone will have 100% CPU usage then (because there aren't more CPu-time consumers other than Draw and SimTime).zerver wrote:I think so. The necessary time spent in Draw() should be counted as "Sim time" for the single threaded version. One Draw call every 15 Sim frames, that is.
Again a matter of taste. A slow game means gg for me because I get bored and basically stop playing.Auswaschbar wrote:1. you can kick them any time. No change required.zerver wrote:This is a matter of taste. Personally I'd much rather have a fast game with some people that get kicked than a slow one without the kicking. The remaining players can always take...
2. imho, if you aren't playing dsd 6v6 or speedmetal, dropped players means gg and no game at all
Re: Gamespeed
Auswaschbar, to clarify, in single threaded version time is "wasted" re-rendering the same simulation frame as much as possible, while waiting for the next NEWFRAME network message. These time wasting renderings should not be counted for Sim CPU usage, while other - required - renderings should be counted. This could be one rendering frame ever 1-15 sim frames I suppose. (dunno what we'd consider acceptable minimum FPS..., maybe 10?)
Re: Gamespeed
A descriptive icon, rather. Just something that calls attention to "hey this is the player slowing down the game, see look at his CPU load"AF wrote:Mystery meat GUI?YokoZar wrote:Just put a dot next to the slowest player when the game is running at full slowdown, then let the players decide what to do. Having to guess from CPU usage isn't helpful.
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Gamespeed
This needs to be an API accessible by Lua since a lot of folks are running UI mods now and not the default player status list. I suggest two icons, a computer chip with a lightning bolt through it for CPU issues, and a network jack / cable with a lightning bolt through it for network issues which would include ping time over 500Ms, delayed frames, or desync.
Re: Gamespeed
If you mean the advanced player list widget, the last two symbols are already network and cpu.
If you mean the player list in iceui, there are buttons to switch it to this info.
Where did you get the impression that UI mods didn't have access to this data?
If you mean the player list in iceui, there are buttons to switch it to this info.
Where did you get the impression that UI mods didn't have access to this data?
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Gamespeed
I'm saying if there's a programmatic way showing which player is running sim time the slowest, or anything like that, it shouldn't be just in the default widget.
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Gamespeed
just remember that not everyone is running on superfast connections or is in the europe/us, my ping usually floats between 500-1000msel_matarife wrote:I suggest two icons, a computer chip with a lightning bolt through it for CPU issues, and a network jack / cable with a lightning bolt through it for network issues which would include ping time over 500Ms, delayed frames, or desync.