Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:28:18+00:00 2026-06-13T14:28:18+00:00

— EDIT: I just realized that the right answer to this is maybe a

  • 0

—

EDIT: I just realized that the “right” answer to this is maybe a little bit to advance for me at the moment. I want to focus on adding stuff to the game at this moment and not making the best save/load system. I’ve taken your suggestions and you’ve opened my mind for loads of great stuff to do in the future. Mainly labeling the data saved (maybe using XML).
For the moment i’ll just add some primitive function to make it work at this stage of development.

—

I need some help breaking out a logical and nice way of doing this. It’s for a game i’m making using c++ and SDL. I need some help with the save/load stuff. Basically when i save a game there are some stuff that will always be there (player name, position, gold ect..). But there are also some dynamically saved content, like stats, equipped items and items in the inventory (in the future finished quests will be saved here as well).

I have no problem saving this data down, it’s easy. The problem i have is how to structure it’s breakpoints when reading the data. This is an example of how a savefile might look:

CharName (some variables like positions that will always be saved)
(the first statMap looks like this “string int” fetched from
map) (second statMap, it’s the same) (equipped items, one
item is split into three parts “string name int ID string
description”) (items in inventory, the same as the last one)

I hope you understand my example. I’d like some help understanding a logical way to structure this. I’m thinking of maybe ending each dynamic sequence with a char and then load the line up to that char in a string. Then i split that string into several parts. But that sound like an awful amount of steps. Could you help me out?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:28:19+00:00Added an answer on June 13, 2026 at 2:28 pm

    A very common method for structuring datafiles in games is to use a header and a body: in the header you define the structure of the content in the body based around offsets:

    e.g Data for character stats begins at offset 10054, and continues for 2120 characters (you must define and use a standard character size to make this work).

    Then when you read it you read the header to get the structure, and then load the data from the areas that it specifies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a little harvester, using this dataset of 2700 foundations .
I'm including a local class that requests a file from a remote server. This
This is an interesting problem that I have searched here and all over my
I recently ran against a very interesting site that expresses a very interesting idea
All of my code is on my SVN, but I want some of it
I'm trying to create a chrome extension and im doing this by parsing an
I have set of xml elements like this: <item code=<HTML_CODE> /> For example: <items>
&mdash; or &#8212; Is there a difference between these? Is one better-supported than the
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm using a DatePicker ( org.apache.wicket.extensions.yui.calendar.DatePicker — Javadoc ) in a form. The form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.