Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dark_Psi

Saving a game ?

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

Hi. As you guessed, I''m new and I have a little question How can I make my game save ? Let''s say I want to make a text-based game, a RPG for example and I want to give the player the ability to save his game anytime he wants, how do I do that please ? I know this question sounds stupid but I have difficulties understanding this. Thank you -DaRkPsI

Share this post


Link to post
Share on other sites
Advertisement
You will have some "things" on the game that will define the game state like player location, items, time, etc. You should save this "things" in a file on the hard disk, and then load and set them up again when the user Loads a previously saved game.

Share this post


Link to post
Share on other sites
Oh I see, thank you very much. But can you be a bit more specific ? (I''m sorry, I''m stupid) What kind of file ? A text file ? How do I save those informations in this file and how do I load them then ? Can u give a coding example please?

Thank you.

-DarkPsi

Share this post


Link to post
Share on other sites
Yes I could but it would be better to you to learn that very very basic stuff by yourself. You are not stupid, maybe a little lazy.

You could read a little of this:

http://www.parashift.com/c++-faq-lite/
http://www.codeproject.com/cpp/
http://www.gamedev.net/reference/list.asp?categoryid=45
http://www.gamedev.net/reference/list.asp?categoryid=65

This site is plenty of tutorials (wrote by VERY COOL people) for almost anything. You just have to move your arm and put the mouse pointer over the links in the menu in the top of the page and make sinlge click on thouse you like

Good Luck!

[edited by - xaxa on August 29, 2002 12:28:16 AM]

Share this post


Link to post
Share on other sites
1 simpler solution would be to use the save game structure of diablo ..

only save the player and the equipment and maybe for your case, the room..

when you load, all the monsters and stuff will be reset.

Its my duty, to please that booty ! - John Shaft

Share this post


Link to post
Share on other sites
Create a file format that you''re comfortable with. You''ll probably want to start with text, but binary isn''t that much more difficult, and you have a lot more power.

John.

Share this post


Link to post
Share on other sites

  • 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!