
-----------------------------------
Carey
Wed Apr 12, 2006 10:20 am

Multiple choice adventure game
-----------------------------------
This is an adventure game. My brother made up the story for it, and I wrote the code. (admittedly a weak story, but hey, he's only 11) Is there a way to get rid of some of the if statements?

-----------------------------------
ZeroPaladn
Wed Apr 12, 2006 12:12 pm


-----------------------------------
perhaps you can make it beatable, but its a neat start.

-----------------------------------
codemage
Wed Apr 12, 2006 12:36 pm


-----------------------------------
That's a pretty good start!  Congrats for the first publication of Metcalfe bros. studios.  ;)

A few things that you can quickly to do clean up your code:

You can declare and initialize variables on the same line like this:

var bombs :int := 0

You also have a procedure that you're using for death.  If you used procedures for each of the rooms or situations you can be in, you wouldn't have to deal with your massive embedded loops.

Here's pseudocode:
procedure firstroom
put stuff
if choice = "a" then
  secondroom
else
  die
end if
end firstroom

-----------------------------------
Carey
Thu Apr 13, 2006 9:45 am

Cheat sheet
-----------------------------------
I have made a cheat sheet for the game so you can beat it the easy way. :roll:

here it is

gamename
firstname
lastname
b
a
a
b
a
b
b
a
b
flute
a
c
b
a
