So I'm slaving away writing up as much CRPG code as I can... I want to try and get at least an implementation of ALL the game logic done so I can debug and fix and start really focusing on completing the game's story and dungeons and actually try and GET THIS DONE ten years after I started!
I have a small problem though to fix...
So I have a saved game file, which contains the basic party and character data. However, this isn't enough to preserve the whole game. There are "mob files" associated with each set of maps, which need to be altered ON DISK during play. This will let me make sure treasure chests stay empty, people say different things after you've stopped the bad guy, and so forth.
I'm doing this because the one major complaint I've heard with a lot of vintage CRPG's is the total lack of persistence in the world. This is understandable with the older technology, but I'd like to have mine be a much more dynamic experience than that.
The problem though, is how to handle saved games. Most gamers are used to being able to just restore from the last save if they don't like what happened in the game, and get a do-over. Allowing for this, though, is going to be a huge strain on the game. In particular, I'll have to actually copy and create WORKING copies of each mob file (4k each) every time you load a saved game, only modify those, and then copy ALL of those records back to the main game files if you actually save the game. (Also, yeah, you'll need to have master copies of the files.)
In assembly, this will be significant work. Effectively, I'm using a disk file to act as long-term memory storage. (And before you ask, no, I don't have space for this in CPU RAM anywhere.) So at start-up, it would need to load up the entire mob file and save each record back into the saved mob file. Each mob file is 2048 2-byte records, so it will take awhile to do this. I'd feel better about this if I could treat length-2 records as length 128 for reading/writing purposes, but I suspect this won't work at level 3 access. (I'll have to write some prototype code to test this out.)
Then I started thinking... what if you COULDN'T restore a prior save? What if, too bad, you are going to just have to deal with things, no do-overs? So in this case, every time you did something that altered mob records, it auto-saves the game for you, and that's your new restore point. Would this work, or would players hate it?
So I'm polling and seeing what people think about saved games in CRPG's! Looking forward to everyone's opinion on the subject!