Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am coding lodu game in c++ and I want to know how to create a save file for my game, so that a user can play, and then come back later. Any idea how this is done

share|improve this question
Your question is pretty vague. Try it for yourself, and tell us your errors. Then, we can help you. – jcora Jul 15 '12 at 13:23
Hey, the user Gajet has suggested that you are actually interested in a board game called "ludo", is that correct? – jcora Jul 15 '12 at 20:30

I don't know what "lodu" means (although the Urban Dictionary suggest something rather offensive), but here's a relatively vague answer on how is saving done, due to a relatively vague question. Apparently, what you meant is not called "lodu", but "ludo".

First things first, you must figure out what do you want to save, ie, what part of the game state. Common suspects are:

  • Object positions (player, enemies, etc)
  • Character stats (strength, mana, speed, health)
  • Fighting info (is the player in combat?)

What is not to be saved in the save file are things like level info, which should be loaded off separate files that don't need to be changed, or general static info that doesn't change.

To do this in C++, I suggest that you take a look at how filo I/O is done:

I suggest that you also use Json:

Once you tell us the actual problems you have, we will be able to provide more concrete answers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.