Construction of Narratives
1 / 43

Construction of Narratives from Game Play Frances Lucretia Van Scoy West Virginia University - PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Construction of Narratives from Game Play Frances Lucretia Van Scoy West Virginia University Morgantown, WV, USA SLSA 2011 Kitchener, Ontario, Canada September 22-25, 2011. William Wulf on humanistic scholarship.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Construction of Narratives from Game Play Frances Lucretia Van Scoy West Virginia University

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Construction of Narratives

from Game Play

Frances Lucretia Van Scoy

West Virginia University

Morgantown, WV, USA

SLSA 2011

Kitchener, Ontario, Canada

September 22-25, 2011

William Wulf on humanistic scholarship

UBIQUITY: Continuing on the big tent theme: I noticed in your CV that one of your interests was an effort to assist humanities scholars to exploit information technology. How do you see the humanities fitting in nowadays in both education and research?

WULF: Oh, let me warn you that you're going to get a long answer. First of all, two things: Every time that computer scientists have approached a new problem domain, we've discovered new things about computers. I think there's a tremendous opportunity for computer science to look at humanistic scholarship as a problem domain that will open up whole new classes of fascinating challenges.

September 2000

A Problem:

How do we save memories

of game playing?

ex. rogue / nethack

You hear some noises in the distance.



----- ##+....|

|..$+# |...<|

+...|# |....|

|...|############### ------

|...|# #-----+-----

|..%|## #|.........|

# -----# #|.[......%L

-+---- ############## #|.........|

|....| # #+@........|

|....+#### ##-----------




Level 1 Hp 15(15) Ac 9 Str 16 Exp 1

image from

The Sims 2 vs. The Sims 3

First of all, I think the Sims 3 is an AWESOME game

But I really wonder why it doesn't contain the photo album and the memories, as the Sims 2? I believe that was one of the most important details in the Sims 2, and I really miss it in the Sims 3.. I really liked to give my sims a history, and make them more real that way. Being able to look back in the photo album, and see how my sims life changed and developed.. now it's like the sims only exist in the moment, and has no past. And I'm sorry to say it, cause otherwise it's a really great game, but sometimes it just makes it dull. I really can't see why you didn't create those in the sims 3..

08/27/09 03:06 PM


Subject: Photoalbum & Memories

IF: Cloak of Darkness

Hurrying through the rainswept November night, you're glad to see the bright lights of the Opera House. It's suprising that there aren't more people about but, hey, what do you expect in a cheap demo game. . . ?

Cloak of Darkness

A basic IF demonstration

Release 1 / Serial number 991212 / Inform v6.21 Library 6/10

IF: Cloak of Darkness (2)

Foyer of the Opera House

You are standing in a spacious hall, splendidly decorated in red and gold, with glittering chandeliers overhead. The entrance from the street is to the north, and there are doorways south and west.



The walls of this small room were clearly once lined with hooks, though now only one remains. the exit is a door to the east.

>remove cloak

You take off the velvet cloak.

>hang cloak on hook

You put the velvet cloak on the small brass hook.

[Your score has just gone up by one point.]

IF: Cloak of Darkness (3)


Foyer of the Opera House


Foyer bar

The bar, much rougher than you'd have guessed after the opulence of the foyer to the north, is completely empty. There seems to be some sort of message scrawled in the sawdust on the floor.


(the scrawled message)

The message, neatly marked in the sawdust, reads. . .

*** You have won. ***

In that game you scored 2 out of a possible 2, in 6 turns.

A Proposed Solution:

Construction of Narratives

from Game Play


Construct an "interactive fiction" game (targetted at middle school girls) that will generate a text that can be read and enjoyed by the player and by others who don't know about the game.

Basis for IF: Through the Looking Glass

availability (now in public domain) from multiple sources

constrained game world (64 squares) with most undeveloped in the original novel

whimsical characters in TTLG and earlier Alice in Wonderland whose acts as NPCs can be expanded (and potential to add other characters)

Game world: a chess board

In TTLG, Alice begins as a pawn in a chess game and becomes a queen when she reaches the opposite edge of the board.

Non Player Characters (NPCs)

chess pieces, including kings, queens, and knights

and others, including . . .

the Walrus and the Carpenter,

Humpty Dumpty, and

Tweedle Dee and Tweedle Dum

A section of narrative that the play does not see until after the game is over:

Alice woke from her nap and sat up She rubbed her eyes and looked around. She was sitting under an old and large but unfamiliar tree. "Where am I?" she wondered. She saw a wall with a gate and decided to find out what was on the other side of the wall. To her great delight she saw a beautiful garden.

At each step in the game, we generate two texts

The typical prompt from the game to the player:

You open a gate and enter a large garden of flowers.

"Meanwhile, back at the ranch . . ."

As the PC Alice leaves a square, we finish that chapter of the narrative with a "Meanwhile, back at the ranch . . . " section that describes the major activities of the NPCs elsewhere. The PC is unaware of these activities until the game is over and she reads the text generated by the game.

On the west coast of the Land, the Walrus noticed that the seafood restaurant he and the Carpenter owned was low on vegetables. He left on a trip to the eastern border to buy vegetables.

Elsewhere, Humpty Dumpty decided to climb on to a wall in order to get a better view. . . .

Alice as Player Character

She admires

the garden.

Alice expresses


Alice enters


Alice enters


A flower

speaks to




usual silence

She tries to

pick a flower.



picks her up.



says "stop."

She starts to

pick a flower.




Kudzu speaks

to Alice.


wraps around


It's important for the game to encourage the PC to speak to plants in the garden so they can help advance the game and the story.

A daisy asks a favor. She is hungry and wants Alice to bring her plant food from the shed.


(a) Alice does so, and Daisy then suggests Alice transplant her into a flowerpot and use a gardening cart to take her with her as she explores the land; or

(b) Alice does so and says that she also is hungry. Daisy suggests she go to the neighboring vegetable garden.


A rose observes that unlike another flower that freely moves into and out of the the garden Alice doesn't have thorns (that is, a crown worn by the queens in the chess game).

Alice sees a glimpse of the queen running through the garden and strikes up a conversation. The queen drops hints that Alice can herself become a queen by entering one of the castles at the four corners of the land.

She may take Alice on a brief tour of the land (using her power to travel at high speed as compared to the speed of a pawn) or to the top of a tower so Alice can see how the land is laid out.

Alice's goal

In TTLG the frog is the gatekeeper at the palace.

In the game he will give clues about which castle she is closer to qualify to enter (based on tasks and artifacts).

Tasks and Artifacts

Alice can use corn (from the vegetable garden) to call the Crow to stop the battle between Tweedle Dee and Tweedle Dum.

The Walrus and the Carpenter open a seafood restaurant on the west coast. Alice can work there to earn money.

Some tasks involve learning some Latin or music theory or math, topics not in the middle school curriculum but intended to be fun mental exercises.

Technical Details

Initial Proof of Concept

We wrote some initial code in Snobol (because it has more powerful string matching capability than sed, Python re, etc.)

Snobol ex. "Hello, world"

      OUTPUT = "HELLO"


Snobol ex. pattern matching and substitution and looping

     S = "HOBBY"

LOOP  S "B" = "L"   :S(LOOP)

     OUTPUT = S


Snobol ex. input, output, branching

          OUTPUT = "TYPE CAT OR DOG"

          PET = INPUT

          PET "CAT"                    :F(TRY2)

          OUTPUT = "MEOW"              :(END)

TRY2      PET "DOG"                    :F(END)

          OUTPUT = "ARF"


Snobol ex. Alice in garden




    ALICESAYS "HELLO"         :S(TL1)

    ALICESAYS  "HI"            :F(NEXT1)




    ALICESAYS "CAN'T"          :F(NEXT0)

    OUTPUT = '"FLOWERS ' "CAN'T " 'TALK!"'  :S(TL2)

NEXT0 ALICESAYS "CAN"                 :F(NEXT1)

Why we gave up on Snobol

We couldn't find an easy way for Snobol and either Python or Processing progams to communicate.

(We wanted to use Processing for animation.)

Python with re module

"re" is a module that implements regular expressions

regular expression definition p. 1

The following are regular expressions.

(1) ε

L(ε) = {ε}

(2) Φ

L(Φ) = Φ, the empty set

(3) a, where a is a symbol

L(a) = {a}

(4) If E and F are regular expressions, then E + F is a regular expression.

L(E+F) = L(E) U L(F), union of L(E) and L(F)

regular expression definition p. 2

(5) If E and F are regular expressions, then E F is a regular expression.

L(E F) = L(E) L(F) = {e f | e in L(E), f in L(F) }, concatenation of L(E) and L(F)

(6) If E is a regular expression, then E* is a regular expression

L(E*) = (L(E))*, Kleene closure of L(E)

(7) If E is a regular expression, then (E) is a regular expression.

L( (E) ) = L(E)

(8) Nothing else is a regular expression.

ex. regular expressions

The (cow+cat) (jumped+is) (over+on) the (moon+mat)


The cow jumped over the moon

The cat is on the mat

The cat jumped over the mat . . .

Bartholomew had very many (many)* hats


Bartholomew had very many many many many hats

generating two texts

game = [ ]

story = [ ]

# 0

game.append( 'You open a gate and enter a large garden of flowers.' )

story.append('Alice woke from her nap and sat up. She rubbed her eyes and looked around. She was sitting under an old and large but unfamiliar tree. "Where am I?" she wondered.')

simple parameterization

# 1

game.append('You hear a voice saying, "Welcome to the Garden of Live Flowers."')

story.append('Alice looked around the garden and said, \"ALICE_SAYS\". A tiger-lily gracefully leaned towards her and said, "Welcome to the Garden of Live Flowers." Alice looked to the left and right but saw no one.')

state information: understanding player input

state_information[1] = { }

state_information[1]['say'] = [ [ re.compile('(beaut)|(pretty)|(nice)'), 2, game[1], story[1] ] ]

state_information[1]['say'].append([ re.compile('talk'), 2, game[2], story[2] ])

state_information[1]['say'].append([ re.compile('(help)|(lost)'), 2, game[1], story[1] ])

state_information[1]['pick'] = [ [re.compile('pick'), 3, game[3], story[3] ] ]

state information: default behavior

state_information[1]['DEFAULT'] = [ [ [], 4, game[4], story[4] ] ]

state_information[1]['DEFAULT'].append([[], 5, game[5], story[5] ] )

state_information[1]['DEFAULT'].append([[], 6, game[6], story[6] ] )


We have implemented a prototype of one square, the Garden of Live Flowers, and are capturing user input to add to the options we can handle.

We are designing a framework for creating characters, dialog, objects, tasks, etc.

We are designing creative content for a few other squares.



We've begun building the full game and tools to make our job easier.


We plan to use WordNet as a resource to improve our imitiation of Natural Language processing.

A Long-Term (5 years?) goal

Just as games such as Half-Life allow player mods

we want to add the ability for users to add new situations, dialogs, tasks.

For more information

Frances Lucretia Van Scoy

Lane Department of Computer Science and Electrical Engineering

P. O. Box 6109

West Virginina University

Morgantown, WV 26506 USA


  • Login