FAForever / server

The servercode for the Forged Alliance Forever lobby
http://www.faforever.com
GNU General Public License v3.0
66 stars 61 forks source link

Unrank custom games after fixed time #1011

Closed Askaholic closed 4 months ago

Askaholic commented 8 months ago

As per discussion on Discord, it was requested to change the unrank timer for custom games to a fixed time of 2 minutes. Currently the time is based on number of players in the game:

https://github.com/FAForever/server/blob/665454a5d8a2d97a1b512f89bcadef7a25343e6a/server/games/custom_game.py#L24

This should be a very simple change to the function linked above. Probably will need to adjust some unit tests as well.

Discord thread: https://discord.com/channels/197033481883222026/1221544919735468042

MostLostNoob commented 8 months ago

Per that discord conversation, the current system is based on real time minutes * number of players in the game, but the suggestion is to change that to a flat/static 2 game time minutes instead.

Askaholic commented 8 months ago

Unfortunately the game time isn't available to the server. It will have to be based on real time.

magge-faf commented 8 months ago

Doesn't real time minutes mean, when someone lost connection or crashed in the very early phase, that his opponent can just press pause, and sips his tea for two minutes, then unpauses the game to make it ranked in his favor, when the game ends shortly after?

Or does some event/security prevent that possibility in the first place?

BlackYps commented 6 months ago

Yes. No, there is no protection against this

AlexChaloner commented 4 months ago

Seems like we need to get the game-time minutes from the server, as per the discord discussion, which doesn't seem easy and so I think makes this not a very "good first issue" as currently labelled?

Askaholic commented 4 months ago

Making the in game time available to the server is a much more complicated feature, and to be honest, I can tell you right now that it will never be done. That should be captured in a different issue. This issue is for changing the existing logic to use a fixed time rather than time based on number of players. If that is no longer desired then we should close the issue. However, changing the time to be fixed is appropriately easy for a first issue.