473,503 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save game is C++

134 New Member
im making a text-based rpg in c++. is there a way i can make it so you can save your game and pick up where you left off?
May 1 '07 #1
6 3901
Savage
1,764 Recognized Expert Top Contributor
im making a text-based rpg in c++. is there a way i can make it so you can save your game and pick up where you left off?
Well,u will need to work with files.

How is ur RPG structured?

Savage
May 1 '07 #2
lumpybanana247
134 New Member
well its c++, almost everything is used with "bool" i dont know what else to say
May 1 '07 #3
Savage
1,764 Recognized Expert Top Contributor
well its c++, almost everything is used with "bool" i dont know what else to say
Are quests readed in from files or are they written inside the programm?Also is it linear?If it is, u can save game using file and then load in corespondance to player experiance or level.

Savage
May 1 '07 #4
lumpybanana247
134 New Member
Are quests readed in from files or are they written inside the programm?Also is it linear?If it is, u can save game using file and then load in corespondance to player experiance or level.

Savage
Well, its in doss, so theres no file button.

The program is composed of about 10 differnt .cpp files where... like a 'bool' in of file leads to another 'bool' in another. (there are a few .h files too)

thanks for helping
May 1 '07 #5
Savage
1,764 Recognized Expert Top Contributor
Well, its in doss, so theres no file button.

The program is composed of about 10 differnt .cpp files where... like a 'bool' in of file leads to another 'bool' in another. (there are a few .h files too)

thanks for helping

Then the best way would be to create a file which will fill up with player current position.
e.g

quest1 start
quest1 finished
quest2 start
quest2 finished
quest3 start
quest3 finished

<stdout>"Do you wanna save current game progress? <Y/N>"

<input> Y

quest1 start
quest1 finished
quest2 start
quest2 finished
quest3 start
quest3 finished,saved

And then search the file for word save and start executing programm from there.

Savage
May 2 '07 #6
lumpybanana247
134 New Member
Then the best way would be to create a file which will fill up with player current position.
e.g

quest1 start
quest1 finished
quest2 start
quest2 finished
quest3 start
quest3 finished

<stdout>"Do you wanna save current game progress? <Y/N>"

<input> Y

quest1 start
quest1 finished
quest2 start
quest2 finished
quest3 start
quest3 finished,saved

And then search the file for word save and start executing programm from there.

Savage
ill try that
thanks
May 2 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

40
2353
by: Mark G. Meyers | last post by:
http://www.savetheinternet.com There is more info and A PETITION at moveon... Easy to sign and give your two cents (and to your own reps in the process)....
1
2866
by: fowle040 | last post by:
I underlined and bold print my files. I need to know how to make this code into a working game. The object of the game is to have two players 1- belle and 2-beast. I want them to lose and gain...
1
2582
tpgames
by: tpgames | last post by:
I don't understand how to write a JavaScript to save the users progress in a game, so they can go back to the game at a later time. There is two games that really need this functionality, a php...
3
2478
by: lumpybanana247 | last post by:
I am trying to make a little Text-Based RPG (in the Win95 window and everything like that) and it is oobviosly in C++. Is there a way i could save progress in the game (such as record and load...
3
1532
by: I Hate My Computer | last post by:
Hi, I was wanting to make a game with the ability to save the level and the score. I would also like it to be able to load that saved game. Lastly I would like it to be able to save a high score...
1
1228
by: Rhm3769 | last post by:
new to this, been looking around and haven't found anything for it yet.... I'm trying to write a script to help out tournament organizers for this online Risk site.... what I'm trying to do is...
4
3650
by: powerovergames | last post by:
I wrote a simple gambling game using java, and I wish to let the user to save their record(i.e # of rounds played, points gained per round) so after quitting they game, they could keep on playing...
5
7348
by: pankajs | last post by:
Hello frnds! I hve written a game in java & it is completed except saving & loading, ca anybody tell me how can i save a game status in a file ?????
1
1927
by: Pankhuri | last post by:
Hello I am making a game in python, using PyGTK and not glade or PyGame. I wanted to know how can i save a currently opened game and also open an already saved game. Thank you for the help.
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.