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 / load game menu

Author
Message
Evil Midget
20
Years of Service
User Offline
Joined: 3rd Sep 2004
Location: United States
Posted: 28th Sep 2004 10:10
I want to make a load game menu that has all the saved games on a list and you can choose which one you want to load, but I do not know how to do this, will someone please tell me how to do it.

derekalan18
visit my website @
www.johnsonsoftware.bravehost.com
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 28th Sep 2004 18:01
if you are using dbc you can take a look at my browser system here:
http://www.home.no/n0id/code15.html

you have to mix around with it a bit to make it fit your need.
if you need help with that, come back here and let me know.


I am not cool anymore... or am I?
http://n0id.proboards28.com/index.cgi - please join
Evil Midget
20
Years of Service
User Offline
Joined: 3rd Sep 2004
Location: United States
Posted: 1st Oct 2004 05:17
I like this but it was not what i was looking for. I was looking for something that would save all the saves into one file and when I try to load a game it will create a list with all of the saves in the list. but If I can't make that I can still use the browser.

derekalan18
visit my website @
www.johnsonsoftware.bravehost.com
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Oct 2004 13:48
Well, in order to save multiple games into a single data file you'd almost have to use memblocks to store the data, for only in memblocks can you extend the data used by the current file. (Get file size, make a memblock that is larger, read the file to the memblock, add the new game save, save file--and so on.) Memblocks also read-write access to the data contained in them, something you can't do with your basic file access. The other way is to make memblock from file, close the file, delete the save file, write memblock to file, write the new save game data, then close the file.

Either way, you have to do the act of "blocking and deblocking" the saved data yourself, using the memblock commands to retore, save or delete the saved data. The other way is to make two files, an "input" of saved data and an "output" of new saved data, which can be at least as complex as using a memblock. (And then you must test for both versions of the file, which must be deleted and rewritten at each save. Like I say, memblocks are easier in this regard.)

good luck!
S.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2025-05-24 17:41:46
Your offset time is: 2025-05-24 17:41:46