Closed MaxCWhitehead closed 1 month ago
cc: @RockasMockas - I imagine this has something to do with not keeping matchmaking client's connections live all the time (if I recall that is how this is setup). I haven't dug into the fix here, not sure how tricky this is or if not too bad.
Worth noting game probably shouldn't do anything unrecoverable when reaching max players anyway - as if it does and a player leaves before matchmaker actually starts game, that is an issue.
Yeah I pretty much designed it so that GameStarting should be the thing that causes the client to move forward.
Alternatively to make this a bit more robust (something I had in mind but didn't have time for) is that we should implement the ability for both client -> matchmaker to ping, or matchmaker -> client to ping. Then in the current connection checking code where we send the MatchmakingUpdate
to check if everyone's online, we replace that with a matchmaker -> client ping.
In bones we'd read the ping and just respond with an ack confirmation, and from the developer point of view the ping would never reach them/be bothered to deal with manually.
This is a flow that I think will be good to do for long-term robustness/cleanliness, but in real terms if you just watch for GameStarting
right now I don't think you should run into any issues.
ok - sounds good to me, I will probably just close this as pretty minor issue.
I noticed that if I close the game during matchmaking, and restart and search for another match with two players, it reports matchmaking update with 2 players (duplicate - old DC'd client + new one), then immediately updates correcting back to 1.
(Note this does not occur if first client stops matchmaking explicitly, only if closes and exits uncleanly.
This is a minor issue, but if the game is waiting for players and does some state change after a
OnlineMatchmakerResponse::MatchmakingUpdate
reports all players needed for search (the first 2 reported for 2 max players), this may cause issues. If game does not do anything when reached expected player count, and waits for explicitOnlineMatchmakerResponse::GameStarting
, probably won't get into any trouble here.I tested with a local matchmaker so am certain I am the only client connecting and there was only 1 at any given time.