I am in the later stages of a small game project, and am just looking through things to improve here and there for a more efficient app.
I'm wondering what the best opportunity to save a file would be.
The file only contains an array with a single Hi-Score, and only saves under one of the following conditions:
- There is a new Hi-Score and the player clicks "Replay Level".
- There is a new Hi-Score and the player clicks "Return to Menu".
- There is a new Hi-Score and the player clicks the device "Back" or "Home" buttons.
The menu and levels are contained within the same application frame, so the "Replay Level" and "Return to Menu" buttons simply restart the frame with separate "Start of Frame"-events, always loading the save file and setting the current Hi-Score to whatever was stored within.
If there is a comprehensive Save / Load guide available, I would love a link!
Thanks in advance!