Jump to content
  • Advertisement
Sign in to follow this  
MasterDario

Game Save Point Help...

This topic is 4885 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

Im currently working on a small rpg text based game using c++ and had a question about loading a saved game. I know how to save the current values inside variables and arrays to a file and then reopen them, but what I don't understand is how would you save information on where exactly in the code the game left off so that when you load it will go right to it. Example: You just gained a lv and a bunch of your stats were raised. You go to your journal and save the game, and then you turn off the game. When you come back to play it you load the game and all your new stats from your lv increase is loaded however how does it know to return to where you saved as if you never turned off the game? So that if you saved right before a cutscene you load the game and it goes right to the section of code with that cutscene. I hope my question doesnt sound too confusing. Dario

Share this post


Link to post
Share on other sites
Advertisement
You also save the player location in the game and load that back aswell[smile]. That means save the data that describes where the player is (players location) in the game. This location can be a level number with an x and y position for the player, etc.

HTH

Share this post


Link to post
Share on other sites
And any other variables - for the cutscene thing, I guess "cutscene05complete=true". It would be done differently in a real game (more efficiently, different format) but for your purposes, this is the concept to follow.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!