Let me describe my situation:
I want to develop the game, that is, a round base and pay for the game. This means that you pay one coin for one round of the game, for example, Pinball, etc.
The problem is that when there is an interruption, ideally the game should pause and resume whenever the user wishes. Realization of this task is a difficult task. Say my game was placed in the background, I would save the state of the game in ApplicationDidEnterBackground. However, the game may or may not be terminated in the background. Thus, the next start may be a “new start” or “resumption of the last saved state”.
If the application remains in the background for a long time, say, 1 week, it is almost certain that other applications fighting for memory will lead to the termination of the game at some point. When the user starts my application again, they will play in a new round, which means that the previously unfinished game has disappeared.
From the client’s point of view, this is unfair.
I can think of implementing it so that whenever my application comes to the fore, I would see if the game was saved. If it were, I would come back instead. This creates a security issue:
A saved game, either in most primitive plist formats or in other formats, is saved and creates security problems. (What if the players edit the state of the game and score 10 million points as a starting point ... etc.)
Are there any recommended solutions to these problems?
I see that some applications simply refuse to save the game, and a new round starts when it resumes. They don’t pay for games, otherwise I can imagine that users are very angry.
I saw some applications that keep the state of the game for a while, but when it ends, the next time it starts, it will start a new round. Which seems equally unacceptable when the players really paid money for the round.
And given the possibility of failures, I can’t come up with a good solution to guarantee that the client will be able to play the full round of the game. It would really help me if someone with relevant experience could share their thoughts and how they make their decisions.