TGC Codebase Backup



Basic by Anonymous Coder

31st Aug 2006 20:36
Summary

BASIC TEXT ADVENTURE This is a very basic text adventure that takes place in a 1b house.



Description

BASIC TEXT ADVENTURE
This is a very basic text adventure that takes place in a 1b house.
You can move around to the difernt rooms.Thats all you can do.
You can personaly add more rooms, graphics ,monsters ,change the rooms
to whatever you want to.Even re-write the data statements for an outside world.
Later i will add objects and monsters to populate this world and add an outside.
you will be able to carry and use any objects in this game.I will also be adding graphics later on
You may use this code for whatever reason you wish.I hope i helped some of you out!



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    remstart
BASIC TEXT ADVENTURE
This is a very basic text adventure that takes place in a 1b house.
You can move around to the difernt rooms.Thats all you can do.
You can personaly add more rooms, graphics ,monsters ,change the rooms
to whatever you want to.Even re-write the data statements for an outside world.
Later i will add objects and monsters to populate this world and add an outside.
you will be able to carry and use any objects in this game.I will also be adding graphics later on
You may use this code for whatever reason you wish.I hope i helped some of you out!
Ver 1.0
Creator: Brent Reed
Date 8/31/06
remend


cls :dim m(25,6):dim room$(29)
for i=1 to 29
read room$(i)
next i
for sn=1 to 25
for d=1 to 6
read m(sn,d):
next d:next sn

p=2:rem starting room #
r=p:rem go back to previuos room # if wall found

st:

cls
set cursor 420,300 :print "You are in ";
for i=m(p,5) to m(p,6): print room$(i);

next i
set cursor 450,325 :input " dir?(n s e w q quit)" ;dr$
r=p

rem directions
if dr$="q" or dr$="quit" then end
if dr$="n" then y=y-1:p=m(p,1)
if dr$="s" then y=y+1:p=m(p,2)
if dr$="e" then x=x+1:p=m(p,3)
if dr$="w" then x=x-1:p=m(p,4)
rem events
if p=0 then goto wall:p=r
if p=-1 then goto window:p=r
goto st

window:

set cursor 410,345 :print "there is a window here! The window is locked.":p=r:wait 2500
cls
goto st

wall:

set cursor 410,345 :print "There is a wall here! Not passable.":p=r: wait 2500
cls
goto st
data "a bedroom."
data "a bedroom.You feel air from the north."
data "a bedroom."
data "the kitchen."
data "the kitchen.You smell cookies!"
data "a bedroom.You smell dirty socks!"
data "a bedroom."
data "a bedroom.There is an unmade bed here!"
data "the kitchen."
data "the kitchen.There are fresh cookies in the oven here!"
data "the den."
data "a hallway."
data "the tv room.A nice fire crackls in the corner!"
data "then tv room."
data "the den.Fresh air is coming from the west!"
data "the den."
data "a hallway."
data "the tv room."
data "the tv room.":rem room 19
data "You see children playing outside ":rem room 19
data "through the window looking east!":rem room 19
data "the den.There are bookshelfs here full of books!"
data "a hallway.A piture hangs on the wall!"
data "a hallway.":rem room 22
data "You see through the window ":rem room 22
data "looking south a dog peeing on your car tire!":rem room 22
data "the tv room."
data "the tv room. Someone left the tv on agian!"
data "the kitchen."
rem  n s e w S E   ---S=START OF ROOM DESCRIPTION AND E=END OF ROOM DESRIPTION
data 0,6,2,0,1,1:rem room 1
data -1,7,3,1,2,2:rem room 2
data 0,8,0,2,3,3:rem room 3
data 0,9,5,0,4,4:rem room 4
data 25,10,0,4,5,5:rem room 5
data 1,0,7,0,6,6:rem room 6
data 2,12,8,6,7,7:rem room 7
data 3,0,0,7,8,8:rem room 8
data 4,14,10,0,9,9:rem room 9
data 5,0,-1,9,10,10:rem room 10
data 0,16,0,15,11,11:rem room 11
data 7,17,0,0,12,12:rem room 12
data 0,18,14,0,13,13:rem room 13
data 9,19,0,13,14,14:rem room 14
data 0,20,11,-1,15,15:rem room 15
data 11,21,0,20,16,16:rem room 16
data 12,22,0,0,17,17:rem room 17
data 13,23,19,0,18,18:rem room 18
data 14,24,-1,18,19,21:rem room 19
data 15,-1,16,0,22,22:rem room 20
data 16,0,22,0,23,23:rem room 21
data 17,-1,23,21,24,26:rem room 22
data 18,0,24,22,27,27:rem room 23
data 19,-1,0,23,28,28:rem room 24
data -1,5,0,-1,29,29:rem room 25