Hi, I'm having trouble with saving/loading a frame with a sub-application in it.
Below is a screenshot of my game at the moment I press "save".
The left side is the visual from the base frame, and the right side is a sub-application window of a subframe dedicated to gameplay AI
Please login to see this attachment.
After I save, I am able to reset the right-side AI subframe to the savestate, but strange behavior occurs after I exit the application.
Below is a screenshot of my game on the first frame when I load it up again after exiting.
Please login to see this attachment.
Ignore the blank left side, for one frame the AI sub-frame is loaded in correctly,
however as shown below the very next frame it resets to its default state. Trying to manually load the data in produces no fruit.
Please login to see this attachment.
I have two savestates shown below, the top one is of the base frame, and the bottom is of the AI sub-frame.
Please login to see this attachment.
This is the relevant code for the base frame:
Please login to see this attachment.
This is the relevant code inside the AI sub-frame:
Please login to see this attachment.
Moreover, if I try to run the AI sub-frame on its own, I get a confounding error message:
Please login to see this attachment.
This doesn't make any sense to me since filename for the savestate I'm trying to load includes the frame's number in binary (11100)
So, does save frame position save a sub-application frame's position? Does each frame's position need to be saved independently? How is it that I can correctly load the subframe just after its saved but before its exited? Yet once I close the application, loading up the savestate no longer works?
I've been at this problem for a whole day, and I don't want to switch to using an INI object for saving/loading everything because there's just way to much objects and information across both frames. I'm trying to use this system for checkpoints, and I don't want to get rid of it because each section of the game is about 20 minutes long.