besteon / Ironmon-Tracker

A Lua script for the Bizhawk/mGBA emulator compatible with Pokemon Fire Red, Leaf Green, Ruby, Sapphire, and Emerald that tracks relevant data for the IronMon challenge.
MIT License
122 stars 44 forks source link

Crash Recovery Feature and Game Timer Updates #392

Closed UTDZac closed 1 year ago

UTDZac commented 1 year ago

This PR adds a new Crash Recovery feature to help recover game saves whenever an emulator crash occurs. This is done not by saving information at the moment of the crash but rather by frequently creating a persistent backup save file. These save files are stored in a new folder within the Tracker folder such that they are easy to locate.

This is a simple feature in concept yet I imagine it will be immensely helpful for several people, especially for people like me who forget to save their progress often.

Crash Recovery Feature Notes

* By "crash" I believe only applies when the emulator itself runs into an error that causes it to force quit, or it freezes, or there is a power outage. A "crash" won't occur if the player simply closes the emulator, or closes the lua console, or "Ends Process" through Task Manager. Regardless of a crash occurring, the backup save files are always kept up to date, but the Tracker detecting the crash and prompting the player might not always occur.

image

Game Timer Updates

In preparation for the upcoming release, I also wanted to add in some requested changes to the onscreen Game Timer feature. Doing so required modifying the shared space on the ExtrasScreen. As such, I bundled these changes with the Crash Recovery feature for convenience. Apologies if this makes the review process trickier.