Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Having troubles handling pre-game room disconnections with TTL (to reconnect in-game)

$
0
0
We need to either kick an inactive person, or change TTL before we change from pre-game to in-game.

Our situation is this:
* We start in a pre-game lobby to gather players in a room with 12 min TTL with in-game reconnections in-mind
* When a player is disconnected in a pre-game room, they "linger" for 12 mins.

So we had 2 ideas to resolve this:
* Simply kick them on activity changed callback ONLY while in pre-game. Disconnected in pre-game? Bye. However, you can't kick inactive players, for some reason (why?)

* You can set tons of room options after created, so start with 0 TTL and change the TTL to 12 mins just before the game. However, it seems we can't change TTL after the room is created (why?)

Suddenly, all ideas become complicated no matter what we do past here. This leads to some questions:

1. How come we can't kick an inactive player? This makes sense during pre-game "staging".
2. Why can't we change the room TTL post-creation?
3. Any alternatives or recommendations?

The "last resort" workaround sucks:
* We have max 16 players. Instead, we allow max 31 players.
* We'd have to change all UI to reflect a # of inactive players.
* Upon activity change, we'd have to hide the UI as if they actually disconnected (show 1 less player, remove their name from the playerlist), even though they are still "there", lingering.
* If the player queues up for a game normally (randomly), we'd have to check somehow upon failure to join if it was because you were unable to REJOIN. Then rejoin instead of join (otherwise the player will create a room since he can't join the same room he's inactive inside).
* In-game, we'll need to initialize checking based on inactive players and handle awkwardness of a player over our limit that "rejoins".

Overall ,it's super awkward, all because we can't kick an inactive player or change the player TTL :pensive:

Viewing all articles
Browse latest Browse all 15755

Trending Articles