in reply to Re: Daft text adventure project
in thread Daft text adventure project
Actually, since (as is typical in this family of software) I'm writing a different kind of data at each step, it's not as difficult as you might think.
Here's a little pseudo-code to illustrate:
That's the way (roughly) that it looks now. In my bad old BASIC days, I'd simply have had a GOTO triggered on the return value of each procedure to send the program back a chunk if the user asked to go back. Since you're given the chance to review any decision you make at the time you make it, this should allow procedures called to offer up the previously made choice for revision (and if it doesn't, I'll re-write the procedure so that it does) - I just need a clean way to drop back a stage on the appropriate return value.
Tiefling
Here's a little pseudo-code to illustrate:
initialise_stuff; set_abilities; set_race; set_class; set_skills;
That's the way (roughly) that it looks now. In my bad old BASIC days, I'd simply have had a GOTO triggered on the return value of each procedure to send the program back a chunk if the user asked to go back. Since you're given the chance to review any decision you make at the time you make it, this should allow procedures called to offer up the previously made choice for revision (and if it doesn't, I'll re-write the procedure so that it does) - I just need a clean way to drop back a stage on the appropriate return value.
Tiefling
|
---|
Replies are listed 'Best First'. | |
---|---|
Re:{3} Daft text adventure project
by jeroenes (Priest) on May 29, 2001 at 17:28 UTC | |
by Tiefling (Monk) on May 29, 2001 at 17:48 UTC | |
by jeroenes (Priest) on May 29, 2001 at 18:41 UTC | |
by Tiefling (Monk) on May 29, 2001 at 18:53 UTC |
In Section
Seekers of Perl Wisdom