Posted: Wed Apr 12, 2006 10:20 am Post subject: 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?
Posted: Wed Apr 12, 2006 12:12 pm Post subject: (No subject)
perhaps you can make it beatable, but its a neat start.
codemage
Posted: Wed Apr 12, 2006 12:36 pm Post subject: (No subject)
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:
code:
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:
code:
procedure firstroom
put stuff
if choice = "a" then
secondroom
else
die
end if
end firstroom
Carey
Posted: Thu Apr 13, 2006 9:45 am Post subject: Cheat sheet
I have made a cheat sheet for the game so you can beat it the easy way.
here it is
gamename
firstname
lastname
b
a
a
b
a
b
b
a
b
flute
a
c
b
a