Another week, another IT’S TANKS! update released to the App Store: https://itunes.apple.com/app/its-tanks!/id568868930
This update is related to the “Unable To Create Match” issue I blogged about last week. The cause of that issue was games getting orphaned, when a player quit their opponent needed to get that information from Game Center which would then cause the game to end. If their opponent is no longer playing then there is no way for that game to end, leaving it orphaned and taking up one of the 30 slots for matches.
This new update will prevent matches from ever getting into that state. Since we want to be as transparent as possible, I’ll explain what we’ve changed. The main thing we need to do is not use the quit functions, as it is this that leads to this situation in the first place. When you quit and it is your turn we now end the game, which allows it to be cleaned up and does not rely on your opponent. This is completely invisible to you, everything appears to happen the same as it did before. A bigger change is you cannot quit when it is not your turn, unfortunately there is no way around this – when it is not your turn you cannot affect the game in any way except quitting which leads to this problem we’re trying to fix. So we’ve added time limits to the turns, if your opponent has not taken their turn in 2 days then the game counts them as having quit and the game is ended with you victorious. This stops you from quitting out of turn, which prevents the problem, and stops games indefinitely waiting for the next turn which is the main reason players quit in the first place.
We also have code in there to clean up any orphaned games we can clean up on your device (it has to be your turn). The game will ask if you are sure you want to delete these games as we cannot distinguish between truly orphaned games and games created on a second device.
This update will prevent this being an issue in the future and clean up what we can, however, most of the orphaned games will not be in a state where we can clean them up. To deal with these games we need Apple’s assistance to remove them from their servers, we are talking to Apple about this matter and will keep you updated.
Update Notes:
- Most of the changes in this update are behind the scenes stuff to prevent games getting orphaned which can lead to the “Unable To Create Match” issue.
- Turns will now timeout after 2 days, if you timeout you forfeit the match.
- Players can no longer quit when it is not their turn, this is to prevent games getting orphaned. The timeout means the game won’t get stuck even if the other player never plays again.
- Detection of orphaned games we can clean up. The choice to delete them is the player’s since starting the game on a second device will make games appear orphaned as we don’t have iCloud support yet.