So you want to make your own computer game? Well you have come
to the right place.

What You Need:
1 - Quick Basic compiler
2 - This tutorial
Rating: Easy
Type: Text

Now I know that this game is Text only, but you can't
expect much. As this game is only to show you how to make
one, you will have to edit it to make harder.
____________________________________________________
' First you must make an interface and an intro:
'====================================================
01 cls : print "My first Text Adeventure"
02 r = 1 : s = 2 : crhp = 5: yhp = 6:
03 randomize timer
10 'Game Begin
11 gosub rooms
12
if crhp <= 0 then Print "You win!" : end
if cr = r then print "The monster hurt you!" : yhp = yhp - 1
if yhp <= 0 then print "You lost!" : end
13 input "Now What" ; ip$
'====================================================
'Put all that code into Quick Basic. Now you need to tell
'your
'game how to read input.
'====================================================
14 if ip$ = "n" then m = 1 : gosub move
15 if ip$ = "s" then m = 2 : gosub move
16 if ip$ = "e" then m = 3 : gosub move
17 if ip$ = "w" then m = 4 : gosub move
18 if ip$ = "take sword" then p = 1 : gosub doing
19 if ip$ = "drop sword" then p = 2: gosub doing
20 if ip$ = "attack monster" then p = 3 : gosub doing
21 if ip$ = "quit" then End
30 if ip$ = "wait" then print "You wait.": gosub rooms
31 Print "YOU CAN'T DO THAT YOU CRETIN!" : gosub rooms
'====================================================
' There! Now we have to make the sub move!
'====================================================
move:
if r = 1 and m = 1 then r = 2 : gosub rooms
if r = 2 and m = 2 then r = 1: gosub rooms
if r = 2 and m = 3 then r = 3: gosub rooms
if r = 3 and m = 4 then r = 2: gosub rooms
if r = 3 and m = 2 then r = 4: gosub rooms
if r = 4 and m = 1 then r = 3: gosub rooms
Print "You can't Go that way!": gosub 12
'====================================================
' Now we will make the sub rooms.
'====================================================
Rooms:
if r = 1 then print "This is room 1. You can go north."
if r = 2 then print "This is room 2. You can go south and east."
if r =3 then print "This is room 3. You can go west or south."
if r = 4 then print "This is room 4. You can go North."
Print "You can see:"
if s = r then print "A sword"
cr = int(rnd * 4) + 1
if cr = r then print "A Monster!"
gosub 12
'====================================================
' Very good. Now we need to make things happen!
'====================================================
Doing:
if p = 1 and s = r then s = 0: Print "You take the sword.": gosub 12
if p = 2 and s = 0 then s = r: Print "You drop the sword." : gosub 12
if p = 3 and cr = r and s = 0 then crhp = crhp - 1: print "You hurt the monster.": gosub rooms
Print "You can't do that!": gosub 12
'=====================================================
' And it's done. Now try runing it!