Brett McCoy wrote: > On 9/30/07, secretosamani <[EMAIL PROTECTED]> wrote: > >> I'm trying to write a choose your own adventure program and I was >> wondering if a switch statement was the best choice. I suppose I could >> do a large amount of if/else statements, but I'd like it to be as >> simple as possible. Anyone have any ideas? > > I would use a switch, it works very well for making state-based > decisions... and a game like this is basically a state-machine. > > I would also look around and see what has been done before, you should > be able to find source code for text-based adventure games all over > the place (Hunt the Wumpus?), to get a basic idea of the design for > something like this. > > -- Brett > ------------------------------------------------------------ > "In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi
Hunt the Wumpus. That brings back memories. There was a graphical version made for the TI-99/4A at one point. Based on the OP's statements, it got me thinking that maybe a Wiki would be more appropriate to use to make a "Choose Your Own Adventure". I remember there was a whole book series back in the day. A Wiki would potentially allow limitless story paths to be made...with no coding required! -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
