Text Game by BlueKlayman12th Jul 2009 1:44
|
---|
Summary A text game that I was taught to make by Gil Galvanti. Description I am currently designing another text game where you follow the path of Angel or Demon. You will find out iif I ever get close to finishing. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com print "Welcome to the Jungle" type location name as string desc as string choice as string result numChoices endtype dim location( 11, 5 ) as location location( 1 ).name = "Cliff" location( 1 ).desc = "A cliff jutting out into the ocean." location( 1, 1 ).choice = "Jump off the cliff." location( 1, 1 ).result = 2 location( 1, 2 ).choice = "Look out to the ocean." location( 1, 2 ).result = 3 location( 1, 3 ).choice = "Go inland." location( 1, 3 ).result = 4 location( 1 ).numChoices = 3 location( 2 ).name = "Ocean" location( 2 ).desc = "You died jumping into the ocean, idiot." location( 3 ).name = "Peering into the Ocean from the Cliff" location( 3 ).desc = "You see nothing but a vast expanse of water." location( 3, 1 ).choice = "Go back inland." location( 3, 1 ).result = 4 location( 3, 2 ).choice = "Jump off the cliff." location( 3, 2 ).result = 2 location( 3 ).numChoices = 2 location( 4 ).name = "Inland from the Cliff." location( 4 ).desc = "Dense brush and trees continue inland. A cliff juts into the ocean in the other direction." location( 4, 1 ).choice = "Continue inland." location( 4, 1 ).result = 5 location( 4, 2 ).choice = "Go back to the cliff." location( 4, 2 ).result = 1 location( 4 ).numChoices = 2 location( 5 ).name = "Clearing" location( 5 ).desc = "You enter a clearing. Its getting dark." location( 5, 1 ).choice = "Camp here." location( 5, 1 ).result = 6 location( 5, 2 ).choice = "Continue into the dense jungle." location( 5, 2 ).result = 7 location( 5 ).numChoices = 2 location( 6 ).name = "You wake up rested and in daylight." location( 6 ).desc = "You have some choices to make." location( 6, 1 ).choice = "Continue into the jungle." location( 6, 1 ).result = 7 location( 6, 2 ).choice = "Go back to the cliff." location( 6, 2 ).result = 8 location( 6 ).numChoices = 2 location( 7 ).name = "Dense jungle." location( 7 ).desc = "You die after metting a tribe of cannibals." location( 8 ).name = "Cliff" location( 8 ).desc = "There is a ship out at sea." location( 8, 1 ).choice = "Jump up and down waving your hands in the air shouting." location( 8, 1 ).result = 9 location( 8, 2 ).choice = "You light a fire and signal them with smoke." location( 8, 2 ).result = 10 location( 8, 3 ).choice = "Build a raft and paddle it out to them." location( 8, 3 ).result = 11 location( 8 ).numChoices = 3 location( 9 ).name = "Ocean" location( 9 ).desc = "You slip on the edge of the cliff and plummet to your death." location( 10 ).name = "Cliff" location( 10 ).desc = "You try to light a signal fire, you set yourself on fire. You die." location( 11 ).name = "Ship" location( 11 ).desc = "You build the raft and paddle out to the ship safely, too bad they are pirates. They sell you as a slave. Oh well, atleast your not dead." loc = 1 do cls Ink RGB (255,0,0), 0 print location( loc ).name Ink RGB (0,122,123), 0 print location( loc ).desc Ink RGB (200,0,100), 0 for printChoices = 1 to location( loc ).numChoices print str$( printChoices ) + ") " + location( loc, printChoices ).choice next printChoices input "What do you do? ", decision loc = location( loc, decision ).result loop |