Hello, it's me.
How does one use the file access commands to read the values of counters from MZX save game (.SAV) files (without loading the game, of course)? I was thinking that this could be pretty awesome for games that use custom save/load menus. The obvious use case is reading data from the save to identify each save file: how long it's been played, the time it was last played, the level, the player's name, the in-game location, or completion percentage.
Just thought this would be a cool Robotic experiment that goes beyond what I already know about the world and save file formats.
Page 1 of 1
Reading counters from SAV files
#2
Posted 10 March 2016 - 03:24 AM
Check out the old version save loader packaged with 'red' - it does exactly this. Basically, it reads enough to find the offset where the counters and strings are saved, then reads them all in.
Obviously an easier way of accomplishing the thing you describe is just to write out an extra file for each save with that additional information. I'd be worried about my game breaking in a future version of MZX (not that there's been one of those in a while) that changes the save format if I made this kind of thing an integral part of the game - but the old version save loader with 'red' made a lot of sense because it was only created to allow saves made in older versions of 'red' to be loaded.
Obviously an easier way of accomplishing the thing you describe is just to write out an extra file for each save with that additional information. I'd be worried about my game breaking in a future version of MZX (not that there's been one of those in a while) that changes the save format if I made this kind of thing an integral part of the game - but the old version save loader with 'red' made a lot of sense because it was only created to allow saves made in older versions of 'red' to be loaded.

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#3
Posted 10 March 2016 - 04:49 PM
That's true, I didn't consider the fact that the save file might change drastically. I guess having external files with metadata would be the best way to go.
Need a dispenser here.
Share this topic:
Page 1 of 1

Help






