wight-airmash / ab-server

2d multiplayer action game server for Node.js based on WebSocket communication.
https://airmash.online
MIT License
54 stars 21 forks source link

Disconnect inactive players, even in spectacular mode in CTF #101

Closed lgg closed 4 years ago

lgg commented 4 years ago

Some players (like xplay or H) sometimes are in CTF, but they are inactive for a long time. Ok, they are in spectacular mode, but team shuffling is unbalanced every time, because they still counted in shuffling.

I guess we could drop connection from the game to the main page, e.g. player is inactive for 10 minutes. Not in spectacular mode, namely inactive. We can check if tab with game is active for a player, if not - he is inactive.

What do you think?

wight-airmash commented 4 years ago

I don't think that's going to solve the problem. Like on the old server, people will manually keep "active" status (respawn and switch back to the spectate mode). Someone will write an extension, it's quite simple. Since the tab's focus status check is a client part, it is also easy to fake.

The source of the problem, as you mentioned, is in the current balance system. It does not take into account a lot of things, including activity status. So far, I am busy writting an external balance system. You may try to make some improvements to the current implementation, for example by removing the spectating or afk for N minutes players from the shuffle.

Also there is an optional AFK_DISCONNECT_TIMEOUT configurable server parameter, if the situation becomes completely unbearable.

lgg commented 4 years ago

similar to https://github.com/airmash-refugees/game-ideas/issues/10

wight-airmash commented 4 years ago

That idea requires much more work because it needs a real-time balancing to implement.

I'm finishing some experimental version of CTF, so maybe I'll add afk-fix in shuffle by myself soon.