nvs / gem

Gem TD+: A Warcraft III Tower Defense
https://discord.gg/PxNNp77
26 stars 2 forks source link

Detect AFK players (sort of) #297

Open nvs opened 7 years ago

nvs commented 7 years ago

This is needed for rated games in #133, to assist in automatically marking a player's finish time if they have gone AFK for too long. The rationale is that if a player opts for a rated game, then they most likely are planning to compete. Going AFK for an extended period puts a burden on players still present, as they may feel compelled to finish even if they believe an AFK player has no intention of progressing but is still present.

Now, for Gem's purposes, we do not really need to detect whether a player is actually AFK. We need only determine if they have spent too long doing no useful action within the context of the game. This would prevent intentionally extending an AFK timer by chatting, for example. To simplify matters even further, we need only look at the time between finishing a level and start the next level (i.e. spawning monsters). The period I've been calling the placement phase.

I am thinking of an AFK timer that grows during the placement phase and gives a warning after a set amount of time. If the timer reaches the threshold, that player's rated game is effectively over, and their progress is marked.

nvs commented 5 years ago

The rationale behind this idea is still valid. A player going AFK for extended period of time does put an undue burden on those who are not AFK. However, what would the implementation details look like?

But it should be noted that rated games, in the sense discussed above, are not entirely possible in a world without bots. Whether they will be possible down the line is unknown. As such, the issue can be put on hold.