First off, I wanna say, I'm not a conventional student, posting homework problems. I am a student, in the fact that I am learning BASIC/Qbasic. But I'm not going to school to learn it, just kinda feeling my way around learning. If that makes sense?

The main reason I am learning it is because I am trying to make a text-based adventure game for my father. Some of you may have played his games in the past, he use to make text-based games, way back when. Which of course is why I'm making him a text-based game for his birthday.

That being said, I have just about got the game completed, except for, what I see as, a crucial part. I'm not sure how to program it so that the user can save the game, and come back to it later? I've looked around online and found nothing that seems to answer my question. And unfortunately I've procrastinated on finding this information out till now, so I can't get a book at the library on it... His birthday is tomorrow (well today, technically), and I'm hoping to have this complete by sunday. So if anyone has any help for me I'd *greatly* appreciate it!

Thanks in advance!,
MoNkEe

Whoops, forgot to mention I am using QBASIC to do this ... not Visual Basic :) (not sure if that makes a difference?) ... Thanks again for any input!! And for helping to point me in the right direction! :)

Saving games is a matter of saving all of your variables that pertain to items, player status, location, events, etc to a file. This can easily be done with the OPEN statement to ope a file, and CLOSE to close it.

When I taught myself QBasic, I found that the best place to find answers was from the QB help. Look up the OPEN ... AS ... FOR BINARY entry. That's probably what you want. Be sure when you load a game that you read the data in the same order that you wrote it.

just wanted to say thank you for suggesting I check out Qbasic's help!! ... WoW!! I've learned so much more that way in just a few hours, then I had searching the net for tutorials and such... Thank you so much! ....

... and now back to your regularly scheduled answers ;)

I am curious what you meant though by being sure I read the data in the same order I wrote it?? Thanks ahead of time for the info! :)

- MoNkEe

Let's say you save your data (example data here) in this order:

Score
Number of Lives
Current Weapon
Screen location
Level

You then want to read in your data in the same order, so that you don't get 1,000,389 for the number of lives and not the score.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.