How do I save out data to an array of files?

Hey guys and gals, I was wondering if anyone had any nifty solutions for the problem of storing large quantities of information into smaller segmented files. I’m currently using an array of “save games” in Blue Prints. I doubt its optimally performant but it was intended to be a temporary solution.

It works surprisingly well but I would like to know if anyone else has done this and what their solutions were. It doesn’t feel very clean, as it floods the save folder with stuff that I would rather have in it’s own folder and it seems kinda “hacky”.

I need to be able access all the data in individual blocks as loading it all creates unnecessary memory issues. I’m pretty sure I could figure out how to save out text files or something with c++, but I’m just wondering if anyone knows the best/easiest solution to this problem.

I know its a pretty noob question, I’m sure some more experienced users have run into this. I’d be grateful for any advice, cheers. :smiley:

Would this be useful to you?

Hey, thanks for the answer! :smiley:

It’s possible it might, though if it doesn’t save tiles of my world individually it would just crash as it needs to do this in real time as the player moves through a large procedurally generated world.
(It’s not World Composition Terrain–Its a Runtime Mesh Component and a bunch of arrays I need to load and unload) So if its saving the entire world to one file it will probably just explode. That’s why I’m looking for a system to load and unload blocks of the game at a time. Although its it’s still got load a lot of stuff to go through.

I was more or less just looking for a direction to go in, I’ll figure out the rest. I’m still new to c++ in UE4. So its not obvious for me, but I will look into serialization. Serialization has come up a few times and that’s what it said they used in the description of that add on.

If no one else has any other suggestions, I will mark this answer correct. Thanks again!

I would probably look at level streaming for that. How are you spawning the tiles, instanced static meshes?

Runtime mesh component its like procedural mesh component but faster. The level it self doesn’t really exist until its generated so there isn’t anything a streaming volume can really point to. I’ve created a system that’s pretty much identical it just spawns a Box collision volume on each tile and when you when you overlap the volume it updates all the surrounding tiles up to a certain distance.

From there it just loads save files named after 2d coordinates to access the data it needs and only the data it needs, this is the process i’d like to improve upon.

Oh that sounds like something I was working on but I couldn’t get it to work without the game slowing down.