27
Introduction to Interactive Fiction CS 370 Spring, 2003

Introduction to Interactive Fiction CS 370 Spring, 2003

Embed Size (px)

Citation preview

Page 1: Introduction to Interactive Fiction CS 370 Spring, 2003

Introduction toInteractive Fiction

CS 370

Spring, 2003

Page 2: Introduction to Interactive Fiction CS 370 Spring, 2003

Overview

• What is interactive fiction?

• Plot structure

• Settings

• Characters

• Modeling in INFORM

Page 3: Introduction to Interactive Fiction CS 370 Spring, 2003

Traditional fiction

• Control vested entirely in the author– What happens when in the imagined world– What the reader finds out about it, and when.– Reader can only choose to stop or continue

• Two categories of relationships between events– Events in the (imagined) world– Events in the narrative about the imagined world.

Page 4: Introduction to Interactive Fiction CS 370 Spring, 2003

Interactive fiction

• Author shares control– Player, not reader

• Conflicting demands– Player wants freedom to do and see whatever

they find interesting– Author wants to tell their story

Page 5: Introduction to Interactive Fiction CS 370 Spring, 2003

Player freedom makes author’s job much harder

• The imagined world must be modeled in software

• The model must be rich enough to – support the story– give the player the appropriate level of freedom

• The model must be simple enough to– be implementable with the author’s resources– keep the player from getting lost

Page 6: Introduction to Interactive Fiction CS 370 Spring, 2003

Idea of plot structure

• Characterize a work by collection of events that occur in it and the relationships between them– Events can include changes in a character’s

beliefs or emotions– Even in linear text, the relationships can be

subtle• e.g., the slow realization of a jailer that holding

political prisoners is wrong.

Page 7: Introduction to Interactive Fiction CS 370 Spring, 2003

Plot structure

• Composed of events in narrative– not always corresponding directly to events in

imagined world– For interactive fiction, tends to be tighter

identification between them because the player is always center-stage.

• Different outcomes of events can lead to complex structure in interactive fiction

Page 8: Introduction to Interactive Fiction CS 370 Spring, 2003

Plot structure in traditional fiction

Freeble isborn

FreebleTriumphs!

Freeble enduresgrueling upbringing

Freeble makesway into the world

Freeblehas setbacks

Freeble getsdeeper into

troubleFreeble

struggles;tide turns

Page 9: Introduction to Interactive Fiction CS 370 Spring, 2003

Linear plots can be found in interactive fiction

Freeble isborn

FreebleTriumphs!

Freeble enduresgrueling upbringing

Freeble makesway into the world

Freeblehas setbacks

Freeble getsdeeper into

troubleFreeble

struggles;tide turns

Freebledies

Page 10: Introduction to Interactive Fiction CS 370 Spring, 2003

IF supports more complex plot structures

Freeble isborn

FreebleTriumphs!

Freeble enduresgrueling upbringing

Freeblejoins cult

Freeblehas setbacks

Freeble getsdeeper into

troubleFreeble

struggles;tide turns

Freeblebecomes

drug dealerFreeble

becomesAmway dealer

Page 11: Introduction to Interactive Fiction CS 370 Spring, 2003

Other Extreme: Exploratory environments/“software toys” rely on

player-generated plots

Your favoriteproject here Use cropduster

on town

Evolve Carnifernsto intelligence

Make1,000,000

credits

Build city witharcologies

Page 12: Introduction to Interactive Fiction CS 370 Spring, 2003

Tradeoff: Freedom for narrative coherence

•All the paths need to form a coherent story

• Every downstream event has toconsider the different waysit can be reached

• If there is a preferred ending,how far should the playerbe allowed to go down anunrecoverable path?

Page 13: Introduction to Interactive Fiction CS 370 Spring, 2003

Events in interactive fiction

• Typically the player doing something or achieving something

• Player’s choice of actions can lead to different outcomes

• Changes of belief result from player’s reflection on the consequences of their actions– Telling someone they’ve had a moral

conversion typically isn’t effective.

Page 14: Introduction to Interactive Fiction CS 370 Spring, 2003

Events as puzzles

• “An adventure game is a crossword at war with a narrative”– Graham Nelson, author of INFORM

• Well-designed puzzles bring the reader deeper into the game– Encourages thinking harder about the imagined

world– Provides satisfaction when solved– Provides criterion for moving through the plot

Page 15: Introduction to Interactive Fiction CS 370 Spring, 2003

Settings

• Imagined world must be represented in software somehow

• Implementation technology choices interact tightly with modeling choices

• Difficulty of modeling still major drawback in authoring interactive fiction

Page 16: Introduction to Interactive Fiction CS 370 Spring, 2003

Text-based IF

• Classic version, due to mainframe limitations

• Settings described by evocative text

• Objects in world modeled by behaviors that produce text indicating state changes

• Movement, actions specified by restricted natural language.

Page 17: Introduction to Interactive Fiction CS 370 Spring, 2003

Graphic adventure games

• Examples: Ultima series, X Quest...

• Rely on 2D images or 3D rendered environments to model settings

• Use mouse to select objects to act upon, menu to determine action– Sometimes simple text parser provided as well

• Eye candy appealing, but more expensive to create

Page 18: Introduction to Interactive Fiction CS 370 Spring, 2003

Simulations with plots

• Examples: Wing Commander series, Archimedian Dynasty

• Settings are combinations of simulator scenarios and cut scenes (2D, 3D, or video)

• Performance in simulator determines movement in plot structure

Page 19: Introduction to Interactive Fiction CS 370 Spring, 2003

Endo

/ \\

/ \\

(2) (3)

McAuliffe Gateway

Progress screen one ...... / \\ / \\

/ \\ / \\

(4)===>===(5)---<---(6)

Gimle Brimstone Cheng-Du

Progress screen two ...... \ / \\ //

\ / \\ //

(7) (8)

Dakota Port Hedland

Progress screen three .... / \\ / \\

/ \\ / \\

(9)===>===(10)--<--(11)

Kurasawa Rostov Hubble's Star

Progress screen four ..... \ / \\ //

\ / \\ //

(12) (13)

Venice Hell's Kitchen

(victory) (defeat)

Wing

Commander 1’s

plot structure

Page 20: Introduction to Interactive Fiction CS 370 Spring, 2003

RPG/adventure hybrids

• Examples: Privateer series, Elite• Range of settings similar to simulator-based

games• Plot structures lurking in world, but also

allows open-ended play• Automatically generated scenarios keep

things interesting.– Ideally

Page 21: Introduction to Interactive Fiction CS 370 Spring, 2003

Characters

• A critical aspect of interactive fiction

• The most complex aspect of interactive fiction

• The aspect most need of improvement– New AI advances hold great promise here– Human-like characters is a Holy Grail of the

computer game industry

Page 22: Introduction to Interactive Fiction CS 370 Spring, 2003

Characters in text-based IF

• NPC = “Non-player character”• Simple stimulus-response systems

– Player asks about a topic, gets canned reply, perhaps with randomness in responses

– Player orders NPC to do something, may or may not do it, according to programming

• Finite state machines– Behave differently based on player’s actions, other

events in game

Page 23: Introduction to Interactive Fiction CS 370 Spring, 2003

Characters in other interactive fiction

• In 2D image settings, only interaction is conversation.– Scripting similar to text-only games

• In others, richer models of interaction used– Current technology is far from having generally

smart characters– Lots of tricks used to make characters seem

realistic

Page 24: Introduction to Interactive Fiction CS 370 Spring, 2003

Let’s kick the tires

Page 25: Introduction to Interactive Fiction CS 370 Spring, 2003

Modeling in INFORM

• Provides object-oriented language suitable for writing text-based interactive fiction

• C-like syntax, but object-oriented• Libraries for interactive fiction idioms

included– and can be extended, as can the parser

• Best way to learn is to build a piece of interactive fiction…

Page 26: Introduction to Interactive Fiction CS 370 Spring, 2003

Example: Twonky Island

• The prototype

• The code so far

Page 27: Introduction to Interactive Fiction CS 370 Spring, 2003

Your own work of fiction

• You will write a short story in INFORM.– HW2: Story bible and half of the objects

required– HW3: Rest of objects, full story delivered– HW4: Play testing two other people’s stories

• Specifications will be on the web tonight• Discussions on-line through class

newsgroup as needed