Construction of Narratives
This presentation is the property of its rightful owner.
Sponsored Links
1 / 43

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


  • 92 Views
  • 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.

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

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

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 http://ubiquity.acm.org/article.cfm?id=351308


Construction of narratives from game play frances lucretia van scoy west virginia university

A Problem:

How do we save memories

of game playing?


Ex rogue nethack

ex. rogue / nethack

You hear some noises in the distance.

------

|....|

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

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

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

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

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

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

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

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

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

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

|....|

|....+

------

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

image from

http://en.wikipedia.org/wiki/Hack_(Unix_video_game)


The sims 2 vs the sims 3 http forum thesims3 com jforum posts list 96813 page

The Sims 2 vs. The Sims 3http://forum.thesims3.com/jforum/posts/list/96813.page

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

Vejera

Subject: Photoalbum & Memories


If cloak of darkness http www firthworks com roger cloak

IF: Cloak of Darknesshttp://www.firthworks.com/roger/cloak/

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

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.

>west

Cloakroom

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

IF: Cloak of Darkness (3)

>east

Foyer of the Opera House

>south

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.

>read

(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.


Construction of narratives from game play frances lucretia van scoy west virginia university

A Proposed Solution:

Construction of Narratives

from Game Play


Construction of narratives from game play frances lucretia van scoy west virginia university

Goal:

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

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

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

Non Player Characters (NPCs)

chess pieces, including kings, queens, and knights


And others including

and others, including . . .

the Walrus and the Carpenter,

Humpty Dumpty, and

Tweedle Dee and Tweedle Dum


At each step in the game we generate two texts

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

"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

Alice as Player Character

She admires

the garden.

Alice expresses

surprise.

Alice enters

garden

Alice enters

garden

A flower

speaks to

her.

Flower

explains

usual silence

She tries to

pick a flower.

Guard

Dogwood

picks her up.

Guard

Dogwood

says "stop."

She starts to

pick a flower.

(other)

Alice

objects.

Kudzu speaks

to Alice.

Kudzu

wraps around

arm.


Construction of narratives from game play frances lucretia van scoy west virginia university

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.


Construction of narratives from game play frances lucretia van scoy west virginia university

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

Then

(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.


Construction of narratives from game play frances lucretia van scoy west virginia university

or

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

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

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.


Construction of narratives from game play frances lucretia van scoy west virginia university

Technical Details


Initial proof of concept

Initial Proof of Concept

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

http://www.snobol4.org/

http://www.snobol4.com/


Snobol ex hello world

Snobol ex. "Hello, world"

      OUTPUT = "HELLO"

END


Snobol ex pattern matching and substitution and looping

Snobol ex. pattern matching and substitution and looping

     S = "HOBBY"

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

     OUTPUT = S

END


Snobol ex input output branching

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"

END


Snobol ex alice in garden

Snobol ex. Alice in garden

    OUTPUT = "ALICE SEES A FLOWER GARDEN."

    OUTPUT = "SHE SAYS, "

LOOP  ALICESAYS = INPUT :F(NEXT2)   

    ALICESAYS "HELLO"         :S(TL1)

    ALICESAYS  "HI"            :F(NEXT1)

TL1 OUTPUT = '"HELLO," SAYS TIGER LILLY.'

    OUTPUT = "ALICE IS SURPRISED AND SAYS, "

    ALICESAYS = INPUT

    ALICESAYS "CAN'T"          :F(NEXT0)

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

NEXT0 ALICESAYS "CAN"                 :F(NEXT1)


Why we gave up on snobol

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.)

www.processing.org


Python with re module

Python with re module

"re" is a module that implements regular expressions

www.python.org


Regular expression definition p 1

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

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

ex. regular expressions

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

matches

The cow jumped over the moon

The cat is on the mat

The cat jumped over the mat . . .

Bartholomew had very many (many)* hats

matches

Bartholomew had very many many many many hats


Generating two texts

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

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: 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: 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] ] )


Status

Status

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.


Construction of narratives from game play frances lucretia van scoy west virginia university

Plans


Short term

Short-term

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


Middle term

Middle-term

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

http://wordnet.princeton.edu/


A long term 5 years goal

A Long-Term (5 years?) goal

Just as games such as Half-Life allow player mods

http://en.wikipedia.org/wiki/Half-Life_(video_game)

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


For more information

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

304-293-0960

[email protected]


  • Login