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 / Saving ALL Game Parameters ?

Author
Message
DemonHill
17
Years of Service
User Offline
Joined: 20th Mar 2008
Location:
Posted: 31st May 2008 03:21
is there a simple way to SAVE al la games variables/states into one file to allow you to load the game again and continue where you left off ?

I have a game with maybe 100 variables. any code examples or advice would be great, can't imagine I'd have to write code to save each and every variable and then load it once I resume the game at a later dat.

Any way to capture ALL game variable and save therefore ?
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 31st May 2008 06:14
make an array of all those variables, and then use the SAVE ARRAY command to load it back in.


The bottom half of your signature was erased by a mod because it involved Kirby.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Jun 2008 03:32
And if you haven't already seen it, check out my tutorial number 4.

TDK_Man

DemonHill
17
Years of Service
User Offline
Joined: 20th Mar 2008
Location:
Posted: 1st Jun 2008 16:23
Thanks TDK, will read your tutorial
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Jun 2008 23:18
You could make one big array to store all your variables in.
Also, use label variables to help make things easier.
i.e.


It is far better to complete a 10 line program than to start a 10,000 line program.

Login to post a reply

Server time is: 2025-06-06 16:06:27
Your offset time is: 2025-06-06 16:06:27