Game Development Reference
Taking it further
The storybook isn't complete, of course, and I left it that way intentionally so that you can have the
fun of finishing it. There is a multitude of complex ways to combine the techniques that you've looked
at in this chapter, and I'm sure many ideas occurred to you while you were working through the
One of the great thrills of designing interactive media is that it frees you up from a universe that has
only one possible future or one possible outcome. Nonlinear storybooks like these can be a lot of fun
to design and are even more fun for the reader. Here are few suggestions on how you might want to
proceed with the project.
Now that the frog has asked the cat this perplexing question, what could happen next?
You could create a yes button and no button. You could then use ]``?deh`$% in the kjBnkc?he_g
event handler to display them in the lkj`L]ca instance. Then you could use the t and u properties to
place the buttons in the correct position on the stage, as shown in Figure 4-29.
Figure 4-29. Add a yes and no button to answer the frog's question.
You can then program those buttons to change the outcome of the story, depending on what the
reader chooses. What kind of deviousness do you think the frog is up to? You could easily make this
the start of a long adventure comprising 20 or 30 pages, fill it with interesting puzzles and characters,
and have numerous branching outcomes. It's the very basis of a role-playing or adventure game!