The user's answers can change their exercise goals, with plans to also change other aspects of the game, including through the use of mental wellness checks, and alternative win conditions for missions if a user has a physical disability.
The second one I did was for Dash the dog, which utilizes the user device's step counter, via Unity's new input system, to track their progress on meeting their step goals. Additionally, there is a mechanism in place that will allow the user to make progress if the app is closed, as Android step counters are set up to count the total number of steps walked since the last device restart.
The third one I did was for Bruno the bear, to track the number of calories the user has burned. Calculation of this is based on the user's weight given at the start, the speed of which the user is moving according to the devices accelerometer, via Unity's new input system, and the amount of time that has passed since the mission started.
The system is tied to a manager object that persists across scenes, and tracks mission goals, progress, and the current game state which is tracked with Booleans. All of these variables are static and are read from their respective script by the manager. The game saves every 10 seconds to ensure an intuitive user experience by preventing data loss as much as possible.
Saves are set up to function locally using Json files and also with Google Play Games. The final iteration takes into consideration issues that may arise from sending too many API requests to Google Cloud for saving games. There is also a system for resolving differences between local and online saves.