943,955 Members | Top Members by Rank

Ad:
Jul 10th, 2004
0

Users Saving Games?

Expand Post »
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
Similar Threads
Reputation Points: 13
Solved Threads: 0
Light Poster
MoNkEe is offline Offline
38 posts
since Jul 2004
Jul 10th, 2004
0

Re: Users Saving Games?

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!
Reputation Points: 13
Solved Threads: 0
Light Poster
MoNkEe is offline Offline
38 posts
since Jul 2004
Jul 10th, 2004
0

Re: Users Saving Games?

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.
Reputation Points: 14
Solved Threads: 0
Newbie Poster
cypher is offline Offline
17 posts
since Jul 2004
Jul 14th, 2004
0

Re: Users Saving Games?

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
Reputation Points: 13
Solved Threads: 0
Light Poster
MoNkEe is offline Offline
38 posts
since Jul 2004
Jul 14th, 2004
0

Re: Users Saving Games?

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.
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to write files to an Excel application
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Adding controls into a ListView





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC