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

Post on 16-Mar-2016

49 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

1

Construction of Narrativesfrom Game Play

Frances Lucretia Van ScoyWest Virginia UniversityMorgantown, WV, USA

SLSA 2011Kitchener, Ontario, Canada

September 22-25, 2011

2

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

3

A Problem:How do we save memories

of game playing?

4

ex. rogue / nethackYou hear some noises in the distance. ------ |....| ----- ##+....| |..$+# |...<| +...|# |....| |...|############### ------ |...|# #-----+----- |..%|## #|.........| # -----# #|.[......%L -+---- ############## #|.........| |....| # #+@........| |....+#### ##----------- |....| |....+ ------ Level 1 Hp 15(15) Ac 9 Str 16 Exp 1 image fromhttp://en.wikipedia.org/wiki/Hack_(Unix_video_game)

5

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

08/27/09 03:06 PMVejera Subject:

Photoalbum & Memories

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

6

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 DarknessA basic IF demonstrationRelease 1 / Serial number 991212 / Inform v6.21 Library 6/10

7

IF: Cloak of Darkness (2)

Foyer of the Opera HouseYou 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.

>westCloakroomThe 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 cloakYou take off the velvet cloak.>hang cloak on hookYou put the velvet cloak on the small brass hook.[Your score has just gone up by one point.]

8

IF: Cloak of Darkness (3)

>eastFoyer of the Opera House>southFoyer barThe 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.

9

A Proposed Solution:Construction of Narratives

from Game Play

10

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.

11

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)

12

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.

13

Non Player Characters (NPCs)

chess pieces, including kings, queens, and knights

14

and others, including . . .

the Walrus and the Carpenter,

Humpty Dumpty, and

Tweedle Dee and Tweedle Dum

15

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.

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.

16

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

17

Alice as Player Character

Alice enters garden

A flowerspeaks

toher.

Flower explain

susual

silence

She admiresthe garden.

Alice expressessurprise.

Guard Dogwo

odsays

"stop."

She starts topick a flower.

Guard Dogwo

odpicks

her up.

She tries topick a flower.

(other)

Kudzu wraps aroundarm.

Alice enters garden

Alice objects. Kudzu

speaksto Alice.

18

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.

19

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.

20

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.

21

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

22

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.

23

Technical Details

24

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/

25

Snobol ex. "Hello, world"

      OUTPUT = "HELLO"END

26

Snobol ex. pattern matching and substitution and looping

     S = "HOBBY"LOOP  S "B" = "L"   :S(LOOP)     OUTPUT = SEND

27

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

28

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)

29

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

30

Python with re module

"re" is a module that implements regular expressions

www.python.org

31

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)

32

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.

33

ex. regular expressions

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

matches

The cow jumped over the moonThe cat is on the matThe cat jumped over the mat . . .

Bartholomew had very many (many)* hats

matches

Bartholomew had very many many many many hats

34

generating two texts

game = [ ]story = [ ]# 0game.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.')

35

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

36

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

37

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

38

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.

39

Plans

40

Short-term

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

41

Middle-term

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

http://wordnet.princeton.edu/

42

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.

43

For more information

Frances Lucretia Van ScoyLane Department of Computer Science and

Electrical EngineeringP. O. Box 6109West Virginina UniversityMorgantown, WV 26506 USA304-293-0960vanscoy@cs.wvu.edu

top related