Page 1 of 1

Help with saving a game

Posted: Wed May 17, 2006 10:28 pm
by crazydrivr
I need help with making a save system for a game. Can anyone help?

Posted: Thu May 18, 2006 1:59 am
by Dr_D
What kind of game is it? Are you using user defined data types? It's pretty easy to do what you want if you are... a pain in the butt if you're not. You'll have to post some code or a link to the program. ;)

Posted: Thu May 18, 2006 4:45 pm
by Patz QuickBASIC Creations
Look up the syntax for the WRITE and INPUT # commands. They are ideal for a save game (unless it really matters if some variables can be changed. WRITE saves files in plain text, making them easy to change.)

Posted: Thu May 18, 2006 10:25 pm
by crazydrivr
I am making an RPG, so it needs to save variables and still allow them to change and also save what sub you are on. Is that possible on qbasic?

Posted: Fri May 19, 2006 12:57 am
by Theophage
Like Patz said, you need to learn how to open a file, write to it, and input from it. Look up OPEN, WRITE, and INPUT in the Qbasic help.

Posted: Fri May 19, 2006 9:42 pm
by Theophage
I just happened to have run across a some tutorials explaining how to work with files: http://fbtk.net/phpBB2/articles.php?cat=1 (you'll want either the sequential files one or the binary files one)

I hope that helps!