• Advertisement
Sign in to follow this  

Saveing and loading files

This topic is 1765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Saving and loading is the one thing that just terrifies me, I'm sure it's irrational as it can't be that hard but I don't really know where to start. I've done it before where I read or write to a text file to get information and build a map out of it, but I feel like that is kind of messy... I figured ya'll might be able to give me some insight on this.

At this current moment in time I am working on a program that gives you a 2d grid that you can alter, I want to save the information of each tile and use it in a game I am also working on. Is saving it to a text file really the best answer for me or is there another way?

Share this post


Link to post
Share on other sites
Advertisement
Guest Hiwas

Saving and loading is the one thing that just terrifies me, I'm sure it's irrational as it can't be that hard but I don't really know where to start. I've done it before where I read or write to a text file to get information and build a map out of it, but I feel like that is kind of messy... I figured ya'll might be able to give me some insight on this.

At this current moment in time I am working on a program that gives you a 2d grid that you can alter, I want to save the information of each tile and use it in a game I am also working on. Is saving it to a text file really the best answer for me or is there another way?

 

Loading and saving can be a really horrible thing to deal with on occasion, especially if you try to build the serialization engine at the same time as the data you are trying to load/save.  I would actually suggest you might consider doing this as a two stage process.  Use an existing framework for serialization, I'd probably suggest Boost or Sweet for this as a starting point.  In this way you can avoid most of the issues with the low level serialization portion for a while, get your work done and then deal with serialization separately.  The nice thing about the existing solutions is that they are pretty low impact and won't require a lot of thought/code to make them work so you are not doing much wasted work in order to break up your dev tasks.

 

It's just a thought on how you might simplify your life for a while.. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement