Saving a game ?

Started by
12 comments, last by Dark_Psi 21 years, 7 months ago
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
** Dark Warrior Psi **
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.
[size="2"]I like the Walrus best.
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
** Dark Warrior Psi **
Are you using C++? If so, look up fstream.
__________________________________________________________America seems to like crap because its what we make popular. - Goober King
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]
[size="2"]I like the Walrus best.
Hehe Thank you very much !! I really apreciate.And yes, I''m using C++.
Thank you again.

-DaRkPsI
** Dark Warrior Psi **
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
www.gametutorials.com
I seem to remember this has a tutorial on saving which is based around a text rpg

What about me? What about Raven?
Ah, good idea. Thank you.
But what type of files do I use for saving those informations? lol
** Dark Warrior Psi **
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.

This topic is closed to new replies.

Advertisement