With the recent release of new iPhones and iOS 8, we found ourselves in the position where we had to update our iOS games. If we didn’t, our apps would crash on boot, and even if they did run, we wanted to make sure we custom laid everything out for the new iPhone screen sizes. We had wanted to release updates for Cally’s Caves and Cally’s Caves 2 for a long time, but held off because we weren’t 100% sure how to do it, and updating player save data was intimidating. Faced with the prospect of having our apps pulled, we buckled down and got our updates done. Our process was probably unconventional, but we thought we would share how we did our updates for iOS without losing players’ save games in the process. So, let’s begin.
The way we handled saving variables across play sessions in Cally’s Caves and Cally’s Caves 2 was the most basic way you can save things using Gamemaker: Studio. We created an .ini file and had the game save variables that we wanted to keep saved in the file. For example, say the player levels Cally up and increases her max hitpoints to four. We don’t want that player to come back for their next play session and have their max hitpoints be three, right? So after they level up, we open the .ini document in a line of code, save that variable (global.maxhp = 4), and then close the .ini document. The next time the player starts the game, the global.maxhp value is read from the .ini document, so they will start with 4 max HP. It’s a really simple system that you can find in the GM:S help.