Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / RPG saving

Author
Message
Bio Fox
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 23rd May 2005 09:32
I've been working on an RPG for about a week now, and understand the code making an stuff. However, I have no idea how to save my stats(variables). I really need to do this because it would make testing my game much easier and faster.

Rook Takes Pawn Productions... "Now if only we could get that accursed bishop!"
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd May 2005 12:23
you can save them as an array or you can write a file with all the stats written one line at a time and then read one at a time.

DBC has a great example for this



If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself
Metel Artz
20
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Vermont USA
Posted: 23rd May 2005 13:06
any help for dbp? wait this is dbc forums nvm

goto my site at metelartz.com <<its da bomb except the one your at now. he he
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 24th May 2005 23:42
http://www.freewebs.com/underworld1020/tutorials.htm

If you still have questions, then just ask .

Bio Fox
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 25th May 2005 07:51
Thanks a lot, Underworld 1020, those tutorials really helped! I only have one problem. I need to have it so that you can leave the program and then come back and retrieve the data from the file to resume where you left off. For some reason, the file will not keep the data unless i'm still running the program. How can I do this?

Rook Takes Pawn Productions... "Now if only we could get that accursed bishop!"
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 25th May 2005 21:20
Well, in order to get that data back even after you've closed out of the program, you just simply do the code for the load again. Because when you run the save code it saves all the data you tell it to outside of the program in a text file. So, now the data is just another file on your computer, so to get that data back into you program just run the load code again.

Example:

Now Close out of your program, then run this:


That should work, but I got to go so I can't test it right now.

Bio Fox
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 26th May 2005 06:39
Thank you so much! This has been a great improvement to my game. I definatly would recomend your tutorials to other people because they go over all the steps. Thanks. Oh, if you want, I'll give you a copy of my game when I'm done. Or, I'll just point you to my website when it's posted there.

Rook Takes Pawn Productions... "Now if only we could get that accursed bishop!"
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 26th May 2005 08:33 Edited at: 26th May 2005 08:33
Thanks, I'm glad I could help. I've also just created some extra functions of my own that you can use for loading and saving game data. Look here if your interested:

http://forum.thegamecreators.com/?m=forum_view&t=54642&b=10

Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 28th May 2005 15:20
Dude Underworld 1020 you should be a mod your tuts are REALLY helpful and it seems like you have a great understanding of the language!!!

Cheers,
Capt. America
comm_jak
20
Years of Service
User Offline
Joined: 31st May 2004
Location: FOB: Fields Of Battle
Posted: 28th May 2005 15:25
I second that!!!

I will command the troops to victory
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 12th Sep 2005 17:56
lol this is all helpful for my own RPG. THANKS

Games I am releasing:
Dragon Stone I : Journey to Achilles Dungeon - 2006?
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 14th Sep 2005 01:29 Edited at: 14th Sep 2005 02:40
Thanks guys . I haven't been working on my site much, but I have been working on different function sets to make things easier.

Here's what I've got so far

File Control:
http://forum.thegamecreators.com/?m=forum_view&t=59015&b=6

Button Control:
http://forum.thegamecreators.com/?m=forum_view&t=60281&b=6

I'm currently working on a Playlist Functions set. It will contain everything you could possible need for playlists. Here's the current list of functions:



The file browser is the actual windows file browser, so you don't have to worry about crappy graphics or it not working properly. I've got about 10 or so functions already completed out of the ones on that list. If anybody can think of another function I can add to the list, let me know .

EDIT: I just updated my site, added a new page and changed some stuff.

Login to post a reply

Server time is: 2025-05-22 10:36:15
Your offset time is: 2025-05-22 10:36:15