Oliver-Akins / Phantom-Ink-Online

The online prototype for Resonym's game titled Phantom Ink.
http://phantominkgame.com/
6 stars 2 forks source link

Ending game #26

Closed Oliver-Akins closed 3 years ago

Oliver-Akins commented 3 years ago

Add a way for the game to end by users clicking a button so we don't get a memory leak.

Oliver-Akins commented 3 years ago

@Ramenhotep -> For ending the game, how does adding an "Back to Lobby" button in the popup for the attributions that can be clicked to go back to the game lobby, as well as adding a watcher to the server that checks if any games have no clients connected and then kills it.

Ramenhotep commented 3 years ago

Not super high priority for me. I would definitely want that if we could tell when a correct guess had been made, but since we can't... I'm fine with just having players refresh.

Oliver-Akins commented 3 years ago

Now that I'm thinking about it... we actually could check for a correct guess. I store the chosen object in the Game and the team answers are in the Team, so what we could actually do is once a team has the correct guess (+ a . at the end of it) is change the hand area from any cards/text to be an end game/back to lobby button.

And the primary purpose of room deletion/ru-use isn't necessarily to make it so the same room can be played multiple times but moreso to make sure that the server doesn't run out of memory, because whenever a game is created, that takes memory of the system, and if there's no methods of deleting those games that are not in use, then they'll slowly increase the RAM until the entire server crashes because it ran out.

Ramenhotep commented 3 years ago

I was wrong. The consensus among the team is that we should have a new game button. Could one be added next to your attribution button? It doesn't need to autodetect the end of the game, just have a confirmation popup. The survey could be moved to that popup, but doesn't need to be.

Ramenhotep commented 3 years ago

Alkali says this is already implemented. Going to make the period optional