dynamic interactive storytelling in computer games · dynamic interactive storytelling in computer...

91
Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009

Upload: dangbao

Post on 12-Jun-2018

251 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

Dynamic Interactive Storytelling in Computer Games

P E R W I L H E L M S S O N

Master of Science Thesis Stockholm, Sweden 2009

Page 2: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

Dynamic Interactive Storytelling in Computer Games

P E R W I L H E L M S S O N

Master’s Thesis in Computer Science (30 ECTS credits) at the School of Computer Science and Engineering Royal Institute of Technology year 2009 Supervisor at CSC was Björn Thuresson Examiner was Yngve Sundblad TRITA-CSC-E 2009:036 ISRN-KTH/CSC/E--09/036--SE ISSN-1653-5715 Royal Institute of Technology School of Computer Science and Communication KTH CSC SE-100 44 Stockholm, Sweden URL: www.csc.kth.se

Page 3: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

Abstract Works of interactive storytelling are often a challenging and literate piece of art where the reader experiences the story in a non-linear manner. Text adventure games are one highly responsive example. They feature a task to fulfil and numerous possible actions and a memory of previous actions. But players often tire of story-based games faster than their action-oriented counterparts. They may suffer from a short life-span and low replayability, because of their static composition – the story has been experienced and the challenges have been overcome and they will be largely the same every time. This master’s thesis discusses solutions to the problem of the short life-span of interactive fiction and uses object-oriented reasoning to present four implemented prototype games that each represents one way of adding dynamic factors to a game and heightening the player's urge to relive the experience. These focus on i/ altering the character traits ii/ allowing user created objects, iii/ changing the location and role of objects and iv/ varying the plot setting.

Dynamiska interaktiva berättelser i datorspel Sammanfattning Interaktiva berättelser är ofta en litterär och konstnärlig utmaning för användaren, där denne upplever berättelsen i en ickelinjär ordning. Textäventyrsspel är ett exempel på en särskilt påverkbar berättelse. Spelaren får ett mål att uppnå och har mängder av valmöjligheter, samtidigt som spelet håller ordning på tidigare handlingar och deras konsekvenser i nuet. Men användare tröttnar ofta snabbare på berättelsedrivna spel än på deras mer “action”-orienterade konkurrenter. De har en kortare livslängd och är inte lika njutbara andra gången man spelar. Detta på grund av deras statiska komposition – berättelsen har upplevts och utmaningarna har övervunnits, och kommer att vara i stort oförändrade varje gång. Detta examensarbete diskuterar lösningar till livslängdsproblematiken hos interaktiv fiktion och använder objektorienterat tänkande för att ta fram fyra implementerade prototypspel som vart och ett representerar ett sätt att tillfoga dynamiska faktorer till ett spel och öka spelarens lust att återuppleva det. I tur och ordning fokuserar de på att a/ ändra karaktärernas drag, b/ tillåta användaren att tillverka objekt, c/ skifta läge och roll hos spelobjekt och d/ variera miljön som det utspelar sig i.

Page 4: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

Preface Just as you were getting to know the mysterious archaeologist, in fact starting to like him; just when you had become completely immersed by the 3D rendition of the Sahara desert and you find that long lost mummy of an ancient Pharaoh, the adventure game ends and you are inevitably thrown back into your ordinary gray world. Does it have to be this way? Are story based games ready to be thrown away after just one play through? Or would it be possible to come up with some game design that would make you want to return to your favourite adventure and replay it? This master’s thesis project was developed for the Human-Computer Interaction Group at CSI at the Royal Institute of Technology in 2003. In 2008 I returned to and finished the project report. Many thanks go to Yngve Sundblad and especially Björn Thuresson for his mentorship and patience with this project. The project resulted in the following four implemented prototype games:

Prototype I: DynaCharacter

DynaCharacter demonstrates dynamic allocation of roles to characters and objects, and it also implements a map with dynamic room relations.

Prototype II: DynaTool

DynaTool demonstrates user creation of tools by combining objects.

Prototype III: DynaObject

DynaObject demonstrates dynamic allocation of locations to objects.

Prototype IV: DynaSetting

DynaSetting demonstrates change of plot setting through dynamic game vocabulary. Fully functional web versions (without the possibility to save your progress) of the four prototypes can be played at the following address: http://www.student.nada.kth.se/~d98-pwi/exjobb

Page 5: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

Table of Contents 1 Problem Analysis ................................................................................................... 1

1.1 Interactive Fiction in General – Affecting a Story ..................................... 1 1.1.1 Static vs. Interactive Fiction ........................................................... 1 1.1.2 Works of Interactive Fiction ........................................................... 3

1.2 Text Adventures or IF ................................................................................ 6 1.2.1 The Choice of the Text Adventure Format for This Project ........... 6 1.2.2 Digging Out the First Text Adventure ............................................ 6 1.2.3 Technical History of Text Adventure Gaming ............................... 7

1.3 Playing a Text Adventure ......................................................................... 10 1.3.1 Overview ....................................................................................... 10 1.3.2 Pausing and Continuing ................................................................ 10 1.3.3 Affecting Objects .......................................................................... 10 1.3.4 Affecting Persons .......................................................................... 12 1.3.5 Other Commands .......................................................................... 13

1.4 Dynamics as a Means to Raise Replayability .......................................... 13 1.4.1 Dynamically altered conditions at each replay of a game ............ 14 1.4.2 Autonomous Non Player Characters ............................................. 16 1.4.3 Composite Items with Dynamic Meaning .................................... 17

2 Game Design ....................................................................................................... 17 2.1 Functional Design .................................................................................... 18

2.1.1 Prototype I: DynaCharacter .......................................................... 18 2.1.2 Prototype II: DynaTool ................................................................. 20 2.1.3 Prototype III: DynaObject ............................................................ 21 2.1.4 Prototype IV: DynaSetting ............................................................ 22

2.2 Introduction to Technical Design ............................................................. 26 3 Results ................................................................................................................. 27

3.1 User Study of the Prototypes .................................................................... 27 3.1.1 Prototype I: DynaCharacter .......................................................... 27 3.1.2 Prototype II: DynaTool ................................................................. 28 3.1.3 Prototype III: DynaObject ............................................................ 28 3.1.4 Prototype IV: DynaSetting ............................................................ 29

3.2 Results and the Future .............................................................................. 29 4 Bibliography ........................................................................................................ 32

4.1 References ................................................................................................ 32 4.2 Other Inspirational Literature ................................................................... 33

5 Appendices .......................................................................................................... 34 5.1 Appendix A: Technical Design ................................................................ 34

5.1.1 Prototype I: DynaCharacter .......................................................... 34 5.1.2 Prototype II: DynaTool ................................................................. 40 5.1.3 Prototype III: DynaObject ............................................................ 43 5.1.4 Prototype IV: DynaSetting ............................................................ 49

5.2 Appendix B: Interview with IF Expert Emily Short ................................ 59 5.3 Appendix C: Transcripts of User Study session ...................................... 63

5.3.1 Transcript of Prototype I: DynaCharacter .................................... 63 5.3.2 Transcript of Prototype II: DynaTool ........................................... 70 5.3.3 Transcript of Prototype III: DynaObject ....................................... 74 5.3.4 Transcript of Prototype IV: DynaSetting ...................................... 77

Page 6: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive
Page 7: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

1

1 Problem Analysis

1.1 Interactive Fiction in General – Affecting a Story

1.1.1 Static vs. Interactive Fiction

Works of interactive storytelling are generally referred to as interactive fiction. Before we start discussing them, we need a definition of what this concept means. If we look at this phrase, we first have the word “interactive”. Longman’s Dictionary of the English Language [1] helps us with a definition. interactive adj characterized by interaction; specif characterized by the exchange of information between a computer and user while a program is being run Both the general definition and the specific one within the world of computers are useful to us, since, as we shall see, works of interactive fiction are not necessarily dependant on a computer. If we look for further explanations, the noun “interaction” can’t be found in Longman but the verb “interact” is there. interact vi to act upon each other; act reciprocally Then, looking up “fiction” in Longman, we find: fiction n 1a something invented by the imagination; specif an invented story <distinguish fact from ~> b literature (e.g. novels or short stories) describing imaginary persons and events <a writer of ~> 2 law an assumption of a possibility as a fact, irrespective of the question of its truth <a legal ~> The first (1a) definition is the widest, and the following (1b) is similar but narrows down the field to actual literature. Both of these seem more relevant to us than the second definition of fiction as a legal term. But still, “the assumption of a possibility as a fact, irrespective of its truth” is central to a work of fiction. Fiction strives to be believable if not necessarily realistic. Let us, then, define interactive fiction as a sum of its parts: interactive fiction an invented story or piece of literature, characterized by reciprocal action and exchange of information between storyteller and reader, possibly with the aid of a computer Later in this report, we will find that the term is nowadays often used to refer exclusively to text adventures. The reason for using this more general and academic wording is the increasing sophistication and literacy and wider scope of

Page 8: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

2

the text adventure genre the last decade, drifting away from the concept of a “game” or “adventure”. But to avoid confusion we will talk about interactive fiction in the broader sense, and use the acronym IF to denote text adventures. Static fiction is a term sometimes used for fiction which is not interactive, such as a short story or a novel. Arguably, this type of fiction is also interactive, because the reader does the reading and turning of all the pages and enhances the story with his own imagination. But for this project, we will not consider this interaction. The difference between static and interactive fiction, lies in the possession of control. In a novel, the author assumes full control over the flow of the narrative – the tempo of the flow, the order of the episodes and subplots, and which potential episodes are included or excluded. There is only one possible path through the piece, and this path is already determined by the writer by the time the reader opens the book. Fiction which is interactive on the other hand, releases some of this control to the reader. In its perhaps simplest form, pauses are inserted, where the story stops and waits for the reader to let it continue. This may not seem very interesting, and not much different from turning the pages of a book, but it could be seen as the most naive form of interaction on the reader’s part. In another simple, but more useful form, the reader is allowed to choose in which order the parts of the story are presented, and hence how they affect the meaning of each other. The navigation through the story then becomes almost like navigating through a geographic area. The experience of the story is different depending on which path one takes. The reader may or may not have seen all episodes before reaching the end. Incidentally, there needn’t be any actual conclusion to the story – it may instead be a connected cloud of episodes without any route to resolution. This type of story does not always need a computer to work. It could exist as a hypertext document with clickable links but also as a Choose Your Own Adventure Book. This was a popular genre of books in the 1980’s, with mostly fantasy themes. At certain points in the book, the reader could choose where to go next. For example: …the dragon awakes and turns his eyes towards you! If you wish to attack the dragon, go to page 81. If you wish to run out of the cave, go to page 93 If you wish to call for help, go to page 109 A more involved form of Interactive Fiction is a story which has a memory. Not only does it at certain points allow the reader to choose between a range of actions, leading to different chapters of the piece, but it also remembers all previous choices. The story with a memory allows more complex actions, where the choice you have made earlier affects the choice further ahead. For example, if you told the protagonist to pick up a useful object at one point, you may have the option of using it later on. This is difficult or impossible to create within the medium of a book or hypertext, but exists in role playing games, where the

Page 9: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

3

dungeon master acts as author, book and memory. And, since the computer is ideal for memorizing facts, it exists in computer games, like text adventures, which we will be discussing extensively later.

1.1.2 Works of Interactive Fiction

In Writing Space ([2] Chapter 7), Jay David Bolter discusses the use of computers in Interactive Fiction. Throughout our digital history, computer texts have been mostly non-fiction. And in spite of the use of word processors, the dominant medium used to reach the reader remains printed text. Yet there are a few authors of fiction who have taken advantage of the computer as a highly interactive tool, not only for writing, but also for the presentation of the work. These writers pick up a time-honoured tradition. People have told stories for as long as we have had a language. Before the use of a written language, and perhaps even more importantly, the arrival of the printing process, the storyteller had to rely on the spoken word to communicate his tales. Sitting in a group, perhaps around a camp fire, the story would unfold piece by piece. And the audience would have a chance to affect the story by adding bits and pieces themselves, or requesting in which direction they wanted the story to proceed. This was probably highly interactive storytelling. Then came the written language, but still all text had to be written by hand, so it didn’t spread enough to threaten the position of the storyteller. But when the printing process was conceived, one author could reach a large audience without ever physically meeting them. This allowed a massive increase in the spread of knowledge and stories. But the non-present author could not receive any feedback from his readers, and was able to maintain in full control of the outcome. And so, as stories were increasingly communicated through print instead of the spoken word, the possibility of interaction from the audience of the storyteller was practically lost. There have been a few avant-garde writers of interactive fiction outside the game genre from the 80s and after. They often use the possibilities of hypertext fiction. Hypertext had been invented decades earlier, and used only for non-fiction documents. In hypertext, a document presented on a computer contains regular text in which certain words are underlined. These underlined words constitute a link which leads to another document on a related subject. The reader navigates by clicking on these links. We are all very familiar with the concept after the exponential growth of hypertext documents presented on the World Wide Web. In a similar way, hypertext fiction is a collection of many shorter or longer documents, connected in a network of episode fragments. The reader is presented with an initial fragment and after reading it, he can decide which direction the story should take – at the decision point at the end of the fragment, or perhaps at hyperlinks scattered throughout the text. The decision could be as simple as the order of the presentation of episodes. Or the nature of the navigation may be geographical, where the main character is steered to various places. Or it may be navigation through the abstract structure of the story – perhaps each direction represents a subplot or an emotional aspect of the story. The result of each path

Page 10: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

4

through the story can be a different chronology, or a point of view of a different character. This story does not have to be presented on a computer – remember Choose Your Own Adventures – but it often is. The author can still be considered the creator but here he is able to choose how much creative control to release. A publishing house by the name of East Gate, run by Mark Bernstein, started releasing mostly hypertext fiction. When titles began to appear, they were nowhere near as commercially viable as the non-fiction hypertext of the World Wide Web. Over all, critics were not convinced by this new form of fiction either. “Insignificant” and “unreadable” were judgements often passed. Interestingly enough, this was the same criticism that modernist authors met at first. To the untrained eye, it may perhaps seem like hyperactive fiction. Some proponents of hypertext fiction consider their work almost like a revolution of the reader. This uprising is aimed to take back influence over the story, something which the reader has so long been deprived of. The author should share some of his power over his work. Or maybe it should not even be considered solely his work. The piece can be seen as a collaborative effort between author and reader and so it is not completed until the reader has done his part, by navigating through it, making different types of choices along the way. Better yet, maybe the readers could be involved as early as during the writing process? Using the hypertext editing system Storyspace, Michael Joyce created Afternoon. One of the best examples of hypertext fiction, this piece is partially based on Garden of Forking Paths by Borges. Afternoon embraces both the immediacy of an adventure game and the sophistication of printed fiction. The story is built from many episodes, each containing between one and a hundred words. The reader steers Afternoon by typing an answer in a bar below the text, or by clicking on one of the words of the text. The result is sometimes contradictory as Afternoon unfolds into an experiment with cause and effect. The reader inadvertently tampers with the logical chain of a plot, something which we rely on in printed fiction. The experience is like exploring a large house, as he moves along, he discovers some familiar parts and some new. This causes feelings of frustration, when returning to a passage for the tenth time, and excitation when discovering something new. Some of the episodes attract others to a high degree through the web of links, and some to a lower degree, similar to the forces of gravity in a planetary system. The meaning of the story is created in each episode but also in every conceivable series of episodes after each other. An episode, like for instance the lunch meeting, takes on different significance and meaning depending on what episode was presented before – immediately before or much earlier. The impression becomes ambiguous in the same way a human memory of a story is. Consider the remarkable discrepancies in the testimonies of different witnesses in a police investigation. Afternoon, then, becomes a struggle for meaning, in more ways than normal reading is; a struggle to make sense of the sometimes fragmented account of the story.

Page 11: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

5

Can hypertext fiction consequently be considered a non-linear story? The structure appears to be non-linear, it is more of a network of episodes, than the string of episodes which make up a novel. But each reading through a piece of hypertext fiction is linear. Each path a reader has taken can be transformed into a linear book, an account of his experience of the story. (In text adventures, this is called a transcript. We will discuss this later.) No, hypertext should not be considered non-linear but rather multilinear. Every path through is linear, but there is a multitude of possible paths. Bolter calls the rearrangement of episode order in hypertext fiction hyperbaton. This is originally a classical rhetorical term used to denote unexpected order both in words of a sentence and in the pieces of a story. The Odyssey for example has a long flashback which represents an example of hyperbaton. During the time of the Persian Gulf War in 1991, is both when Victory Garden is set and was written. This other significant example of hypertext fiction was written by Stuart Moulthrop and consists of as much as 990 episodes with 2800 links. The story begins on the night the bombings started January 17 1991. The characters are students, and employees at a fictional university in something that resembles Austin, Texas. All of the problems of these persons are connected to the war in different ways. And the media coverage of the war plays a large part in the story. In Victory Garden, there is a map on which the reader can click to steer through the story. This map represents not only the geographic area of the story but also symbols relating to the segments of the story. It becomes part of the structure and not only a supplement. In this great web of narrative, questions like “Who is this person?” and “Why does he act this way?” appear. In a conventional book at the final page, the reader will most likely know the answer, but here he may not. Contradiction as a tool is used several times. In one passage, a quotation from Neil Postman discusses how television is not a surface for texts like a lamp is. Then by clicking on the word “lamp”, we are thrown back to the story, where one character uses a TV in exactly this way – by letting it light up the wall. In these passages, the digression, represented by a quote, becomes the central structure and the actual narrative is the digression. The same relation appears between the plot and the documents of the war. Is the plot in Victory Garden, quite contrary to the plot-centred structure of printed fiction, only a digression from the story of the war? In this story, Bolter notices, the device of displacement is displaced. And the repetition which the reader may feel is inherent in the medium. But this is repetition with change. A statement is taken back, altered and restated in the form of something new – and better.

Page 12: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

6

1.2 Text Adventures or IF

1.2.1 The Choice of the Text Adventure Format for This Project

Text adventures is a genre of text based computer games that reached its commercial peek in the 80s with games like Infocom’s Zork, The Hitchhiker’s Guide to the Galaxy, Trinity [3] and Scott Adams’s Adventureland [4]. The last ten years or more, the genre has been taken to new artistic heights by enthusiasts outside the corporate world through pieces like Photopia by Adam Cadre [5] and Galatea by Emily Short [6]. The results of my project should hopefully lead to a more interesting and captivating experience for any user who enjoys a moment of gaming or a session of multimedia e-learning. But in the context of a 20 university point Master’s Thesis with a maximum of ten weeks worth of programming time this project had to take certain forms. It could not become a multimedia project since the work on graphics alone would take up at least ten weeks. Also it could not comprise of an entire game. This would be too time-consuming and would narrow the number of aspects I could focus on. So the project would have to be text-based in appearance and in user interface – that is a text adventure. And it would have to amount to fragments of games as opposed to a complete one. This meant that I could find time to make several prototypes, exploring several means of increasing the dynamic experience for the user.

1.2.2 Digging Out the First Text Adventure

Graham Nelson [7]] explains the origin of probably the most influential computer game ever: Adventure – the first text adventure. The first adventurer could be considered Stephen Bishop, a mulatto slave born around 1820 who was a handsome and enthusiastic guide in the Kentucky karst. The Mammoth Cave in which Adventure is set, was according to legend discovered when a hunter called John Houchin, in the 1790s pursued a wounded bear all the way to a pit near the Green River and happened to discover the entrance. It was full of bats, and was mined during the following years for guano, which can be made into gunpowder. After the Civil War, the demand for Guano fell, but the cave became a small attraction after an Indian mummy along with a collection of talismans was found in the area. As a result, the cave was considered one of the wonders of the world. But it was still forgotten for a number of years, considered a small cave, as far as it had been explored. In 1838 Stephen Bishop’s owner bought the cave. Bishop was an extraordinarily gifted man. He was self-educated in Latin and Greek and explored and christened much of the cave in his free time. The known area doubled as a result, and the names were a mixture of American and classic ones: The River Styx, The Snowball Room, Little Bat Avenue and The Giant Dome.

Page 13: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

7

Stephen found peculiar species and remains of extinct ones, and more and more caves. His map from 1842, which was created entirely from memory, was used for half a century. The Mammoth Cave became a tourist attraction and a good investment for Stephen’s owner. Close by, other miners found the Great Onyx Cave in the Flint Ridge in1912 but in the 40s most of the area was made a National Park and all caving was banned. Many explorers were convinced that the Mammoth and Flint Ridge caves were all connected in an enormous network and were finally allowed to investigate the pair of caves. But all connections from Flint Ridge were difficult and water-filled, and all leading to dead ends. In 1972 a slim explorer named Patricia Crowther at last found the entrance when she made it through the so called “Tight Spot” and found a hidden muddy passage into the Mammoth Cave. This muddy passage was later found on Bishop’s map. Bishop on the other hand, was freed in 1856, but died one year later, before he had a chance to buy his wife and son. At that time the cave had 226 avenues, 47 domes, 23 pits and 8 waterfalls. Still today the cave hasn’t been fully explored, it is estimated to reach between 500 and 700 kilometres. In 1972, William Crowther, Patricia’s husband, wrote a computer simulation in FORTRAN of a region of the Mammoth, called Bedquilt Cave. Later it acquired the name Colossal Cave and subsequently Adventure. The simulation covered a large area, four storeys tall and was described with geological precision. The language is also full of caving expressions, and the word “room” is used for all types of caves and holes, in accordance to caving tradition. Hence the adventure game convention of calling each discrete location a “room”. It may be Greenland, it may be the bottom of the sea, or a kitchen, but they are all called rooms in this genre of games. Then in 1976 entered Don Woods, Crowther’s colleague and a researcher at Stanford’s Artificial Intelligence Laboratory. He filled the caves with magic and puzzles, receiving inspiration from role-playing games and the works of Tolkien. Still many features of the game were from real life. The mysterious markings on the walls for instance, some of them by Bishop, are in the game. And fantasy elements were added – volcanoes, dragons and dwarves. Although still written in Fortran, soon versions made in the C language spread on computer tapes across Unix computers in universities all over the world. Adventure had reached a large audience, for that era, in 1977 and became highly influential to what was to come next. Many conventions were inherited. Zork, The first commercial text adventure, by Infocom [3], and Adventureland [4] by Scott Adams, both feature a dragon, a bear, a troll, a volcano, a maze, a lamp with bad batteries and a treasure chest. But in terms of atmosphere, Adventure may still be the best rendition of the underworld in a computer game.

1.2.3 Technical History of Text Adventure Gaming

Murray ([8]] p 74-) recalls that the first adventure game for the computer was Adventure. This game set the standard for treasure hunts where the player travels

Page 14: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

8

around a virtual environment, solves problems and fights enemies by typing in commands and reading descriptions of the consequences on the screen. Then came Zork, which was an improvement of Adventure benefiting from the features of the MDL language [9], a relative to LISP. Zork was developed by researchers at the MIT Laboratory for Computer Science. Similarly to in a role playing game, the computer works as a dungeon master, describing the invisible world and the effects of the player’s actions. In Zork the player navigates between rooms by typing directions (north, south, east, west, up, down), looks for objects that can be interacted with by typing commands like “read letter”, “take knife” or “drink water” and solves riddles and fights evil inhabitants. An excerpt from the beginning of Zork interpreted by WinFrotz on my home PC: West of House You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here. >go north North of House You are facing the north side of a white house. There is no door here, and all the windows are boarded up. To the north a narrow path winds through the trees. >east Behind House You are behind the white house. A path leads into the forest to the east. In one corner of the house there is a small window which is slightly ajar. >open the window With great effort, you open the window far enough to allow entry. >go in Kitchen You are in the kitchen of the white house. A table seems to have been used recently for the preparation of food. A passage leads to the west and a dark staircase can be seen leading upward. A dark chimney leads down and to the east is a small window which is open. On the table is an elongated brown sack, smelling of hot peppers. A bottle is sitting on the table. The glass bottle contains: A quantity of water > >examine water There's nothing special about the quantity of water. >take bottle

Page 15: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

9

Taken. >drink water You'll have to open the glass bottle first. >open bottle Opened. >drink water Thank you very much. I was rather thirsty (from all this talking, probably). > (Note the meta-joke where the computer, first acting as the eyes of the fictional adventurer, suddenly appears as a real person, declaring his thirst from orally describing the world to the computer user.) Zork and many other adventure games are made for the Z-machine, a virtual computer which requires an interpreter, e.g. WinFrotz, to be run on an actual computer. This is in order to facilitate portability; only one game version needs to be released and then only one interpreter for each computer system such as PC, Unix or Mac is needed to play any Z-code game on your computer. Also with the limited amount of memory available on the computers of that time, the Z-machine allowed clever storage to fit as much text into a small computer as possible. This 25 year old machine was actually one of the first virtual machines in the world, long before Java started to use this concept for portability. Before the 1970s programming was done by writing commands on paper and then translating them to punch cards, feeding them to the computer and waiting for the paper printout. By the 60s, the modern interface consisting of a keyboard and a display device, was developed. This let the programmer see immediate results of his work. Another fact that contributed to instant feedback was that programming languages which were interpreted rather than compiled were being used more and more, allowing for instant feedback to a command or partial program, without having to translate the whole program to machine code first. Zork was written in LISP, which stands for LISt Processing Language, developed at MIT in the 1950s for the purpose of artificial intelligence. LISP allowed immediate response to each command, resulting in a conversation-like form of communication between the programmer and the program, all this was inspirational to the interface of Zork. Murray finds that Zork actually projects the joy and frustration of programming onto a quest full of evil trolls, dead ends, riddles, and rewards for overcoming each of these. And when the player has finally found the correct sequence of commands necessary to be successful in his task, the program has taken over the role of the author or designer – it has in fact programmed the player.

Page 16: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

10

1.3 Playing a Text Adventure Stephen Granade [10] explains what it means to play an text adventure or a piece of IF as it is more often called nowadays.

1.3.1 Overview

Every piece of IF contains locations, items, characters and events. You play the main character and type commands which lead to the actions of the character and the flow of the story. You move around, exploring and learning from your environment. Doing this, you will come across puzzles which are in your way as you try to achieve your goals. Solving these puzzles or problems is part of the fun of a text adventure. Some puzzles will require you to use objects in inventive ways and some will require convincing other characters to do things for you. In many games you can measure your success and progress by the score you have achieved, for instance, 98 of a total of 120 points. You acquire points when you accomplish certain goals or perform key actions. When it comes to progression in time, IF is turn-based in the same way a board game like Monopoly is. Time passes only when you enter a command. Nothing happens while the computer is waiting for your input, stopping at the prompt: “>”. However, if you want time to pass without doing anything, you can type WAIT.

1.3.2 Pausing and Continuing

You can save your position in a game at any time. The reason to do this is so that if you are later killed or have rendered the game unsolvable, you can go back to that game position or “save-game”. This also allows you to divide your playing into several sessions. To save a game you type SAVE. The game will ask for a file name, which you then enter. This can be repeated with different game positions under different names. To start playing from a game position, type RESTORE and then enter the file name.

1.3.3 Affecting Objects

The commands you enter at the input prompt are in simple English. They are imperatives, sentences which could be (but are not) preceded by “I want to…”. For example: >(I want to) PICK UP THE LAMP Words like “the”, “a” and “an” are optional, so the following would also work: >PICK UP LAMP

Page 17: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

11

Text adventures are made up of different locations, called “rooms”. When you enter a room for the first time, the game will describe what you see there. To have another look at your surroundings, type LOOK. To interact with the objects in a room, no further moving is necessary; everything within the room is within reach, or “in scope”. The room description may also tell you which directions you can go. To move into an adjacent room, type the direction. These are the commands used for movement: NORTH, SOUTH, EAST, WEST, NORTHEAST, SOUTHEAST, NORTHWEST, SOUTHWEST, UP, DOWN, IN and OUT. The first ten can be abbreviated to N, S, E, W, NE, SE, NW, SW, U, and D. Through the game you will come across different objects. To perform an action on an object, use imperative sentences. If you find a cupboard you could OPEN THE CUPBOARD or EMPTY THE CUPBOARD. Use the commands TAKE, GET or PICK UP to take objects. Some examples of commands: >GET THE BOTTLE >RAISE THE CHAIR >CLIMB UP THE ROPE >OPEN THE TOOLBOX >SPREAD THE ORANGE MARMALADE ON MY DRY PIECE OF BREAD >HIT JOHNNY WITH THE WRENCH >WEAR THE TUXEDO >REMOVE THE TUXEDO >PUSH THE SHOPPING CART TO THE NORTH >GET IN THE WOODEN ROWBOAT You can perform a command on several objects by separating them by commas and the word AND. >TAKE THE WINE AND THE OLD CHEESE >PUT THE CUP, THE FORK, AND THE SPOONS IN THE DRAWER You may use the word ALL to have the command apply to all potential objects. And to exclude certain items, use EXCEPT right after the word ALL. >TAKE ALL >DROP ALL EXCEPT THE LARGE MEDAL >GET ALL FROM THE BOX The words IT and THEM are used to refer to the last object or objects used in a command. >TAKE BOOK. EXAMINE IT >OPEN THE PAMPHLET AND THE BOOK. DROP THEM As seen above, you can include several commands on one line by separating them with periods, the word THEN, or a comma followed by the word AND.

Page 18: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

12

>GET ALL. GO SOUTH >GET IN THE PORSCHE THEN START IT >CLIMB THE ROPE, AND THEN OPEN THE WINDOW Sometimes you will type an ambiguous command which leaves out some word. The game will try to figure out what you mean. If there is only one object which makes sense together with the command, the game will assume that you meant that object and act accordingly. For example: >UNLOCK THE DOOR (with the key) The door unlocks with a small noise. The game will ask you which object you meant if there is more than one object which makes sense. You may answer by typing the missing information at the next prompt. >TURN ON THE LIGHT Which light do you mean, the flashlight or the table lamp light? >TABLE LAMP LIGHT The room brightens up a bit. >TIE ROPE What do you want to tie the rope to? >BRANCH You loop the rope around the branch and tie a knot in it.

1.3.4 Affecting Persons

Sometimes you will encounter other people and animals. There are usually four ways to communicate with them. You can ask them about an object or topic. >ASK BEN ABOUT HIS MOTHER >ASK LINDA ABOUT DARK CHOCOLATE Show them an object. >SHOW BODY TO CORONER >SHOW BUCKET OF BALLS TO GOLFER Tell them about an object. >TELL POSTMAN ABOUT MY DOG >TELL ANNA ABOUT SANTA CLAUS Tell, or command, them to perform an action. >HARRY, HI >MAX THE DOG, FOLLOW ME

Page 19: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

13

>SORCERER, WAKE UP. DO SOME MAGIC While “HI” is not actually an action it is constructed the same way. Worth noting is that the concept of commanding characters is generally not used very often in games.

1.3.5 Other Commands

ABOUT: Shows information about the game. AGAIN or G: Repeats your last command. But if your last command was composed of several actions, only the last command is repeated. AUTHOR: Information about the author. HINT: If there is a hint system, it will give you a hint about the puzzle you are stuck on. INVENTORY or I: Will show a list of the objects you are carrying. LOOK or L: Shows the full room description of your present location. OOPS: Will allow you to correct the spelling of a word in the last command. For example: >TAKE THE BOTTLE OF MEDECINE I don’t know the word MEDECINE >OOPS MEDICINE QUIT or Q: Ends the game. RESTART: Starts the game over from the very beginning. RESTORE: Restores a position you have saved with the SAVE command. SAVE: If you want come back to the same place later you can store the current state of the game in a file. SCORE: Shows your current score and the maximum score achievable. SCRIPT: Starts writing everything you see on the screen (your commands and the game’s responses) as a transcript to a file. The game will ask you for a filename to be used for the transcript. Then use the command… UNSCRIPT: Turns off the transcript under construction stated with the SCRIPT command. TERSE: This tells the game that you wish to see only short room descriptions if you have already been in a room. See also VERBOSE. UNDO: Tells the game you want to take back your last command. The state of the game will be reversed to the way it was before the last command. VERBOSE: This tells the game to show you the whole description of every location you enter, no matter if you have seen it before See also TERSE. VERSION: Shows you the current version of the game. WAIT or Z: Causes time in the game to pass. This may be used to wait for something to happen.

1.4 Dynamics as a Means to Raise Replayability Story-driven adventure games may offer an intellectual and emotional experience. These games are very captivating and often provide the player with a unique freedom to discover side-plots that may not be needed to solve the game. But there is a low chance for them to be played over and over again. This is due to the

Page 20: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

14

recognition factor – the story has been told and the “puzzles” have been solved and will not change notably if the player restarts the game. Solutions to the problem of the short lifespan are explored in this project by increasing the dynamics in story-driven games. Before starting, I had a few alternatives how to approach the problem (with a few examples to each). Some of these I later realized and some of the prototypes came out of ideas I had later on.

1.4.1 Dynamically altered conditions at each replay of a game

What unites this category of ideas is that in one way or another, the intial state of the game, as opposed to the state well into the session, differs each time the player starts the game. A game comprises of a series of states which can be altered by the actions that the player takes throughout the game. But in traditional adventure games, the initial state is invariably the same from one time to another. To challenge this notion and allow the user to experience something fresh, I came up with a few suggestions to vary the start parameters, if you will, of a game.

1.4.1.1 Altering Roles of Objects and Characters

The first idea was a murder story á la the board game Clue, where the computer randomly decides how the crime was committed. A murderer is chosen out of a range of characters: Persons:

• Colonel Mustard • Professor Plum • Reverend Green • Mrs Peacock • Miss Scarlett • Mrs White

And the murder weapon can be any of these:

• Dagger • Candlestick • Revolver • Rope • Lead Piping • Spanner

Finally, the murder scene is one of the rooms of the mansion in Cluedo:

• Lounge • Dining Room • Study • Ballroom • Conservatory

Page 21: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

15

• Kitchen • Hall • Billiard Room • Library

Depending on how these combinations are chosen by the game, examining each of the rooms and weapons, and questioning the characters would lead to different results accordingly. There would be a challenge how to make these characters believable, if the range of possible interactions with them is an arbitrary mix depending on some random initial conditions. Like Smith writes in Engaging characters [11], this is dependent on the degree of recognition we feel with the character – to which degree he or she is in possession of reasonable basic human attributes. Although his writing is about film characters, this is equally true in the case of interactive fiction. This concept of a murder mystery was used in Prototype I: DynaCharacter.

1.4.1.2 Altering Setting

The second idea was to alter the setting of the game. This idea came after a meeting with my project supervisor Björn Thuresson. Years of studying dramaturgy has led him to believe that the basic conflict of a story can be used over and over again as long as the setting is different. As an example he described the similarities between a film about space exploration and a submarine film. In both cases we see a group of brave persons, trapped in a metal can in a hostile environment. And in both stories we will invariably experience a scene where the crew is anxiously following the movements of a depth or altitude meter, hoping that its drastic fall will stop before it is too late. So we agreed that similarly in the realm of computer games, an old plot may feel new and interesting if the environment where it takes places changes. So the conflict of a fantasy game, for instance, would fit equally well in 18th century revolutionary France. After this discussion, I came up with the idea of a game where the player character may be trapped on a desert island in the middle of the ocean, or on an asteroid in space, depending on which he chooses when starting up the game. The two game modes would have exactly the same objectives – to find water and a way out of the strange environment. This concept was used in Prototype IV: DynaSetting.

1.4.1.3 Abstracting Game Objects into Classes

The third idea of this category considered the game objects of an adventure. The majority is often part of a solution to a “puzzle” or a mission in the game. I thought you could take these objects and move them up to a higher level of abstraction according to what their use in the specific game is. For instance we

Page 22: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

16

may look at the abstract group of objects which we may classify as keys, and by keys we mean objects that are used to let us into otherwise inaccessible locations. Looking at it this way a key in a game may be instantiated by either a screwdriver a crowbar or a password or any other object which would allow us to go through a specific locked door. Similarly we could classify objects as vehicles, if they have the ability to take us to another location in other ways than walking. In this category we would include a giant goose on which we can ride, or a taxi or a magic word which would instantly teleport the player to another location. (For those interested, In Zork ,the magic word was Xyzzy, and as a homage to the original, almost all text adventures since have provided some clever response, useful or not, when the player types this specific word.) This idea of altering which objects are used for accomplishing a certain task was developed further in my interview with IF expert Emily Short (see Appendix 5.1) A very basic implementation of this concept is the random assignment of the murder weapon role to different objects in Prototype I: DynaCharacter. A simpler concept would be to simply scatter around static objects (e.g. when a key is simply a key) in different locations, rooms or containers, at each replay. That concept was used for Prototype III: DynaObject.

1.4.2 Autonomous Non Player Characters

1.4.2.1 Characters Exchanging Information

Non player characters are characters you encounter in a game, who are not controlled by you or some other physical player. So non player characters, or NPCs, are programmed to be in a certain room and to give certain answers when questioned. Sometimes they may be in possession of an item, which may be of use to you. But this is often the extent to which they are capable of acting. But what if the NPCs were allowed to move around and exchange information and move objects in an autonomous, non-deterministic way? One way of using this would be to look at the transfer of knowledge between NPCs. The characters would be able to gossip between each other about things they have seen or heard from someone else. We could also introduce the idea of fact distortion when news is transmitted between persons, so that when the fifth person gains knowledge about something, it is no longer fact but a rumour with very little truth. After a person learns something, his behaviour would change accordingly. Another interesting aspect in transfer of knowledge is the difference between what the user knows and what the player character (that is the character which the user controls) knows. But that is an entirely different field of research.

Page 23: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

17

1.4.2.2 Dynamic Character Attitudes

A different idea of NPC autonomy could be their attitudes. Consider an NPC which the player (or another NPC) has been rude to earlier on in the game. The NPC then remembers this and carries a grudge, not being very cooperative towards the insulter the next time around. The concept of character development is central in story-telling, so why not use it for NPCs? And another classic component in games as well as stories is the main character’s sidekick. Combining these two ingredients into a sidekick who remembers all the things you have been through together may be an effective catalyst to the emotional intensity of a game.

1.4.3 Composite Items with Dynamic Meaning

1.4.3.1 Building Dynamic Objects

After playing through an adventure game the player knows what objects there are and what use they have within the game world. But if he or she could create his own objects and tools that would perhaps provide motivation to play around with the game world a longer period of time. Some existing adventure games may allow you to create a new object from two components. Let’s say you could tie together a wooden stick and a rock with some rope and create a hammer. But this is generally programmed in a static way so that this is the only possible act of tool creation allowed in the game. More interesting would be if we could also take that wooden stick and tie it together with some broken glass instead and thus create a knife, or to build a range of other useful items. For this to work the program would have to be built in a much more flexible way. A hammer wouldn’t simply be represented by a hammer object but by any type of composite object which consists of a stick and a hammerhead-shaped object of some kind. Or a radio with an alarm function might be built by connecting a timer of some kind with a transistor radio. This concept was used for Prototype II: DynaTool. A different approach to object creation could be refinement of raw material. A piece of wood could then be made into something useful, like a baseball bat or a bench by sawing or running it through a turning-lathe in an appropriate manner. This would require a complicated world model which keeps track of the current shape of an object in all three dimensions and would be too large a study for the scope of this project. My user study participant, Jon Åslund, had an idea similar to this, see Chapter 3.1.2

2 Game Design In this chapter each game prototype is presented through a functional design chapter.

Page 24: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

18

The functional design describes how the game idea evolved from the range of ideas I had in chapter 1.4. It also shows the important goals for the player to achieve. Then we arrive at the technical design, which is introduced in chapter 2.2. The full technical design with class and object definitions can be found in Appendix 5.1.

2.1 Functional Design

2.1.1 Prototype I: DynaCharacter

For my first prototype I made a small murder mystery game. Part of the idea was to make a computer counterpart to the board game Clue or Cluedo, in that the murder and murder weapon would be different each time you play the game. I designed the game to dynamically assign the murder role to one of the characters at startup and to change their testimonies accordingly. All of the persons have the alibi of having been with another person at the time of the murder and one even admits that he/she was alone. But for one of the characters, the person constituting his alibi does not agree with him. That is how the murderer is found. Another small dynamic feature of this prototype was to randomly alter the room relations – the map of the house – at each replay. So the player has a different experience each time he starts moving through the house using NORTH, EAST, SOUTH and WEST. The game map consists of 3 rows containing 3 columns of rooms as illustrated below (Figure 1), and the order of these nine rooms is randomized.

Page 25: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

19

Figure 1: Room diagram for DynaCharacter How does the player know which room was the murder scene and which item was the murder weapon? I simply put some blood on the floor of the room in question. And some blood on the murder weapon. But in the case of the weapon, the stain is so small so the player needs something to improve his vision in order to discover this. Below (figure 2) is a puzzle diagram for Prototype I, which is made up of a directed graph, where the nodes consist of the problems or puzzles that need to be solved in the game. Each arrow from puzzle A to B indicates that puzzle A is one of the puzzles that need to be completed in order to solve puzzle B. More than one arrow directed to a puzzle means that it has more than one prerequisite and several arrows going from a puzzle indicates that this puzzle is a prerequisite for several subsequent puzzles.

Figure 2: Puzzle diagram for DynaCharacter In the case of Prototype I, the diagram tells us that the player has to find the magnifying glass in order to see the small blood stain on an item, and identify this as the murder weapon. And in order to win the game, the player needs to identify the murderer, the weapon and the room that was the scene of the crime.

Page 26: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

20

Three of the nodes in the diagram are grey, indicating that these puzzles are dynamically created. The murderer, the weapon and the room are different at each replay. The remaining white node is the puzzle of finding the magnifying glass and realizing that it is needed to find the small blood stain. This puzzle is static which means that it is similar each time the game is played.

2.1.2 Prototype II: DynaTool

My second prototype was an attempt at making a game world where the player could create his own useful tools from two components. The behaviour and description of an object thus dynamically changes when it is combined with another. To exemplify I took some bristles, a wig, a broomstick, and a fishing rod. Combining any of the two bristle-like objects with any of the two stick-like will result in a perfectly useful broom

Figure 3: Puzzle diagram 1 for DynaTool The puzzle diagram (Figure 3) is really simple and only involves the problem of realizing that you should attach something resembling a stick with something furry to create the broom needed to sweep the floor of the tool shed. But since this problem is dynamically created, any of the four solutions in figure 4 would solve the puzzle.

Page 27: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

21

Figure 4: Puzzle diagram 2 for DynaTool

2.1.3 Prototype III: DynaObject

(Made with the language TADS 2 [13]) Prototype III was made to see what could be achieved if useful objects appeared in different places and perhaps forms each time you play. For instance, the key to a door may be hidden in the hallway at first, and then in the kitchen the second time a player starts the game. Or it may not even be a key this time, but something equally useful that will help you through a locked door – such as a crowbar (although this isn’t implemented in my prototype). At the beginning of DynaObject, the player is asked for his first and last name. Thus the input for the game, telling it in which rooms (Figure 5) to put the objects, is taken from the letter value (A equals 0, B 1 and so on) of the letters in the player’s name. The clever room description grammar of TADS then manages to form complete sentences describing what is on top of a chair and inside a stove each time you play the game.

Page 28: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

22

Figure 5: Room diagram for DynaObject. Both the rooms and the stove and chair may contain objects.

2.1.4 Prototype IV: DynaSetting

The idea to my final prototype came from the discussion about adventure films and their settings in chapter 1.4. The setting of the plot seemed to be the most appropriate to choose as the dynamic component of a story. The only difference between a submarine film and one set in a space ship is that in one the ship is in deep space and in the other it is in the deep sea. In both stories a small group of people are in a menacing environment with only a thin layer of steel protecting them from certain death. In one case it is the movements of the depth meter which is the focus of interest, and in the other it is the altitude meter. But we as an audience do not mind. We are equally captivated each time we watch a film cast from this standard mould. Of course provided the film is well made and has some originality. I thought of another pair of settings which have many aspects in common. What if a person was stranded on a desert island and had to find food and some way to get home? Or what if that person instead had ended up on a small asteroid in

Page 29: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

23

space, desperate to find some food and a way out of there? These are two totally different settings, but with the same plot. And how little of a difference between the games would suffice to make them feel like two different experiences? I started creating DynaSetting with rooms (Figure 6), a story and puzzles that would all fit in both cases.

Figure 6: Room diagram for the island/asteroid in DynaSetting

Page 30: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

24

Figure 7: Puzzle diagram for DynaSetting In this puzzle diagram (Figure 7) we have six puzzles and five of them are dynamically altered, by switching objects according to the setting of the game. The player has three problems; He is hungry, thirsty and needs to find a way out of the island/asteroid. So he has to find something to eat and drink and create a vehicle to use for his escape. In the first puzzle, the player has to find some materials from which to create his ship/spaceship depending on which setting he is in. But before he can use that vehicle he needs to find food and water. He finds some raw food (a fish in the island version or a “carbo-floater” in the Sci-Fi-version) and needs some sort of device to create fire with. This device is actually the same in both game modes. Then we have the thirst problem. The player finds some sort of water container (a coconut or a “water unit”), but it is situated high up on a palm tree or a stalactite. In both game modes, a rock has to be thrown at

Page 31: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

25

the water container to make it fall down on the ground. Now there is the problem of opening the water container; to solve this he needs to find some sharp object that can make a whole and let out the life-saving fluid. Now the player may step into his vehicle, travel home and live happily ever after! During implementation I made a data structure consisting of pairs of words, one that should be used in the first choice of settings for the game and the other for the second choice of settings. As the game progresses, much of the text displayed is shared by the two game modes, but sometimes the words in the descriptions are replaced by an instance of the data structure. So in those places, depending on which game you have chosen to play, one of two words is displayed. For example we have the description of the first location in the game. The variable global.island[global.setting] is an array of length two which is in the global object in order to be available to all parts of the game. The island array has the two word components ‘island’ and ‘asteroid’ and depending on the value of the integer setting, which can be one or two – one for island and two for asteroid – the appropriate word is chosen each time. Simple but effective. “You are on what seems like the southwest shore of the <<global.island[global.setting]>>. Around you, a group of <<global.palmtree[global.setting]>>s, the largest of which, providing you some well needed shade from the relentless sun. Between them and the <<global.oceanedge[global.setting]>>, white, soft, sand stretches out. ”; This is in the island case instantiated with: “You are on what seems like the southwest shore of the island. Around you, a group of palm trees, the largest of which, providing you some well needed shade from the relentless sun. Between them and the ocean, white, soft, sand stretches out.” And in the asteroid case: “You are on what seems like the southwest shore of the asteroid. Around you, a group of stalactites, the largest of which, providing you some well needed shade from the relentless sun. Between them and the edge of the asteroid, white, soft, sand stretches out.” And the result was quite surprising. I played through both versions of the game and they felt like two quite unique games, although with similar plots.

Page 32: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

26

2.2 Introduction to Technical Design The technical design in Appendix 5.1 will be described from a simplified object oriented perspective since my prototypes will take advantage of this method of thinking. In fact, many of the ideas for the dynamic features of the prototypes were inspired by concepts from object oriented design theory. I will use the following terms which will be well known to a programmer but can also easily be explained to other readers.

Object

An entity that will be present in the game, it may be an item like a football, a non player character (NPC) or a room (which may contain items and characters).

Class

A class is a template for an object. So for example a kitchen and a bathroom object are both concrete examples of the class “room”.

Instance

An instance of a class is an object, like the kitchen above, which is a concrete existing example of a class.

Inheritance

A class may inherit another class if it shares its properties but also has some properties of its own. Then it is called a subclass of the other class. For example, a “room” is a form of “container”.

Reference

This is a variable that points out an object. For instance, the “murderer” reference may point out the object Colonel Mustard, keeping track of who is the perpetrator. The choice of programming language in Prototype I was Inform 6, the classic language in which thousands of text adventures have been written during the 90s and 00s. But as I moved on to the following prototypes I wanted to learn another language and also make use of multiple inheritance. This led me to choose the slightly more modern TADS 2 for prototypes II, III and IV. Multiple inheritance is useful for modelling an object with several classes of attributes. An example would be when a car may be considered both a vehicle and a container for other objects.

Page 33: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

27

3 Results

3.1 User Study of the Prototypes In order to evaluate the merits and flaws of the four implemented game prototypes, a user study of some sort seemed like the natural method to choose. It would not be possible to interview a full scale test group within the scope of the project, but it would benefit from an insightful pair of eyes examining it from the outside. However, the demands on such a user would have to be quite specific. The reason is the format of the project. As participant in a user study I would have to have someone with multiple qualities. He or she would have to be familiar with all sorts of games, to be able to compare and contrast the replayability of action games versus adventure games and evaluate how the prototypes possibly bridged that gap by changing in a chameleon-like way between each replay. Specifically he would have to be very familiar with the text adventure genre and its conventions; with its many standard verbs that the player should know, with the norms for what is described in the room and object descriptions, and with the room and non-player character concepts. He should be familiar with the dynamic aspects already inherent in the text adventure creation languages, to be able to go into a discussion of what, if any, new freedom of interaction the prototypes offer. He should also be an experienced programmer in object-oriented programming if possible, to be able to discuss the underlying object-oriented structure allowing the dynamic behaviour. To me, the choice was obvious, I asked fellow KTH-student and now professional system developer Jon Åslund. Jon has a large experience in the game world in general, and specifically with text adventures, as a gamer and also as a developer. And he is an experienced object-oriented programmer. The study was performed at Jon’s residence, with him exploring the game worlds and me taking notes about his actions, both successful and not, trying not to influence him. Although at some points, where it didn’t disturb the purpose, I hinted to him the next appropriate move in the game, so that he would experience the last few features. After each prototype we had a discussion where he gave his views on any qualities or problems he found in each game and the possibilities of developing these ideas further.

3.1.1 Prototype I: DynaCharacter

When Jon played DynaCharacter, he first reacted to how friendly the instructions were. In all my prototypes I decided to add both general instructions on how to play any text adventure and also a specific help function which suggests what verbs and nouns to use to win the game. The point of the prototypes, after all, was to have people test my ideas and not to create difficult puzzles. He thought the idea of a dynamic link between the rooms was neat, and also the map that is generated according to the created room structure. The characters responded differently to the alibi question if they were the murderer, but Jon noted that it

Page 34: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

28

takes several changes to make the character feel new. The most fun part about this prototype was to explore the rooms and objects. Also the interesting objects that were lying around made Jon want to try playing around with them, like trying to throw the wrench through the window for instance. Unfortunately the game had no clever answer to this attempt. Personally, I think that what often makes a game stand out is if it responds in an interesting way when a player tries random playful actions other than those needed to finish the game.

3.1.2 Prototype II: DynaTool

In DynaTool Jon also found interesting uses for the objects found. When he had made a broom he tried to sit on top of it and fly, which I, of course, hadn't implemented. He also tried combining items into a pile on which to climb up. He was interested in how I had implemented the combined items feature using classes and objects and said that he had an idea himself for a game which included the concept of tool creation. His game would be a graphical 3D game where you can cut and carve in raw material and make your own useful game objects such as a sword or a ball.

3.1.3 Prototype III: DynaObject

When Jon played DynaObject he found a small bug. There is an oven which may contain objects. But the description of the oven contained the words “with something inside” no matter if it was empty. I corrected this for the next version. He found it humorous when, at one replay, the fox was caught inside the oven. A small example of when new meaning appears from random location of game objects. He also tried opening the suit of armour, which I never intended to be a secret container. And Jon came up with the suggestion that this idea of moving around objects would be interesting to combine with the dynamic room relation feature of the first prototype. Playing this game, he considered the difference between adding dynamic components to graphical adventure games versus text adventures. In the latter you can make a character come across very differently by just changing a few words, whereas the graphical game would require creating hundreds of new animations. But maybe it is easier in graphical games when it comes to simple objects. In a text adventure a ball always seems the same no matter what adjectives we attach to it, but using graphics you can create ball surfaces with many different shapes and colours which would be very easy for the user to differentiate between. Also the use of verbs is much more flexible using text. In a graphical adventure you may have a few generic verb buttons which may be tried together with all objects (such as open, push, pull and give) and every now and then an object comes along which has an extra button with a specific verb that is useful for that particular object (e.g. an “Inflate” button may appear when clicking on a balloon). This spoils part of the fun of problem solving. In text games the player may create many interesting actions through the use of <Verb> <Object> <Prep> <Object> (e.g. “inflate balloon with pump”).

Page 35: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

29

3.1.4 Prototype IV: DynaSetting

Playing DynaSetting, Jon felt like this game had the most interesting game world. It invited him to try different things – such as setting fire to the shrubbery or gathering a whole collecting of rocks – which weren't possible. He also wanted to ask Swedish song writer Povel Ramel(!) how he should go about opening the coconut (As in his famous song “Kokosnöt”). Naturally I hadn't implemented a Povel character in my game either. When he replayed the game in the asteroid mode, generally he was pleased with the fresh feeling of the new setting, but a few details didn't appear very realistic (if you can talk about realism in a science fiction story). Do stalactites usually have branches, he wondered. And “shore” seems like an odd use of word for the edge of an asteroid. All things considered, Jon liked this last prototype the most and asked the interesting question of what would happen if you could combine all the dynamic features of all the prototypes into one game.

3.2 Results and the Future It seems that the most interesting of the four prototypes as they were implemented is DynaSetting. It is fascinating to see how different a game may come across simply by placing it in another setting with different names for objects and scenery. It may also be because Prototype IV has the most fleshed out game world of the four with the most problems to solve. It is somewhat ironic that this is the prototype with the least interesting technical solution of the four. But sometimes it is the simplest idea that leads to the most complex and interesting results. As a stand-alone concept, though, it may not give enough of a sense of variation for the player to want to replay the game. The game probably needs another degree of freedom to be fully enjoyable in a second playing session – which leads us to the discussion about the room for improvements to this project. With more implementation time a combination of some of the concepts of the four prototypes could have been possible. Let us recall the mutable aspects of each of the prototypes:

• Character Traits, Object Roles, Room Relations • Object Components • Object Location • Setting

Page 36: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

30

It would be interesting to see the following concepts realized:

Object Location plus Room Relations

As my user study subject, Jon, remarked when he had played prototypes I and III, it would be interesting to randomly scatter around objects in the dynamically created house. This could be useful in a mystery game or a treasure hunt, where the player must find the hidden murder weapon or the lost treasure.

Object Components plus Setting

Consider a more involved game in the Robinson Crusoe genre than DynaSetting, where the player’s goal is to find materials to create tools of survival from in the unknown ever-changing surroundings. Or for that matter:

Object Components plus Object Location

The program may initially hide materials needed to create a soap-box car (toy car made out of old junk) throughout the game world. The player must then find enough gadgets to build his own toy car and compete with it.

Character plus Setting

Consider a game world where the scenery and the character attitudes differ from replay to replay. This may be used in a romantic dating game where the object is to travel to interesting places around the world and find and conquer your soul mate.

Object Components plus Character

One idea would be a character generator game, where you can create your own complex characters by collecting and combining character traits and dialogue lines until you have your own complex non player character (or is it perhaps a player character, the distinction would be interestingly unclear?).

Object Roles plus Object Location

I only made a skeleton for the object role concept in Prototype III using the feature abstraction instead of the actual object. But this idea may be more fully released in a fantasy game made up of a set of quests. Here seemingly ordinary objects would be assigned hidden magic powers waiting to be discovered. At the start of each quest, these objects could then be hidden in different castles or caves throughout the land. These are all ideas that may be candidates for potential prototypes if this project should be further developed in the future.

Page 37: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

31

There are, of course, other interactive fiction developers who have interesting ideas for the future. During the somewhat (vastly, the reader may note) extended time period that this project has taken, there has been some news on the text adventure front. A new version of Inform, Inform 7 has been released by Graham Nelson. In this new version the language has been completely redesigned. Contrary to the old object oriented Inform language, where objects and characters are given properties and explicit reactions to verbs, Inform 7 is a natural language tool with some aspects of rule based programming. This means that a game can be designed in a more general, human way of thinking. And the source code is in plain English. Here is an example of a kind definition (=class definition) and a rule definition in Inform 7 taken from the game Bronze [14] by Emily Short: A bed is a kind of supporter. A bed is always enterable. A bed is usually scenery. The description of a bed is usually "Unrumpled: the service keeps them neat and tidy." Understand "sheets" or "sheet" or "pillow" or "pillows" as the bed. Instead of looking under a bed, say "It is clean beneath as above." The scent of a bed is “faint lavender". Visibility rule when examining or reading the inscription: if in darkness begin; if an adjacent room is discernible, there is

sufficient light; there is insufficient light; otherwise; there is sufficient light; end if. Note how elegantly the code reads. Normally there isn’t even the need for control structure vocabulary like “begin” and “otherwise” in code written in Inform 7. This method of rule based thinking means that general game rules can be combined to produce less predictable results than if the reaction to the command is explicitly stated inside an object. And maybe some new highly unpredictable games will appear in the IF community in the future as a result. Shortly looking into the current trends in graphics based games as opposed to text based ones, we can recently see the beginning of a shift of focus. Another form of dynamics has come to play here. With the ever increasing details in computer graphics – as both game worlds and screen resolution grow larger – the need for graphic artist man hours has become almost unmanageable. The solution that has surfaced is the concept of procedural generation, which means that graphic content is created through the use of complex algorithms instead of by hand. In the game Spore (2008) by Maxis [15] for instance, the player invents a creature by designing its skeleton, and then the computer determines the design of its flesh and pattern of movement. Thus, almost like a seed growing into a colourful

Page 38: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

32

flower, a few kilobytes of saved data may generate a textured, animated 3D character which would normally require many megabytes of storage and much manual labour. This remarkable feat even further raises the bar when it comes to what computer games could be conceivable in the future using dynamic design. To conclude, it has been a very interesting project to see the variety of outcomes that can be produced in interactive storytelling by dynamically altering bits and pieces. The search for a captivating interactive story continues and it will be very interesting to see what the highly literate and technologically skilled minds of the interactive fiction community will produce next.

4 Bibliography

4.1 References [1] Longman’s Dictionary of the English Language Merriam-Webster Inc 1984 Oxford [2] Jay David Bolter Writing Space L Erlbaum 2000 [3] Infocom http://en.wikipedia.org/wiki/Infocom [4] Scott Adams SAGA - Scott Adams’ official Site http://www.msadams.com/ [5] Adam Cadre IF Creator Adam Cadre’s Site http://adamcadre.ac/if.html

[6] Emily Short IF Creator Emily Short’s Blog http://emshort.wordpress.com/my-work/

[7]] Graham Nelson The Craft of Adventure http://www.ifarchive.org/if-archive/info/Craft.Of.Adventure.txt [8]] Janet Murray Hamlet on the Holodeck Simon & Schuster Trade Division 1997 [9] MDL Programming Language http://en.wikipedia.org/wiki/MDL_programming_language

Page 39: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

33

[10] Stephen Granade Manual to “Losing Your Grip” (General instructions for playing text adventures) http://mirror.ifarchive.org/if-archive/games/tads/gripfeelies.zip [11] Murray Smith Engaging Characters Oxford University Press 1995 [12] Graham Nelson Inform Designer's Manual http://www.inform-fiction.org/manual/DM4.pdf [13] Michael Roberts TADS manual http://www.tela.bc.ca/tads-manual/ [14] Emily Short Source code to the game Bronze by Emily Short http://www.inform-fiction.org/I7Downloads/Examples/bronze/source_21.html [15] Development of Spore http://en.wikipedia.org/wiki/Development_of_Spore And also support from the knowledgeable “colleagues” at ifmud (ifmud.port4000.com) and rec.arts.int-fiction.

4.2 Other Inspirational Literature Esther Dyson Release 2.1 Broadway Books 1998 Sherry Turkle Life on the Screen Simon & Schuster 1997 G. Kevin Wilson Whizzard's Guide to Text Adventure Authorship http://www.ifarchive.org/if-archive/info/authorship-guide.base

Page 40: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

34

5 Appendices

5.1 Appendix A: Technical Design

5.1.1 Prototype I: DynaCharacter

(Made with the language Inform6 [12]) Instead of the traditional way of creating all functionality for the characters in this game in each character object like “Professor Plum” or “Miss Scarlett” I placed parts of it on a more abstract level; in the class NPC (Non-Player Character). Having the character object act according to rules situated in its class, NPC, allowed me to have them behave differently according to whether the character at the moment was pointed out as the murderer. The weapon class works the same way. The lead piping or the candlestick should respond differently to commands if it is pointed out by the murder-weapon reference. And likewise, an object of class “room” should have a different description if it is the scene of the murder.

5.1.1.1 References and Arrays

Reference: murderer points out the NPC object that is the murderer this time

Reference: murder_weapon points out the Weapon object that is the murder weapon this time

Reference: murder_room points out the Room object that is the scene of the crime this time

Array: map Size 9 Elements 1 Reference pointing out room in

position (1,1) 2 Reference pointing out room in

position (1,2) 3 Reference pointing out room in

position (1,3) 4 Reference pointing out room in

position (2,1)

Page 41: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

35

5 Reference pointing out room in position (2,2)

6 Reference pointing out room in position (2,3)

7 Reference pointing out room in position (3,1)

8 Reference pointing out room in position (3,2)

9 Reference pointing out room in position (3,3)

5.1.1.2 Classes

Class: NPC Properties: Values: Alibi 1 if person was alone, otherwise:

reference to a NPC Decription If murderer points out this object:

“Looks guilty, but looks can deceive” Else: “Looks nice, but looks can deceive”

Animate True Proper True Reactions to commands: Ask <NPC>about Alibi “I was alone” if alibi = 1 otherwise

“I was with <alibi>” Answer, Order, Tell “You must ask the person.” The two properties Animate and Proper are built-in properties from Inform’s library [12]. Animate indicates that objects of this class will have character functionality; for instance, they will be able to answer questions posed using the ASK command. Proper indicates that the object name should not be preceded by a definite article in descriptions; “Miss Scarlett doesn’t answer” instead of “The Miss Scarlett doesn’t answer”. Class: Weapon Properties: Values: Decription If murder_weapon points out this

object and magnifying glass is carried: “Looking through the magnifying glass you notice that there are some blood stains on it! This must be the murder weapon.” Else: “Looks a bit dangerous.”

Reactions to commands: Take <Weapon> “What? And destroy any

fingerprints? No you know better!”

Page 42: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

36

Class: Room Properties: Values: Decription If murder_room points out this

object: “There is some blood on the floor” Else: “A nice looking room.”

To the North: A reference to the room one row up on the map, if there is one

To the East: A reference to the room one column to the right on the map, if there is one

To the South: A reference to the room one row down on the map, if there is one

To the West: A reference to the room one column to the left on the map, if there is one

5.1.1.3 Room Objects

Object: Hall (of Class Room) Properties: Values: Short Description “Hall” Decription “The magnificent hall of Merder

Manor welcomes you. Numerous portraits are looking down upon you from the tall walls, lit up by a grand chandelier.”

Object: Kitchen (of Class Room)

Properties: Values: Short Description “Kitchen”

Object: Lounge (of Class Room)

Properties: Values: Short Description “Lounge”

Object: Dining_Room (of Class Room)

Properties: Values: Short Description “Dining Room”

Object: Study (of Class Room)

Properties: Values: Short Description “Study”

Page 43: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

37

Object: Ballroom (of Class Room)

Properties: Values: Short Description “Ballroom”

Object: Conservatory (of Class Room)

Properties: Values: Short Description “Conservatory”

Object: Billiard_Room (of Class Room)

Properties: Values: Short Description “Billiard Room”

Object: Library (of Class Room)

Properties: Values: Short Description “Library”

5.1.1.4 NPC Objects

Object: Mustard (of Class NPC)

Properties: Values: Short Description “Colonel Mustard” Answers to “colonel”, “mustard”

Object: Plum (of Class NPC) Properties: Values: Short Description “Professor Plum” Answers to “professor”, “plum”

Object: Green (of Class NPC)

Properties: Values: Short Description “Reverend Green” Answers to “reverend”, “green”

Object: Peacock (of Class NPC)

Properties: Values: Short Description “Mrs Peacock” Answers to “mrs”, “peacock” Female True

Page 44: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

38

Object: Scarlett (of Class NPC)

Properties: Values: Short Description “Miss Scarlett” Answers to “miss”, “scarlett” Female True

Object: White (of Class NPC)

Properties: Values: Short Description “Mrs White” Answers to “mrs”, “white” Female True

5.1.1.5 Weapon Objects

Object: Dagger (of Class Weapon)

Properties: Values: Short Description “dagger” Answers to “dagger”, “knife”, “blade” Initial Location Hall

Object: Candlestick (of Class Weapon)

Properties: Values: Short Description “candlestick” Answers to “candlestick”, “candle”, “stick” Initial Location Hall

Object: Revolver (of Class Weapon)

Properties: Values: Short Description “revolver” Answers to “revolver”, “pistol”, “gun” Initial Location Hall

Object: Rope (of Class Weapon)

Properties: Values: Short Description “rope” Answers to “rope”, “string” Initial Location Hall

Object: Lead_Piping (of Class Weapon)

Page 45: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

39

Properties: Values: Short Description “lead piping” Answers to “lead”, “piping”, “tube” Initial Location Hall

Object: Spanner (of Class Weapon)

Properties: Values: Short Description “spanner” Answers to “spanner”, “wrench” Initial Location Hall

5.1.1.6 Other objects

Object: Magnifying_Glass (of Class Object)

Properties: Values: Short Description “magnifying glass” Description “It quite effectively enlarges

anything you look at.” Answers to “magnifying”, “glass” Initial Location Hall

Object: House_Map (of Class Object)

Properties: Values: Short Description

“map of the house”

Description “ <Room(1,1)> <Room(1,2)> <Room(1,3)> <Room(2,1)> <Room(2,2)> <Room(2,3)> <Room(3,1)> <Room(3,2)> <Room(3,3)>

” Answers to “map”, “drawing”, “plan” Initial Location

Carried by player

Object: Chandelier (of Class Fixeditem)

Properties: Values: Short Description “chandelier” Description “It’s just a typical chandelier. Only

it’s ten foot wide.” Answers to “chandelier”, “candle” Initial Location Hall

Page 46: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

40

The chandelier is only added to flesh out the room description somewhat. It inherits the Fixeditem class which means that it is an object fixed in place which can’t be picked up by the player. Object: Glass (of Class Object)

Properties: Values: Short Description “glass” Description “It’s just a normal-looking cognac

glass.” Initial Description (before being moved)

“A cognac glass sits on the workbench.”

Answers to “glass”, “cognac” Initial Location Kitchen Reactions to commands: Drink <glass> “It’s completely empty, no reason to

tip it.” The cognac glass is also only present to add a few extra things for the player to explore.

5.1.2 Prototype II: DynaTool

(Made with the language TADS 2 [13]) Instead of creating all functionality for the useful tools of a game in each tool object I placed it on the class level; in classes stickitem, brushitem componentitem, comboitem and broomitem. Having a tool act according to rules situated in its class, allowed me to have it behave according to which types of components the tool object was made out of.

5.1.2.1 Classes

Class: comboitem (of class qcontainer)

Properties: Values: Decription “It consists of <List of components

of the comboitem>” Reactions to commands: Put <object> in <comboitem> “You can’t put anything into the

<comboitem>” Take <component> from <comboitem>

Remove <component>. “First disassembling the <comboitem>”. Leaving the <other component> in the <room>“.

Page 47: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

41

The class comboitem is a subclass of the TADS library [13] class qcontainer (short for quiet container)which is a class that may contain items, but does not automatically show its contents when the room is described. This allows the components that the comboitem consists of to be placed inside it, without being discovered by the player. Class: componentitem (of class item)

Reactions to commands: Attach <componentitem> to <another componentitem>

Allow this command, the reaction is defined in the subclasses (“brushitem” and “stickitem”)

Attach <another componentitem> to < componentitem>

Allow this command, the reaction is defined in the subclasses (“brushitem” and “stickitem”)

Class: brushtitem (of class componentitem)

Reactions to commands: Attach <another componentitem> to < brushitem>

Let the reaction be defined in the other componentiem class (“stickitem”)

Class: stickitem (of class componentitem)

Reactions to commands: Attach <another componentitem> to < brushitem>

If other object is of brushitem: Create new dynamic broomitem object in room and put both componentitems inside it.

Class: broomitem (of class comboitem)

Properties: Values: Short Description “broom” Decription “A broom, good for sweeping” Plus

the inherited description of components from “comboitem” class.

Answers to “broom”, “brush”, “brushes” Verb Objects Object: sweepVerb (of class deepverb)

Properties: Values: Answers to “sweep” Action If an object of class broomitem is in

Page 48: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

42

scope (on player or in room): The player succeeds in sweeping the floor and wins the game. Else: “With what?”

We need to create the sweepVerb object explicitly since it is not one of the standard verbs present in the TADS library [13]. sweepVerb inherits from the verb class “deepverb” in the TADS library which allows advanced sentence parsing.

5.1.2.2 Room Objects

Object: Tool_shed (of Class Room)

Properties: Values: Short Description “Tool Shed” Decription “In your uncle's old tool shed there

are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north.”

To the North: A reference to the room “Hallway”

Object: Hallway (of Class Room)

Properties: Values: Short Description “Hallway” Decription “This narrow passage has nothing of

interest about it.” To the South: A reference to the room “Tool-

Shed”

5.1.2.3 Other Objects

Object: Bristles (of Class brushitem)

Properties: Values: Short Description “bristles” Decription “Bristles that seem like efficient

brushing equipment” Answers to “bristle”, “bristles”, “brush”,

“brushes”, “brown” Initial Location Tool_shed Is Plural True The bristles are our first example of an object of the class brushitem, which implies that it may be used together with a stickitem to create a broomitem. Is

Page 49: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

43

Plural means that the game will refer to the object as plural, for example: “The bristles are in the tool shed”. Object: Wig (of Class brushitem)

Properties: Values: Short Description “wig” Decription “A blonde ladies’ wig.” Answers to “wig”, “piece”, “hairpiece”, “hair-

piece”, “hair” Initial Location Tool_shed

Object: Broomstick (of Class stickitem)

Properties: Values: Short Description “broom stick” Decription “A brown wooden broom stick the

width of a thumb and the length of a man.”

Answers to “broomstick”, “stick”, “broom” Initial Location Tool_shed

Object: Fishingrod (of Class stickitem)

Properties: Values: Short Description “fishing rod” Decription “A long old fishing rod made of

bamboo wood” Answers to “fishing-rod”, “rod”, “pole”,

“fishing” Initial Location Tool_shed

5.1.3 Prototype III: DynaObject

(Made with the language TADS 2 [13]) In order to allow some items to be arbitrarily placed inside rooms and container objects, I created two new classes. The class “feature” is an attribute to the storyline of the game, in my prototype always represented by items that can be carried. The other class is the “featurecontainer” which holds functionality for randomly being assigned one of the features above. The instances of “featurecontainer” are rooms and objects which may contain items (inside or on top) like a chair or a stove.

Page 50: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

44

5.1.3.1 Classes

Class: feature (of class object)

Properties: Values: None

Class: featurecontainer (of class object)

Properties: Values: None One of the wonderful features of the TADS language is its support for multiple inheritance [13]. This allows our room objects to inherit both the “featurecontainer” and “room” classes, which means we don’t need to put any functionality in the two new classes. They are only ways of earmarking objects as containers and contained items, so they can be found and assigned to each other in the initialization procedure of the game.

5.1.3.2 Important Functions

Function: makeFeatureList() Description makeFeaturelist() requests input

from the user in terms of the letters of the Christian and Last names and creates a corresponding list of integers (numbers) according to the “letterNumber” function. This list should be as long as the number of features. If the name isn’t long enough the function starts over from the first letter of the name when needed.

Returns Nothing

Function: letterNumber(x) Input Parameters The letter character “x” Description letterNumber(x) takes the letter

character “x” and returns a corresponding integer (number) according to the following pattern: Letter “x” Integer “n” A 1 B 2 … … Z 26 Å 27 Ä 28

Page 51: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

45

Ö 29 Other letters 30

Returns Integer “n”

Function: placeFeatures() Description placeFeatures() goes through all

features (using index i) and places them in the featurecontainer with the number j calculated thusly: j=((number from featurelist at position i) modulo 5) + 1. This gives us a number of 1 to 5 corresponding to one of the featurecontainers 1 to 5.

Returns Nothing Here is an example of how placeFeatures() works. If the first letter of the name entered in the beginning is A then feature number 1 (the key) is placed into featurecontainer number 1 (The Entryway). Likewise every fifth letter in the alphabet renders the same result. So these are the letters and their corresponding location: Letter featurecontainer A,F,K,P,U,Z Entryway B,G,L,Q,V,Å Hallway C,H,M,R,W,Ä (on) Chair D,I,N,S,X,Ö Kitchen E,J,O,T,Y,Others (inside) Stove And these are the letter positions (starting at 0) and corresponding features: Letter Position feature 0 key 1 football 2 glass 3 pieceofpaper 4 pairofglasses 5 book 6 pen 7 bottle 8 stuffedfox 9 hammer

5.1.3.3 Objects of Class “featurecontainer”

Object: Entryway (of Classes Room, featurecontainer)

Properties: Values:

Page 52: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

46

Short Description “Entryway” Decription “This entryway has stone walls

dating back to the 900s or last year, who knows. Everything about this house seems a bit out of place. Including the medieval suit of armour and the terribly worn wooden chair. The front door leads out to the south. And you see a hallway to the north.”

To the North: A reference to the room “Hallway” To the South, Out: A reference to the door “frontDoor”

Object: Hallway (of Classes Room, featurecontainer)

Properties: Values: Short Description “Hallway” Decription “This is a long narrow corridor

leading from the south to the north.” To the North: A reference to the room “Kitchen” To the South: A reference to the room “Entryway”

Object: Kitchen (of Classes Room, featurecontainer)

Properties: Values: Short Description “Kitchen” Decription “This kitchen has equipment of the

old school. The stove is a huge black iron monster – with something inside – and there is no refrigerator. To the south, a hallway.”

To the South: A reference to the room “Hallway”

Object: Stove (of Classes fixeditem, openable, qcontainer, featurecontainer)

Properties: Values: Short Description “stove” Decription “It's a huge black iron monster, and

it has a front door which is currently <open/closed>. ” Plus, if open: “Inside the stove you can see <contents>.”

Answers to “stove”, “oven”, “contraption”, “door”, “huge”, “black”, “iron”,

Initial (in fact, permanent) Location Kitchen

Page 53: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

47

Is open (initially) False The stove object actually inherits four different classes. The “fixeditem” class tells us that it can’t be moved, while “openable” naturally means that it can be opened and shut using the “open” and “close” commands. The “featurecontainer” class was explained earlier and qcontainer helps it keep its contents secret until its door is open. Object: Chair (of Classes chairitem, surface, featurecontainer)

Properties: Values: Short Description “wooden chair” Answers to “chair”, “straight-backed”,

“wooden” Initial (in fact, permanent) Location Entryway The chairitem class, which the “chair” object inherits, makes it possible to “sit down on” and “get up from” the chair. And the surface class tells us that items may be placed on top of it.

5.1.3.4 Objects of Class “feature”

Object: Key (of Classes item, feature)

Properties: Values: Short Description “brass key” Long Description “It’s a shiny brass key.” Answers to “brass”, “key” Initial Location None, until after initialization These objects are all of class “item” which simply means that they can be moved by the user. None of them have any location until the initialization functions above are completed. Object: Football (of Classes item, feature)

Properties: Values: Short Description “football” Long Description “It’s a football made of leather.” Answers to “ball”, “football” Initial Location None, until after initialization

Object: Glass (of Classes item, feature)

Properties: Values: Short Description “glass” Long Description “It’s a glass made of glass.”

Page 54: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

48

Answers to “glass” Initial Location None, until after initialization

Object: Pieceofpaper (of Classes item, feature)

Properties: Values: Short Description “piece of paper” Long Description “It’s a piece of paper made of

paper.”. Answers to “piece”, “paper” Initial Location None, until after initialization

Object: Pairofglasses (of Classes item, feature)

Properties: Values: Short Description “pair of glasses” Long Description “It’s a pair of glasses made of

glass.” Answers to “pair”, “glasses” Initial Location None, until after initialization

Object: Book (of Classes item, feature)

Properties: Values: Short Description “book” Long Description “It’s a book made of paper.” Answers to “book” Initial Location None, until after initialization

Object: Pen (of Classes item, feature)

Properties: Values: Short Description “pen” Long Description “It’s a pen made of wood.” Answers to “pen” Initial Location None, until after initialization

Object: Bottle (of Classes item, feature)

Properties: Values: Short Description “bottle” Long Description “It’s a bottle made of glass.” Answers to “bottle” Initial Location None, until after initialization

Object: Stuffedfox (of Classes item, feature)

Page 55: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

49

Properties: Values: Short Description “stuffed fox” Long Description “It’s a stuffed fox made of the stuff

which foxes are made of.” Answers to “stuffed”, “fox” Initial Location None, until after initialization

Object: Hammer (of Classes item, feature)

Properties: Values: Short Description “hammer” Long Description “It’s a hammer made of steel.” Answers to “hammer” Initial Location None, until after initialization

5.1.3.5 Other Objects

Object: SuitOfArmor (of Class fixeditem)

Properties: Values: Short Description “suit of armor” Description “It’s a suit of rusty armor for a

rather short knight.” Answers to “suit”, “armor”, “medieval” Initial (in fact, permanent) Location Entryway Is Quiet Container True

Object: FrontDoor (of Class doorway)

Properties: Values: Short Description “front door” Answers to “front”, “door” Initial (in fact, permanent) Location Entryway Door Destination “You’d rather stay in the house for

now.”

5.1.4 Prototype IV: DynaSetting

(Made with the language TADS 2 [13])

5.1.4.1 References and Arrays

Integer: Setting Determines which setting has been chosen (1. island or 2. asteroid)

Array: SettingDictionary

Page 56: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

50

Size 17*2 Dictionary Entry Key Island Term Asteroid Term island “island” “asteroid” weather “weather” “cosmic weather” wave “wave” “cloud of como-dust” waves “waves” “clouds of como-

dust” theocean “the ocean” “space” palmtree “palm tree” “stalactite” oceanedge “ocean” “edge of the asteroid” swim “swim” “float” coconut “coconut” “water unit” wood “wood” “carbon material” stream “stream” “cosmic stream” ship “ship” “space ship” bird “bird” “airborne creature” sailor “sailor” “astronaut” wind “wind” “cosmic wind” fish “fish” “carbo-floater” seagull “seagull” “carbo-wing”

5.1.4.2 Important Functions

Function: chooseSetting () Description chooseSetting () Prints the question;

“Where would you rather be stranded? On 1. an island or 2. an asteroid?” And requests input from the user in terms of a 1 or a 2.

Returns The chosen setting (1 or 2)

5.1.4.3 Verb Objects

Object: shakeVerb (of class deepverb)

Properties: Values: Answers to “shake” Action If the palm tree is in scope (in

room): The player tries to shake the palm tree (see PalmTree object)

Object: lightVerb (of class

Page 57: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

51

deepverb) Properties: Values: Answers to “light” Action If the lighting device is in scope (on

person or in room): The player tries to turn it on (see LightingDevice object)

We need to create the shakeVerb and lightVerb objects explicitly since they are not included in the standard verbs present in the TADS library [13]. They both inherit from the verb class “deepverb” in the TADS library which allows advanced sentence parsing.

5.1.4.4 Room Objects

Object: Southwestshore (of Class Room)

Properties: Values: Short Description “On the southwest shore of the

<island/asteroid>” Decription “You are on what seems like the

southwest shore of the <island/asteroid>. Around you, a group of <palmtrees/stalactites>, the largest of which, providing you some well needed shade from the relentless sun. Between them and the <ocean/edge of the asteroid>, white, soft, sand stretches out. ”

To the North: A reference to the room “Northwestshore”

To the East: A reference to the room “Southeastshore”

Object: Northwestshore (of Class Room)

Properties: Values: Short Description “On the northwest cape of the

<island/asteroid>” Decription “On this end, the <island/asteroid>

forms a small cape into the <ocean/edge of the asteroid>. Here the sand continues, but the endless <waves/clouds of cosmo-dust> running over it, have made it rock hard. On the tip of the cape, there is a pile of <wood/carbon material>

Page 58: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

52

that has been washed up by the <streams/cosmic streams. >”

To the South: A reference to the room “Southwestshore”

To the East: A reference to the room “Northeastshore”

Object: Northeastshore (of Class Room)

Properties: Values: Short Description “On the northeast side of the

<island/asteroid>” Decription “The northeast side is covered with

heavy vegetation. Everywhere in the thick shrubbery, there are <birds/airborne creatures>, flying around in small groups. Under one of the bushes you see a skeleton! Some other unlucky person has apparently been stranded here before! ”

To the South: A reference to the room “Southeastshore”

To the West: A reference to the room “Northwestshore”

Object: Southeastshore (of Class Room)

Properties: Values: Short Description “On the southeast bay of the

<island/asteroid>” Decription “Here, the shore forms a small bay,

made up of thousands and thousands of rocks. As this is the side from which the <wind/cosmic wind > hits the island, the <waves/clouds of cosmo-dust> repeatedly cover and reveal the lower half of the shore. ”

To the North: A reference to the room “Northeastshore”

To the West: A reference to the room “Southwestshore”

5.1.4.5 Other Objects

Object: Sands (of Class fixeditem)

Page 59: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

53

Properties: Values: Short Description “white sand” Decription “The sand is white as a sheet and

soft as cotton. Nothing strange about it. ”

Answers to “white”, “soft”, “sand” Initial (in fact, permanent) Location Southwestshore Reactions to commands: Take <sand> “You don't need to be carrying

around a handful of sand.” The Sands object inherits the “fixeditem” class which tells us that it can’t be moved. Object: Palmtree (of Class fixeditem)

Properties: Values: Short Description “large <palmtree/stalactite>” Decription “This huge <palmtree/stalactite>

stretches as far up in the sky as your eye can follow it.” If coconut is in tree also print: “Up there somewhere, one single <coconut/water unit> hangs from a branch.”

Answers to “large”, “palm”, “tree”, “stalactite” Initial (in fact, permanent) Location Southwestshore Reactions to commands: Climb <Palmtree> “You try to climb the slippery

surface of the <palmtree/stalactite> and for a while you seem successful. But the next moment you realize that although your feet and hands are moving, you're right back on the ground. This wasn't such a good idea. ”

Shake <Palmtree> “It's rock hard. You can't move it an inch.”

(Contains: Coconut object)

Object: Coconut (of Class fooditem)

Properties: Values: Short Description “<coconut/water unit>” Decription “You know perfectly well what

miracle its contents would do for your horrible thirst.”

Answers to “coconut”, “water”, “unit” Initial Location Palmtree

Page 60: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

54

Reactions to commands: Take <Coconut> If in Palmtree: “It is way too far up

in the <palmtree/stalactite> for you to reach.”

Throw <something> at <Coconut> If <something> is not rock: “I don’t think throwing the <something> at the <coconut/water unit> will help the situation.” Else if Coconut is in Palmtree: “The rock hits the <coconut/water unit> with a CLONK, and they both drop into the soft sand!” Coconut and Rock are moved into Southwestshore.

Eat <Coconut> If not open: “Even if you hadn't had a lack of Vitamin C, your teeth wouldn't be strong enough for the hard shell of the <coconut/water unit>.”

Object: Sandnw (of Class fixeditem)

Properties: Values: Short Description “white sand” Decription “The sand is white as a sheet and

hard as concrete. Nothing strange about it. ”

Answers to “white”, “hard”, “sand” Initial (in fact, permanent) Location Northwestshore Reactions to commands: Take <sand> “You don't need to be carrying

around a handful of sand. Besides it's too hard to dig.”

Object: Pileofwood (of Class fixeditem)

Properties: Values: Short Description “pile of <wood/carbon material>” Decription “This pile of <wood/carbon

material> seems like parts of a ship wreck. It strikes you – possibly from your own <ship/space ship>. ”

Answers to “pile”, “wood”, “carbon”, “material”

Initial (in fact, permanent) Location Northwestshore Reactions to commands: Examine <Pileofwood> if contains Lightingdevice:

“You find a lighting device in the pile!” Move Lightingdevice into

Page 61: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

55

Northwestshore Take <Pileofwood> “It's of no use. It's just a pile of

rotten <wood/carbon material>.” (Contains: Lightingdevice)

Object: Lightingdevice (of Class lightsource)

Properties: Values: Short Description “lighting device” Decription “The lighting device has

miraculously ended up on this <island/asteroid>. You are sure you can make good use of it. ” If it is lit also print: “It is lit. ”

Answers to “lighting”, “device”, “lighter” Initial Location Pileofwood isLit true or false(default) Reactions to commands: Turn on or Light <Lightingdevice> “This place is now brightened up by

the lighter!” Set isLit to true

Turn off <Lightingdevice> “You turn off the lighter.” Set isLit to false

Object: Shrubbery (of Class fixeditem)

Properties: Values: Short Description “shrubbery” Decription “The vegetation is thick and full of

some sort of twigs and leaves but by no means impenetrable.”

Answers to “thick”, “shrubbery”, “bush”, “bushes”, “vegetation”

Initial (in fact, permanent) Location Northeastshore

Object: Birds (of Class fixeditem)

Properties: Values: Short Description “birds/airborne creatures” Decription “They are moving around aimlessly,

minding their own business.” Answers to “airborne”, “bird”, “creature”,

“birds”, “creatures” Initial (in fact, permanent) Location Northeastshore Isplural True (means that the game will refer

to the object as “they”, “them” and use “are” etc)

Page 62: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

56

Object: Skeleton (of Class fixeditem)

Properties: Values: Short Description “skeleton” Decription “This unhappy <sailor/astronaut>

never made it off this island. He must have been very lonely and famished. You may end up the same way if you don't find some way out of here. ”

Answers to “dead”, “skeleton” Initial (in fact, permanent) Location Northeastshore Reactions to commands: Examine <Skeleton> if contains Shirt:

“At least he died with a nice white shirt on.” Move Shirt into Northeastshore

(Contains: Shirt object)

Object: Shirt (of Class clothingItem)

Properties: Values: Short Description “white shirt” Decription “The shirt is in a much better shape

than its previous owner. You could almost swear it smells like it has been recently washed. You decide it must be your imagination.”

Answers to “white”, “shirt” Initial Location Skeleton

Object: Waves (of Class fixeditem)

Properties: Values: Short Description “< waves/clouds of cosmo-dust>” Decription “The < waves/clouds of cosmo-

dust> tirelessly move up and down the shore in cycles of a few seconds.”

Answers to “cosmo”, “clouds”, “waves”, “dust”, “cosmo-dust”

Initial (in fact, permanent) Location Southeastshore Isplural True (means that the game will refer

to the object as “they”, “them” and use “are” etc)

Object: Rocks (of Class fixeditem)

Page 63: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

57

Properties: Values: Short Description “rocks” Decription “They are small and white and too

many to count.” Answers to “rocks” Initial (in fact, permanent) Location Southeastshore Reactions to commands: Take <rocks> “You can’t have them all! What a

silly idea.”

Object: Smallrock (of Class item)

Properties: Values: Short Description “small, white rock” Decription “It is a really smooth, small, white

rock – or rather a pebble – the size of your eye.”

Answers to “small”, “white”, “rock”, “pebble” Initial Location Shore (which is a quiet container) Reactions to commands: Throw <rocks> at <something> If <something> is Palmtree:

“You throw the rock at the <palm tree/stalactite> but it is hard as stone and doesn't move. In fact, the rock bounces straight back into your arms again.”

Object: Shore (of Class fixeditem)

Properties: Values: Is Quiet Container True (Contains: Smallrock object) The Shore object is a quiet container, which means it does not automatically print its contents. This is used to hide the individual rock. It is only presented in terms of the Rocks object when the user enters the room. But when the user takes a rock the Rock object appears in his/her inventory. The Shore object also hides the dead fish. Object: Fish (of Class fooditem)

Properties: Values: Short Description “dead <fish/carbo-floater>” Decription “This <fish/carbo-floater> has seen

better days. But it may serve well as a dinner. ” if not cooked also print: “Smelling at it, you realize that,

Page 64: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

58

despite your hunger, you can't eat it raw though. It has the odour of a hockey team dressing room.”

Answers to “dead”, “fish”, “carbo-floater”, “floater”

Initial Location Shore cooked true or false(default) Reactions to commands: Eat <Coconut> If not cooked:

“You smell it again, and this reassures you that you have to cook it in some way first.”

Object: Seagull (of Class NPC)

Properties: Values: Short Description “<seagull/carbo-wing>” Description “The <seagull/carbo-wing> looks

every bit as hungry as you. She seems just as concentrated as you on the hunt for food. And she has the advantage of being able to fly. ” If seagull contains something also print: “The <seagull/carbo-wing> has <contents> in her mouth.”

Answers to “sea”, “seagull”, “carbo-wing”, “wing”, “gull”

Initial Location Shore Female True Reactions to commands: Take <Seagull> “The <seagull/carbo-wing> is out of

your reach.”

Page 65: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

59

5.2 Appendix B: Interview with IF Expert Emily Short

Emily Short is the author of many groundbreaking pieces of IF, such as Galatea, Savoir Faire and A City of Secrets. From : Emily Short <[email protected]> To : Per Wilhelmsson <[email protected]> Subject : Re: Short E-Mail Interview Date : Sat, 12 Apr 2003 16:42:03 -0700 >Hi! > >Thanks for agreeing to answer a few short questions! > >The background of the project is that I think that IF and adventure >games are more engaging than action games because of their story oriented >nature. >But as a side effect these games may be less replayable - once the >player has experienced the whole story and solved the puzzle he/she >knows exactly what to expect. > >So my questions are: > >1. What do you think is the best way to raise replayability in IF? This is kind of an open essay question, so I think I'll actually get to it last. >2. One way I'm considering is to dynamically change the way the >components of the game are presented each replay. For example, >a piece of information may be instantiated by an NPC topic one time >or by an entry in a diary object another time. >Or different characters could be created from session to session,

Page 66: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

60

>out of selections from a pool of character traits. Is this worth exploring? Possibly, though I think you have to be careful. The knowledge puzzle in particular is hard to recycle: once the player has figured out some piece of information, he's unlikely to want to go through the steps of finding it out again. If I already know who the murderer is, for instance, then I don't really care whether that information is in a diary or comes from an interview with the butler's daughter. Of course, there's always Moonmist, which, as I recall, actually had several different possible solutions to the mystery depending on what you did. So if the actual information is changing (as well as its location), that might make the replay more interesting -- but the game correspondingly difficult to write properly. The second example gets into an interesting side genre of IF that hasn't been very much explored to the best of my knowledge: namely, the text CRPG, where the player character (and perhaps the NPCs) are changeable and have different characteristics. Periodically people suggest doing something like this on the newsgroups (you can search google for threads, if you want). The upside would be, as you say, replayability: there'd be different people for you to meet each time, the player character could have a different range of abilities, and thus puzzles might have a different range of solutions. Which could be interesting. The downside is that the implementation of all this (unless you're very patient or have a lot of people working on it) would have to be correspondingly more sketchy and generic. (I think.) Another really interesting variation on this theme, I gather, is the tack taken by Moments Out of Time. I haven't actually played it because it is somewhat finicky about what interpreters it will run on, but as I understand it, you are allowed to pick different equipment to use during the course of the game, so you wind up able to do different things on different playthroughs. And Heroes effectively does something like this too, with characters with different abilities. (Possibly you've played both of these already, but I'm just throwing out ideas here.) >3. Has your exploration of multilinear IF resulted in insights into >improving replayability? Having puzzles with multiple solutions apparently motivates players who want to see if they can find all the options; they find one and they're able to progress through the game, but they're still curious about what the others might

Page 67: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

61

be. From what I can gather based on what people tell me (and obviously I'm not sitting over their shoulders watching this), people do replay games where there are multiple solutions or multiple ways a conversation can go. They may not necessarily replay 20 or 30 or a hundred times they way they would replay an arcade game or the Sims, but they go back, reopen saved games, spend a few more hours tinkering around until they feel like they've reached all the possible conclusions. Another thing I did with City of Secrets -- and I have yet to see whether this has any real payoff for anyone, but it was an interesting experiment -- was make two different modes of puzzle difficulty. The game becomes slightly more challenging in the second mode (not that it's very hard to start with), and there are some differences, like new locations being open that weren't before. The SpringThing game that just came out, Inevitable, has a puzzle level feature as well. If done well, I think the advantage of something like this is that it allows the player to see the whole story of the game by playing it through at one level, and then, if they like, come back and replay at a higher challenge level to try and get the trickier puzzles. Back to 1, then. Off the top of my head, here are the main techniques I can think of that might make a game interestingly replayable. 1. VARIABLE STARTING CONDITIONS. Either by choice or by randomization, the player is given a different set of abilities (like in the CRPG model, or Heroes) or tools (as in Moments Out of Time), which mean that the puzzles have different solutions under different circumstances. 2. MULTIPLE SOLUTIONS to puzzles, but they're all accessible at the same time -- that is, there's nothing about the starting conditions that makes one solution possible and another impossible. This it seems would be more likely to encourage people to replay *parts* of the game from save files, rather than restarting the whole thing. So the game state doesn't actually change between playings. 3. MULTIPLE QUESTS/GOALS. I don't know how much this one has been tried, either, but another possibility might be to set several different winning conditions. The game world would allow for any of the quests to be accomplished, but which one the player chose to pursue would determine which puzzles were important, and so on. I know Peter Nepstad considered putting a Scavenger Hunt mode into 1893, which would allow the player to wander around the fair collecting evidence.

Page 68: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

62

4. VARIABLE PLOT. Like Moonmist, where the actual plot of the game changes depending on some random or chosen initial factor. This seems like it'd be the most work. I get the feeling that what you're interested in has most to do with 1) -- ways to have the computer semi-randomly set things up so that the game has a different solution each time. Which leaves you with two options: a. Choose from a (relatively) small number of initial states, and code each one the same way you'd code a non-variable game, with full attention to detail and so on; or b. Create a simulationist system that will produce genuinely interesting and complex behavior from having the inputs tweaked randomly within a certain range -- NPCs with variable moods, say. Which is, to say the least, not easy, because you have to make the variations all viable to play, diversely enough described that they feel truly different, and distinct in their solutions. That's all that comes to mind at the moment. I'd be willing to expand if any of that seems unclear, or discuss further, if you like. -- Emily

Page 69: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

63

5.3 Appendix C: Transcripts of User Study session

5.3.1 Transcript of Prototype I: DynaCharacter You arrive at the great Merder Manor, although an old friend of the Duke, you haven't been here for many years now. You were called here most urgently after what had apparently been a murder in the old country house! Your mission is not only to find the murderer, but also to determine the murder weapon and the room in which it happened. DYNACHARACTER A Detective Story By Per Wilhelmsson (2002-2004) Release 1 / Serial number 041117 / Inform v6.21 Library 6/10 SD Kitchen A nice room. A cognac glass sits on the workbench. >i You are carrying: a map of the house >x map Kitchen Study Ballroom Lounge Hall Billiard Room Conservatory Dining Room Library >transcript Start of a transcript of DYNACHARACTER A Detective Story By Per Wilhelmsson (2002-2004) Release 1 / Serial number 041117 / Inform v6.21 Library 6/10 SD Standard interpreter 1.0 (6F) / Library serial number 991113 >x map Kitchen Study Ballroom Lounge Hall Billiard Room Conservatory Dining Room Library

Page 70: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

64

>help If you'd like longer general instructions (by Michael J. Roberts) for playing a text adventure, type INSTRUCTIONS. Help For Prototype 1 (DynaCharacter) You are in a Cluedo-like environment, where a murder has just been committed. But by whom, where and with which weapon? Your mission is to find out. This is all randomly decided each time you play. Also, the geographic relation between the rooms (the Map), and the alibis are randomly created before you begin. As in regular Cluedo these are the Persons: Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White Rooms: Lounge, Dining Room, Study, Ballroom, Conservatory, Kitchen, Hall, Billiard Room, Library Weapons: Dagger, Candlestick, Revolver, Rope, Lead Piping, Spanner To look around in the room you are in, type L or LOOK To examine an object, A, type X A or EXAMINE A To examine the map (which you're carrying) and see how the rooms are related, type X MAP To move to the room to the north, type N or NORTH And S for south, W for west and E for east To take an object, A, type TAKE A [MORE] To drop an object, A, type DROP A To see what you are carrying, type I or INVENTORY To question a person, person, about his/her alibi, type ASK person ABOUT ALIBI

Page 71: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

65

>l Kitchen A nice room. A cognac glass sits on the workbench. >e Study A nice room. >e Ballroom A nice room. >e You can't go that way. >s Billiard Room A nice room. >w Hall The magnificent hall of Merder Manor welcomes you. Numerous portraits are looking down upon you from the tall walls, lit up by a grand chandelier. To the east is the kitchen and upstairs is the upper hall. You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping, a spanner and a magnifying glass here. >ask all about alibi You can't use multiple objects with that verb. >ask mustard about alibi ”I was with Miss Scarlett at the time of the murder.” >ask scarlett about alibi ”I was with Colonel Mustard at the time of the murder.” >ask plum about alibi ”I was with Reverend Green at the time of the murder.” >ask green about alibi ”I was with Professor Plum at the time of the murder.”

Page 72: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

66

>ask peacock about alibi ”I am afraid I was alone at the time of the murder.” >ask white about alibi ”I was with Professor Plum at the time of the murder.” >u You can't go that way. >e Billiard Room >w Hall You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping, a spanner and a magnifying glass here. >x glass It quite effectively enlarges anything you look at. >n Study >w Kitchen A cognac glass sits on the workbench. >get glass Taken. >e Study >s Hall You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping, a spanner and a magnifying glass here. >x glass (the magnifying glass) It quite effectively enlarges anything you look at.

Page 73: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

67

>x portraits That's not something you need to refer to in the course of this game. >x glass (the magnifying glass) It quite effectively enlarges anything you look at. >x chandelier It's just a typical chandelier. Only it's ten foot wide. >x spanner Looks a bit dangerous. >i You are carrying: a glass a map of the house >get magnifying Taken. >x spanner Looks a bit dangerous. >x spanner with a magnifying glass I only understood you as far as wanting to examine the spanner. >e Billiard Room >drop glass Which do you mean, the magnifying glass or the glass? >magnifying Dropped. >w Hall You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping and a spanner here. >x spanner with a magnifying glass I only understood you as far as wanting to examine the spanner. >x spanner Looks a bit dangerous. >w

Page 74: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

68

Lounge A nice room. >s Conservatory There is some blood on the floor! >e Dining Room A nice room. >e Library A nice room. >w Dining Room >n Hall You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping and a spanner here. >x mustard Looks nice. >x dagger Looks a bit dangerous. >x candlestick Looks a bit dangerous. >x revolver Looks a bit dangerous. >x rope Looks a bit dangerous. >x piping Looks a bit dangerous. >x spanner Looks a bit dangerous. >w Lounge

Page 75: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

69

>l Lounge A nice room. >e Hall You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping and a spanner here. >e Billiard Room You can see a magnifying glass here. >get glass (the magnifying glass) Taken. >w Hall You can see Colonel Mustard, Professor Plum, Reverend Green, Mrs Peacock, Miss Scarlett, Mrs White, a dagger, a candlestick, a revolver, a rope, a lead piping and a spanner here. >x dagger Looks a bit dangerous. >x candlestick Looks a bit dangerous. >x revolver Looks a bit dangerous. >x rope Looks a bit dangerous. >x piping Looking through the magnifying glass you notice that there are some blood stains on it! This must be the murder weapon. >x spanner Looks a bit dangerous. >restart Are you sure you want to restart? y

Page 76: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

70

You arrive at the great Merder Manor, although an old friend to the duke, you haven't been here for many years now. You were called here most urgently after what had apparently been a murder in the old country house! Your mission is not only to find the murderer, but also to determine the murder weapon and the room in which it happened. DYNACHARACTER A Detective Story By Per Wilhelmsson (2002-2004) Release 1 / Serial number 041117 / Inform v6.21 Library 6/10 SD Conservatory A nice room. >x map Conservatory Dining Room Lounge Billiard Room Study Hall Ballroom Kitchen Library >

5.3.2 Transcript of Prototype II: DynaTool HTML TADS - A multimedia TADS 2.5.8 Interpreter. Copyright (c) 1993, 2000 by Michael J. Roberts. DynaTool (Combo) is C 2003-2004 by Per Wilhelmsson [email protected] This release is 041118 In this small game world you can create your own tools by combining components you find in the room. It is a prototype demonstrating a more dynamic way of looking at game objects. If you need help playing this game, please type 'help'. DynaTool (Combo) A TADS Adventure Developed with TADS, the Text Adventure Development System. Toolshed In your uncle's old toolshed there are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north.

Page 77: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

71

You see some bristles, a wig, a broom stick, and a fishing rod here. >help If you'd like longer general instructions (by Michael J. Roberts) for playing a text adventure, type INSTRUCTIONS. Help For Prototype 2: DynaTool (Combo) You are supposed to create your own tools out of a combination of two items. To look around in the room you are in, type L or LOOK To examine an object, A, type X A or EXAMINE A To move north to another room, type N or NORTH And S for south, W for west and E for east To take an object, A, type TAKE A To drop an object, A, type DROP A To see what you are carrying, type I or INVENTORY To combine two objects, A and B, type ATTACH A TO B or ATTACH B TO A To separate two objects A and B, from each other, type TAKE A or TAKE B To sweep the floor with a broom, type SWEEP >sweep With what? >x bristles Bristles that seem like efficient brushing equipment.

Page 78: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

72

>x wig A blonde ladies' wig. >x broom stick A brown wooden broom stick the width of a thumb and the length of a man. >x rod A long old fishing rod made of bamboo wood. >attach rod to wig You just built a broom out of the wig and the fishing rod. >x broom A broom, good for sweeping. It consists of a fishing rod and a wig. >take wig First disassembling the broom. (Leaving the fishing rod in the Toolshed.) Taken. >l Toolshed In your uncle's old toolshed there are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north. You see some bristles, a broom stick, and a fishing rod here. >attach stick to wig You just built a broom out of the wig and the broom stick. >clean What do you want to clean? >fly I don't know the word ”fly”. >drop all I don't see what you're referring to. >l Toolshed In your uncle's old toolshed there are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north. You see some bristles, a fishing rod, and a broom here. >i You are empty-handed. >take wig

Page 79: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

73

First disassembling the broom. (Leaving the broom stick in the Toolshed.) Taken. >drop it Dropped. >l Toolshed In your uncle's old toolshed there are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north. You see some bristles, a fishing rod, a broom stick, and a wig here. >attach bristles to stick You just built a broom out of the bristles and the broom stick. >attach wig to stick You just built a broom out of the wig and the broom stick. First disassembling the broom. (Leaving the bristles in the Toolshed.) >l Toolshed In your uncle's old toolshed there are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north. You see a fishing rod, a broom, and some bristles here. >attach rod to wig You just built a broom out of the wig and the fishing rod. First disassembling the broom. (Leaving the broom stick in the Toolshed.) >l Toolshed In your uncle's old toolshed there are no useful tools really but instead a lot of junk. What you'd really need is a broom to clean this place up. There is a hallway to the north. You see some bristles, a broom, and a broom stick here. >x broom A broom, good for sweeping. It consists of a fishing rod and a wig. >sweep Congratulations, you have successfully swept the floor! Now the toolshed looks nice and shiny! ---END OF GAME---

Page 80: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

74

5.3.3 Transcript of Prototype III: DynaObject HTML TADS - A multimedia TADS 2.5.8 Interpreter. Copyright (c) 1993, 2000 by Michael J. Roberts. DynaObject (Dynamic) is C 2003-2004 by Per Wilhelmsson [email protected] This release is 041118 In this small game world, every time you start playing, objects are placed in different locations - in rooms, on surfaces or inside containers of any form. The world is then described accordingly in the game. The input that determines the locations is the name you type at the beginning of the story. Can you figure out the relation between your name and the subsequent object locations? If you need help playing this game, please type 'help'. DynaObject A TADS Adventure Developed with TADS, the Text Adventure Development System. Please enter your full name: (Christian and Last) >Jon Åslund Entryway This entryway has stone walls dating back to the 900s or last year, who knows. Everything about this house seems a bit out of place. Including the medieval suit of armor and the terribly worn wooden chair. The front door leads out to the south. And you see a hallway to the north. You see a bottle here. >help If you'd like longer general instructions (by Michael J. Roberts) for playing a text adventure, type INSTRUCTIONS. Help For Prototype 3: DynaObject You are in game world which is littered with different objects. In the beginning of the game you are asked to enter your first and last name. Based on which letters you type in, all the objects of the game are placed in different rooms or different containers in the rooms. This results in surprising consequences in the game world. For instance, a cat could be described as sitting on a chair or trapped in an oven. To look around in the place you are in, type L or LOOK To examine an object, A, type

Page 81: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

75

X A or EXAMINE A To move north to another place, type N or NORTH And S for south, W for west and E for east To take an object, A, type TAKE A To drop an object, A, type DROP A To open an object, A, type OPEN A To see what you are carrying, type I or INVENTORY >take bottle Taken. >x bottle It's a bottle made of glass. >x armor It's a suit of rusty armor for a rather short knight. >open armor I don't know how to open the suit of armor. >i You have a bottle. >n Hallway This is a long narrow corridor leading from the south to the north. You see a pair of glasses and a pen here. >take glasses and pen pair of glasses: Taken. pen: Taken. >x glasses and pen pair of glasses: It's a pair of glasses made of glass. pen: It's a pen made of wood. >x glass I don't see any glass here.

Page 82: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

76

>n Kitchen This kitchen has equipment of the old school. The stove is a huge black iron monster - with something inside - and there is no refrigerator. To the south, a hallway. You see a glass, a book, a stuffed fox, and a hammer here. >x fox It's a stuffed fox made of the stuff which foxes are made of. >x gammer I don't know the word ”gammer”. >x hammer It's a hammer made of steel. >x refrigerator I don't know the word ”refrigerator”. >l Kitchen This kitchen has equipment of the old school. The stove is a huge black iron monster - with something inside - and there is no refrigerator. To the south, a hallway. You see a glass, a book, a stuffed fox, and a hammer here. >search room I don't know the word ”room”. >search refrigerator I don't know the word ”refrigerator”. >search oven It's closed. >x oven It's a huge black iron monster, and it has a front door which is currently closed. >open oven Opening the stove reveals a brass key, a football, and a piece of paper. >x oven It's a huge black iron monster, and it has a front door which is currently open. Inside the stove you can see a brass key, a football, and a piece of paper. >x all bottle: It's a bottle made of glass. pair of glasses: It's a pair of glasses made of glass. pen: It's a pen made of wood.

Page 83: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

77

stove: It's a huge black iron monster, and it has a front door which is currently open. Inside the stove you can see a brass key, a football, and a piece of paper. glass: It's a glass made of glass. book: It's a book made of paper. stuffed fox: It's a stuffed fox made of the stuff which foxes are made of. hammer: It's a hammer made of steel. >

5.3.4 Transcript of Prototype IV: DynaSetting HTML TADS - A multimedia TADS 2.5.8 Interpreter. Copyright (c) 1993, 2000 by Michael J. Roberts. Where would you rather be stranded? On: 1. an island or 2. an asteroid? >1 An island it is. DynaSetting (Narrow Escape) is C 2003-2004 by Per Wilhelmsson [email protected] This release is 041117 As the world slowly turns from a bright blur into some distinct, however unfamiliar, shapes, you start regaining consciousness. What happened? We were on board Veronica and the weather got worse and worse... and then that giant wave came towards us... oh my god! But where am I now? I am on solid ground, but the ocean is that way... and that way... and that way too! This must be a small island! There must be some way of getting home! But first - my body aches from hunger and thirst. If you need help playing this game, please type 'help'. Narrow Escape A TADS Adventure Developed with TADS, the Text Adventure Development System. On the southwest shore of the island. You are on what seems like the southwest shore of the island. Around you, a group of palm trees, the largest of which, providing you some well needed shade from the relentless sun. Between them and the ocean, white, soft, sand stretches out. >help If you'd like longer general instructions (by Michael J. Roberts) for playing a text adventure, type INSTRUCTIONS.

Page 84: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

78

Help For Prototype 4: DynaSetting (Narrow Escape) You are trapped in a foreign place and you are desperately seeking a way home! But first, you are allowed to choose which place to be trapped in: an island or... an asteroid? Depending on which setting you choose, the vocabulary of the game will be slightly different, giving you a sense of an entirely different game. But the structures of the two games are still exactly the same. To look around in the place you are in, type L or LOOK To examine an object, A, type X A or EXAMINE A To move north to another place, type N or NORTH And S for south, W for west and E for east To take an object, A, type TAKE A To drop an object, A, type DROP A To see what you are carrying, type I or INVENTORY Other useful vocabulary: THROW A at B >x tree This huge palm tree stretches as far up in the sky as your eye can follow it. Up there somewhere, one single coconut hangs from a branch. >climb tree You try to climb the slippery surface of the palm tree and for a while you seem successful. But the next moment you realize that although your feet and hands are moving, you're right back on the ground. This wasn't such a good idea.

Page 85: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

79

>e On the southeast bay of the island. Here, the shore forms a small bay, made up of thousands and thousands of rocks. As this is the side from which the wind hits the island, the waves repeatedly cover and reveal the lower half of the shore. From time to time, you can catch a glimpse of a dead fish on the lower shore. Above, a seagull is circling around, carefully scanning the area. >take fish Taken. >eat fish You smell it again, and this reassures you that you have to cook it in some way first. >throw fish What do you want to throw it at? >throw fish at sea You miss. >i You are empty-handed. >take fish Taken. >w On the southwest shore of the island. >throw fish at coconut I don't think throwing a dead fish at the coconut will help the situation. >n On the northwest cape of the island. On this end, the island forms a small cape into the ocean. Here the sand continues, but the endless waves running over it, have made it rock hard. On the tip of the cape, there is a pile of wood that has been washed up by the streams. >take wood It's of no use. It's just a pile of rotten wood. >x wood This pile of wood seems like parts of a ship wreck. It strikes you - possibly from your own ship. You find a lighting device in the pile! >take device Taken.

Page 86: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

80

>x device The lighting device has miraculously ended up on this island. You are sure you can make good use of it. >e On the northeast side of the island. The northeast side is covered with heavy vegetation. Everywhere in the thick shrubbery, there are birds, flying around in small groups. Under one of the bushes you see a skeleton! Some other unlucky person has apparently been stranded here before! >x skeleton This unhappy sailor never made it off this island. He must have been very lonely and famished. You may end up the same way if you don't find some way out of here. At least he died with a nice white shirt on >make sailor happy I don't know the word ”make”. >take shirt Taken. >take skeleton You can't have the skeleton. >x shrubbery The vegetation is thick and full of some sort of twigs and leaves but by no means impenetrable. >take shrubbery You can't have the shrubbery. >throw device at bird You miss. >get it Taken. >i You have a dead fish, a white shirt, and a lighting device. >light fire I don't know the word ”fire”. >drop shirt Dropped. >x sailor I don't know the word ”sailor”. >s On the southeast bay of the island. >l

Page 87: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

81

On the southeast bay of the island. Here, the shore forms a small bay, made up of thousands and thousands of rocks. As this is the side from which the wind hits the island, the waves repeatedly cover and reveal the lower half of the shore. Above, a seagull is circling around, carefully scanning the area. >take rock Taken. >w On the southwest shore of the island. >throw rock at tree You throw the rock at the palm tree but it is hard as stone and doesn't move. In fact, the rock bounces straight back into your arms again. >throw rock at coconut The rock hits the coconut with a CLONK, and they both drop into the soft sand! >eat coconut Even if you hadn't had a lack of Vitamin C, your teeth wouldn't be strong enough for the hard shell of the coconut. >open coconut I don't know how to open the coconut. >ask povel's dad about coconut I don't know the word ”povel's”. >restart Are you sure you want to start over? (YES or NO) > y Where would you rather be stranded? On: 1. an island or 2. an asteroid? >2 An asteroid it is. DynaSetting (Narrow Escape) is C 2003-2004 by Per Wilhelmsson [email protected] This release is 041117 As the world slowly turns from a bright blur into some distinct, however unfamiliar, shapes, you start regaining consciousness. What happened? We were on board Veronica and the cosmic weather got worse and worse... and then that giant cloud of cosmo-dust came towards us... oh my god! But where am I now? I am on solid ground, but space is that way... and that way... and that way too! This must be a small

Page 88: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

82

asteroid! There must be some way of getting home! But first - my body aches from hunger and thirst. If you need help playing this game, please type 'help'. Narrow Escape A TADS Adventure Developed with TADS, the Text Adventure Development System. On the southwest shore of the asteroid. You are on what seems like the southwest shore of the asteroid. Around you, a group of stalactites, the largest of which, providing you some well needed shade from the relentless sun. Between them and the edge of the asteroid, white, soft, sand stretches out. >x stalactites I don't know the word ”stalactites”. >x stalactite This huge stalactite stretches as far up in the sky as your eye can follow it. Up there somewhere, one single water unit hangs from a branch. >climb stalactite You try to climb the slippery surface of the stalactite and for a while you seem successful. But the next moment you realize that although your feet and hands are moving, you're right back on the ground. This wasn't such a good idea. >e On the southeast bay of the asteroid. Here, the shore forms a small bay, made up of thousands and thousands of rocks. As this is the side from which the cosmic wind hits the island, the clouds of cosmo-dust repeatedly cover and reveal the lower half of the shore. From time to time, you can catch a glimpse of a dead carbo-floater on the lower shore. Above, a carbo-wing is circling around, carefully scanning the area. >take carbo-floater Taken. >throw carbo-floater at carbo-wing You miss. >take floater Taken. >look On the southeast bay of the asteroid. Here, the shore forms a small bay, made up of thousands and thousands of rocks. As this is the side from which the cosmic wind hits the island, the clouds of cosmo-dust repeatedly cover and reveal the lower half of the

Page 89: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

83

shore. Above, a carbo-wing is circling around, carefully scanning the area. >n On the northeast side of the asteroid. The northeast side is covered with heavy vegetation. Everywhere in the thick shrubbery, there are airborne creatures, flying around in small groups. Under one of the bushes you see a skeleton! Some other unlucky person has apparently been stranded here before! >x creatures They are moving around aimlessly, minding their own business. >x skeleton This unhappy astronaut never made it off this island. He must have been very lonely and famished. You may end up the same way if you don't find some way out of here. At least he died with a nice white shirt on >fish There's no verb in that sentence! >x shirt The shirt is in a much better shape than its previous owner. You could almost swear it smells like it has been recently washed. You decide it must be your imagination. >w On the northwest cape of the asteroid. On this end, the asteroid forms a small cape into space. Here the sand continues, but the endless clouds of cosmo-dust running over it, have made it rock hard. On the tip of the cape, there is a pile of carbon material that has been washed up by the cosmic streams. >x carbon material I don't recognize that sentence. >x carbon This pile of carbon material seems like parts of a ship wreck. It strikes you - possibly from your own space ship. You find a lighting device in the pile! >x material This pile of carbon material seems like parts of a ship wreck. It strikes you - possibly from your own space ship. >say oooh I don't know the word ”oooh”. >s On the southwest shore of the asteroid. >e

Page 90: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

84

On the southeast bay of the asteroid. >l On the southeast bay of the asteroid. Here, the shore forms a small bay, made up of thousands and thousands of rocks. As this is the side from which the cosmic wind hits the island, the clouds of cosmo-dust repeatedly cover and reveal the lower half of the shore. Above, a carbo-wing is circling around, carefully scanning the area. >i You have a dead carbo-floater. >take rock Taken. >take rock You already have the small, white rock! >w On the southwest shore of the asteroid. >x stalactite This huge stalactite stretches as far up in the sky as your eye can follow it. Up there somewhere, one single water unit hangs from a branch. >throw rock at water unit The rock hits the water unit with a CLONK, and they both drop into the soft sand! >drink water The water unit doesn't appear appetizing. >eat water Even if you hadn't had a lack of Vitamin C, your teeth wouldn't be strong enough for the hard shell of the water unit. >

Page 91: Dynamic Interactive Storytelling in Computer Games · Dynamic Interactive Storytelling in Computer Games PER WILHELMSSON Master of Science Thesis Stockholm, Sweden 2009. Dynamic Interactive

TRITA-CSC-E 2009:036 ISRN-KTH/CSC/E--09/036--SE

ISSN-1653-5715

www.kth.se