Difference between revisions of "Choose Your Own Adventure"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
(The PAGE variable)
(The PAGE variable)
Line 10: Line 10:
  
 
We do this by creating a variable that keeps track of which page of the story has just been displayed, and we add restrictions to the tasks that check the value of the page variable and prevent incorrect tasks from running.
 
We do this by creating a variable that keeps track of which page of the story has just been displayed, and we add restrictions to the tasks that check the value of the page variable and prevent incorrect tasks from running.
 +
 +
We could simply number each page and use an integer variable, however as the story will have lots of branches and loops you may find it easier to sort the tasks and insert new pages if you use a hierachal numbering scheme, so create a new text variable, set it to "0" and call it "page".
 +
 +
The first page of the story is written in the introduction dialog, so select it from the main menu:
 +
 +
[[File:Main Menu.JPG]]
 +
 +
Note that we dont need to define any rooms because we are doing everything with tasks, so the "Display first room description" checkbox is not selected and "Start the adventure at location" drop-down is left set to "No location selected".
 +
 +
[[File:IntroCYOA.jpg]]
 +
 +
The first page of the story is written and at the bottom we provide a menu of choices for the reader to select from. In the example i have used a simple numbered list which makes it quick and easy for the reader to press a single key and enter to select an option.
 +
This technique is used by many CYOA authors but has one drawback, once you start using branches and loops it will be necisary to have gaps in the numbering, and sometimes you will need to rearrange the numbering because you have already used the number that you need to link back to an existing task. This is because a task
  
 
== The combinatorial explosion ==
 
== The combinatorial explosion ==

Revision as of 09:02, 7 November 2011

This is a different style of Interactive Fiction from that which is normally written with Adrift. Instead of the player directly controlling a characters every move, a "Choose Your Own Adventure" (CYOA) is more like reading a book, but one in which the player is periodically asked to choose what happens next from a given menu of possibilities.

It is similar to printed gamebook style fiction in which each page of the book ends with a list of choices. The reader picks one of the choices which then directs them to turn to a particular page number and continue reading from there.

In Adrift this is usually done by creating a general task for each of the pages of text in the interactive book, and using a variable with restrictions to control which tasks are valid at each point in the story.

The PAGE variable

At the end of each page we present the reader with a menu of choices, and we only want them to be able to choose those particular options, so we need a way to ensure that only the tasks corresponding to those options can be executed.

We do this by creating a variable that keeps track of which page of the story has just been displayed, and we add restrictions to the tasks that check the value of the page variable and prevent incorrect tasks from running.

We could simply number each page and use an integer variable, however as the story will have lots of branches and loops you may find it easier to sort the tasks and insert new pages if you use a hierachal numbering scheme, so create a new text variable, set it to "0" and call it "page".

The first page of the story is written in the introduction dialog, so select it from the main menu:

Main Menu.JPG

Note that we dont need to define any rooms because we are doing everything with tasks, so the "Display first room description" checkbox is not selected and "Start the adventure at location" drop-down is left set to "No location selected".

IntroCYOA.jpg

The first page of the story is written and at the bottom we provide a menu of choices for the reader to select from. In the example i have used a simple numbered list which makes it quick and easy for the reader to press a single key and enter to select an option. This technique is used by many CYOA authors but has one drawback, once you start using branches and loops it will be necisary to have gaps in the numbering, and sometimes you will need to rearrange the numbering because you have already used the number that you need to link back to an existing task. This is because a task

The combinatorial explosion

If each of the menu choices on each page links to a new page, then the number of pages that must be written quickly increases to unmanageable numbers. If each page only has two choices then you need at each level: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 pages. So you need to write a thousand pages just to give the reader 11 pages to read on any particular path, and over a million if you have 4 choices on each page.

Clearly we need to greatly reduce the number of pages, but without limiting the readers choices too much. The simplest is just to make many of the choices dead-ends. If the reader makes an obviously bad choice then the main character can die or fail in their task so that the story ends there.

Bypass loops

Converging branches

Quests

Quests are parts of the story which can be separated into a self-contained sections which can be read in any order. This allows the reader to select which part of the story they read first, usually by choosing to go to a different location at a major branch point.

All of the quests in a group loop back to the original quest selection page, where the reader can then select one of the other quests to go on. Usually a certain number of quests, all of them, or particular quests, must be completed satisfactorily before the reader is offered the option to continue to the end of the main story.

Enabling Look and Examine