Question about starting games: 2012-12-14 16:53:28 |
Fizzer
Level 64
Warzone Creator
Report
|
Right now, force-join is not possible for CLOT games. It might be possible in the future, but I'd need to think of a way for it to not be abused.
You can work around this problem though. Just add an extra check to your code for games that are still waiting on someone to join and older than X days (you can choose how long).
How you handle this situation is up to you. I can think of a few options:
1. Just count it as a loss for the person that didn't join.
2. Just delete the game from your database and pretend it never happened.
3. In addition to 1 or 2, you can also kick the person who didn't join out of your tournament/ladder so if they're idle they won't get more games. Perhaps you only want to do this if they fail to join or get booted from several games and not just one.
|
Question about starting games: 2012-12-14 16:58:27 |
Fizzer
Level 64
Warzone Creator
Report
|
Here's how you'd check for this condition:
In the function cron.checkInProgressGames, check to see if the game's state is "WaitingForPlayers". This is how you know the game hasn't started yet. You can also look at the game's "dateCreated" property to see when it was made.
If you want to determine who is the player (or players) that didn't join, look through the "players" collection that the API returns. You can identify the players that didn't join by looking for a player state of "Invited". Invited means they've been invited to the game but haven't joined yet (it will change to "Playing" when they join.)
|