A simple game written to illustrate how data can be saved when going from room to room. Written in answer to a question at another forrum:"How do I load data from notepad (.DAT) into a QB array?"
Recommended: put game in a directory to itself. It generates five files, S0.SVE, S1.SVE, etc. (OK, so I used SVE, but DAT could be used, too)
To play, start game. You will be the asterisk in an empty room to get practice using the arrow keys.
If you hit a wall, an object will be generated that is your color. You cannot leave a room until all objects that are your color are gone. If you hit an object that IS your color, the object is gone.
Note that the floor is slippery. From time to time, you will slip and not go the way you wanted. So stay away from walls or other objects as much as possible.
When you enter a room, you will see objects of various colors. If you hit an object that is NOT your color, two such objects will take there place, making it difficult to maneauver.
Eventually, all objects of your color will be gone. (There are 4 rooms). When you enter the next room, you will be assigned a new color.
When all objects are gone from every room, then when you exit, you will be congratulated on a win and the game is over.
As I said, not a wonderful game, just some stuff to illustrate saving and restoring using text files.
P.S. To exit game because you don't want to play that particular game, use Q (quit).To exit immediately because the boss is coming, use ESC. The game can be continued.
Newbies usually go to www.qbasic.com and click on
The QBasic Forum
Forum regulars have their own ways, which include
The QBasic Community Forums