• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Saving and Loading multiple buffers as one file.

GMWolf

aka fel666
Im looking for a way to save multiple buffers into a single, large file.

I realize GM already has a way to save part of a buffer, or load into part of a buffer (buffer_save_ext and buffer_load_ext). but what i need is to load part of what is on disk, in to a ful buffer, and save a full buffer into part of what is on disk.

I could load the whole buffer and discard what i dont need, but the idea was to reduce disk usage by only loading what i needed.

is there any good way to do this?

(my other option would be to break up the information into pages, then load a whole page and discard whats extra, keeping each page small enough to reduce disk usage, but that would not be as ideal.)
i dont want to save each buffer individually as it would create a huge number or relativly small files.

I dont know how clear i was, so please ask if you want me to explain better or draw a diagram :)

thanks,
fel666
 

TheouAegis

Member
Well as for getting part of the file, you can load the file into a temporary buffer and then copy part of the temporary buffer into the working buffer, then delete the temporary buffer.

Update: As for writing multiple buffers to a file, you may be stuck writing multiple buffers to a temporary buffer and then saving the temporary buffer to the file.
 
Last edited:
Top