secret-hitler
secret-hitler copied to clipboard
Games should not auto-delete when everyone leaves
Is your feature request related to a problem? Please describe. This is mostly an issue for moderation, when a game is remade or everyone leaves, it should not auto-delete immediately.
Describe the solution you'd like The most optimal solution would be that games when this happen get marked as inactive, and are hidden from DisplayLobbies.jsx, except for moderators. And in the same way, they should not kick moderators back to the lobby when the game becomes inactive. They can be put on a timer past that, in that inactive games are available to moderators for say 10 minutes, then hide for them as well.
Additional context Depending on who takes this up (maybe me, we'll see) I have a pretty solid idea about how to get it done. [This issue is relatively involved and large]
Would love to get some input on this - Jordan says that this apparently was a thing in the past but didn't work so well or turn out correctly?
If the issue is that we are worried about trolls inflating the game count and causing lag, I suppose a alternate solution could be to just store Gamechat for a remade/deleted game, accessible only by AEM?
I don't recall anything similar to this being attempted before, it all sounds good to me. Ideally, inactive tables and their chats would be stored indefinitely, accessible via UID, not necessarily from lobby. No idea how difficult that would be, but we kind of already do this with replays, no? Priority should be storing chats, though, as they are usually most important.
I think this will take a bit of research mainly, as my biggest fear is that of overloading the server, as games are only held in server memory, and an excess of them may be detrimental. The primary thing to figure out would be how long we can keep the game around technically, and how long it would be most efficient for AEM, I was thinking around 10 minutes. Other than that, storing them indefinitely may not be terrible, it would just need a storage system setup in the DB, but then it would also need a relatively complex rendering method, as opposed to just leveraging the existing game rendering methods.
Maybe 15 or 20 min just to be on the safe side.
Okay, so I think I've kinda got it working, the only instances in which where a game would have normally been deleted that isn't getting this 15 minute delay are:
- Mod End Game Deletions
- Manual Modlog Deletes
- If everyone leaves a unstarted game (up for discussion - I think leaving all of these may be an issue in terms of lag)
Are there any other instances you can think of that shouldn't have the delay on being deleted? @Max1071
Those 3 look good, and no I can't think of any others.
This will be a feature, and I have it mostly ready, but will rebase and recreate it after redis, and the lag issues are fixed.
please stop deleting games immediately after they end. I really want at least like 1-2 minutes to chat about them afterward.
game lobbies used to hang around until the last player left -- I feel like you could find a happy medium by making it when the last player leaves, OR 3 minutes. just anything except 2 seconds. please.
bump... can we at least have like 90 seconds to even see the lines and talk about a game after a silent game ends? I fully support why games should be auto-deleted in principle but does it have to be RIGHT AWAY? :(
I think it was planned to be removed / reduced in the latest update, but didn't make it in.