Set a delay before server shutdown and cancel matckmaker
In our game, and I think this must be the case in many games, we send certain data to our API at the end of the game, but we've noticed that when players disconnect, the server closes instantly, so the requests don't have time to be sent. this may have already been integrated, but I haven't been able to find it.
Something else that might be interesting would be to make a request to cancel matchmaking.
5 Replies
I'll cc @Nathan for this as he might have some ideas
When you say cancel matchmaking, do you mean when you've sent a request to start finding a lobby, and cancel the creation?
Also, for what it's worth, our matchmaking system is going through an overhaul under the hood that will make it a lot easier to add in custom logic even if the default matchmaker doesn't come with it 🙂
yep
cancel creation and the request if there are enough players to create a matchmaking queue
hey! i actually just added a "grace period" for shutdown (or letting you manually shut it down yourself). will go live within 1-2 weeks for godot.
a hacky workaround is to create two players (call .find, then call .join immediately after) so the matchmaker thinks there's always 1 player left in the lobby. then the server can shut down on demand by calling
players.disconnected on the last player.
(you can also use an exit code, but that requires some trickery: https://github.com/NathanFlurry/demo-godot-unix-exit)okay, perfect thanks!
np! keep an eye out for an announcement here soon.