(Unity3d) Run game logic regardless of Android lock screen making the game inactive?
Options
Hi. This might be more of a Unity question but here goes:
I have a 4-player turn based game on Android, where the master client is in charge of changing the turns.
When the master client locks his screen, the game becomes inactive and the timer countdown stops on all clients.
All players are also able to lock their screens to prevent their units from dying on their end, which causes all sorts of glitches gameplay-wise. Is it possible to run code on a server or something, so that the phone state doesn't affect the gameplay? I'm assuming games like Hearthstone do this.
I could make the photon "time to live" value significantly smaller but I don't want players to disconnect by accident. Any tips/help?
Thanks in advance
I have a 4-player turn based game on Android, where the master client is in charge of changing the turns.
When the master client locks his screen, the game becomes inactive and the timer countdown stops on all clients.
All players are also able to lock their screens to prevent their units from dying on their end, which causes all sorts of glitches gameplay-wise. Is it possible to run code on a server or something, so that the phone state doesn't affect the gameplay? I'm assuming games like Hearthstone do this.
I could make the photon "time to live" value significantly smaller but I don't want players to disconnect by accident. Any tips/help?
Thanks in advance
0
Best Answer
-
Hi @Spoland,
Thank you for choosing Photon!
You have 3 options:
- continue tweaking client code, read more about "Host Migration and Master Client".
- go with Enterprise Cloud, we could probably change some settings for your private servers.
- self host your own servers.5
Answers
-
Hi @Spoland,
Thank you for choosing Photon!
You have 3 options:
- continue tweaking client code, read more about "Host Migration and Master Client".
- go with Enterprise Cloud, we could probably change some settings for your private servers.
- self host your own servers.5 -
Thanks for the reply.
Guess I'll have to modify my game logic in a way that enables certain game states and events to be synchronized/recreated for a client that missed the last 5-10 seconds of the game by being inactive.
And over 10 seconds of inactivity should probably just result in a kick from the game or something.0