Tuesday, January 24, 2012

"Dynamic" story?

"If we knew what we were doing, it wouldn't be called 'research', would it?"
-commonly attributed to Einstein
"[A story] is nothing more than a sequence of events that someone relates to someone else."
-Jesse Schell, The Art of Game Design

It's pretty easy to define what a "dynamic story" is not. It's not a static, pre-determined, pre-written, pre-recorded, unchangeable story.

It becomes harder to define and agree on what a "dynamic story" is, should be, or can be. I think that's why there also tends to be a lack of agreement on whether such a thing is possible and/or desirable. Does generating "dynamic stories" imply giving up authorship and leaving the story to chance, the computer, and (maybe, sometimes) the player? Can "dynamic story" mean defining a game world and rules, letting the player loose, and assuming the player will create his own stories out of the events that transpire as a result of the rules? If a computer generates a story, is it already dynamic by virtue of not being pre-written before the game shipped?


For me, in the scope of this project, "dynamic story" means the following (in dimishing order of importance):
  • The story is told by the game to the player
I have encountered, several times, the point of view that all games are "storytelling machines" in that they enable players to later tell stories about events that transpired during the game ("we were almost losing but then I stole the ball and made the goal right before the game ended!"). However, I see a huge difference between storytelling (the game tells a story to the player) and story enabling (the player tells stories about the game). I'm interested in the first one. As the player, I want to be told a story.
  • The player has agency in relation to the story and its progression
Specifically, the player has agency over how his character acts within the context of the story, and the character's actions are acknowledged by the story and world in a sensible manner, much like a Game Master in a pen and paper RPG must constantly adjust to the players' actions. Ideally, the player has a constrained but flexible vocabulary of actions that enable him to react to the events of the story the way he sees fit. The story, in turn, can react reasonably and believably to the player's reaction.
  • The story is engaging and interesting
'Cause boring stories are boring.
  • The story mimics the typical RPG story style and storytelling conventions.
The familiar story structure would give the player comfortable, easy to understand stories. This could be especially important in such an abstract, strange setting as a story-based microgames game. On the other hand, it also provides a large, easy to understand and abstract basis for a story system. Thus, to answer the question of "how will a computer tell a story, and how will it decide what story to tell?" we can first answer, "how do computer games usually tell stories, and what stories do they tell?"


These constraints are guided by introspection: what is it that I find so appealing about a dynamic story system? What do I really want to achieve or fix with such a system?

Primarily, it is the frustration of running into what I would call the "invisible walls" of on-rails storytelling: "But I don't wanna walk into the trap!" "This escape plan is stupid, I have a better one" "I want to disagree with that guy but all the dialog options agree with him!" "Can't we just kill him or take the doohickey by force?" "I'm pretty sure I could have talked my way out of this" "What am I supposed to do to make the auxilary character finish his 'research' and progress the story?" "Oh, so this guy dies whether or not I choose to kill him?" and so on. 

It would be impossible to anticipate and address all the ways a player's idea of what his character should do next will disagree with the prescribed story, let alone create viable alternatives to the story for all of them! The usual solution is to not let the player make those choices. But is there a way to instead react to those choices as they happen?

My secondary motivation is a fascination with game worlds as models. I personally feel the most engaged and connected to a game world when that world is an understandable, internally consistent model. On the other hand, I often find myself get bored of games quickly if they don't engage me with their story, even if they have good gameplay. Why not try to create a model of an engaging story?

Architecture: Overworld and Minigames

Here is an outline of the architecture we are planning to use for the overworld, mini-games, and how they are connected. This architecture is the "non-experimental" (or at least less experimental) part of the project - the basis of the game that we want to make. The more experimental part, which will be the focus of my research, is how to use this architecture to enable the game to tell dynamic, non-predetermined stories.
  • The overwolrd consists of locations which are connected by paths.
  • Each location can have a number of state variables and a number of mini-games associated with it
  • Mini-games can take input from the world, including information about the current location and/or character state, and configuration variables such as the type of "skin" the game should use (if applicable), or an item that the player should have a chance of acquiring as part of the game.
  • Each mini-game provides one main discrete output (with a small number of possible values, e.g. yes/no or left/right/center) and may also provide a number of secondary outputs, also discrete, such as whether the player got the item passed in as input.
  • When a mini-game completes, the current location makes changes to the world based on that game's output.
  • All changes to the overwolrd happen through mini-games (or pseudo mini-games - "Interactions" that follow the same input/output structure as mini-games). This includes changes to the character; traveling between locations connected by a path is a core type of mini-game.
  • Some changes in world/story state can be communicated to the player through short cutscenes, which would essentially be non-interactive mini-games.
The story, setting, characters, etc. of a particular mission would then be defined by: placing and connecting locations; defining the mini-games available at each location; for each mini-game, defining: the conditions for its availability, its inputs, and the effects each possible output would have on the world/location/player character.

This architecture provides for a very simplified structure that is still flexible enough to allow for almost any mission, quest, story, or general setting to be encoded. The simplified nature of the architecture, especially the discrete outputs of the mini-games, should also make analysis of potential missions easier. In fact, the idea is to make it possible to traverse the tree of all possible chains of events as part of some form of automatic analysis.

Friday, January 20, 2012

What is Micro Missions (again)?



Since I first posted the definition and scope of our game, the design has gone through some changes. The major changes were de-emphasizing the social and multiplayer aspect (to the point that these are no longer in the scope of the capstone project) and focusing instead on the single-player experience and the dynamic missions/stories. Rather than edit the original definition, I though I would post the new version separately. That way, this blog will better represent the changes the game goes through as it's being developed.
A single-player casual game that combines frantic, silly mini-games into story-based missions. The stories are dynamic in nature, and are generated and modified in response to both player actions and the current world state.



In most mini-game collections, the individual games are either pass/fail or score-based. The mini-games in Micro Missions instead have a qualitative effect on the overarching world and story. For example, some mini games may allow you to travel in the world, while others are fighting mini-games to resolve conflicts with enemies, and others represent side-quests of a sort. At the same time, these games also take input from the overworld - where you are at the moment, whether you have encountered an enemy, what actions are available in the current location and story context, etc.

These mini-games are tied together into missions, and each mission outlines a story through the sequence of mini-games and short informational cut-scenes. Particular missions are based on encoded templates that define what the goal is, what the different roles are, and what must happen along the way. For example, the Hero’s Journey can be encoded into a very flexible and scalable template for missions (but not all missions have to be based on the Hero’s Journey).
Missions are presented to the player as a sequence of quests. Quests are in turn a sequence(or several possible sequences) of actions - mini-games in various locations that the player needs to play and achieve a certain result in. When the player completes a quest, the next quest is selected based on player actions, inferred or indicated player preference, and most importantly story progression.

Selecting mission templates, populating the missions with particular quests and mini-games, and reacting dynamically to player actions will be the main source of “intelligence” in the system, and the major research topic in this project.
Missions within the same mini-game world are further tied together through recurring characters and other persistent effects, for example passages that have been closed off or opened up in previous missions.

We are using Flash and ActionScript 3 to build this game for several reasons. Flash/AS3 is a great rapid development tool, allowing us to worry less about lower-level issues and concentrate on design and architecture of the game itself. ActionScript 3 is an object-oriented language with functional elements, which should work very well for the architecture(s) we have in mind. Finally, Flash makes the game really easy to distribute, and leaves the potential for social network integration if we want to return to it in the future.


A note on the definition of the term "mini-game" as it applies to this game: I imagine our mini-games to be somewhere between Warrioware-style microgames and traditional "mini-games" in terms of scale and length of play, perhaps closer to Warrioware. For the pace of the game that I have in mind, I'm imagining games that range in play length from several seconds to a minute or two at most.


The definitions of the mini-game/overworld architecture and dynamic story system are intentionally left vague in this overview; they will be the subject of future posts. The overworld architecture is fairly well-defined at this point. The story/quest architecture is what I am working on now.

Friday, December 16, 2011

A Prototype

This is a prototype I made before the break. It's mainly meant to show the idea of overworld/minigame/output connection. Being a prototype, it's a bit buggy and hard to understand.
Here's the idea: you are a janitor in a treasure room; some guy steals the main treasure and you must go find him. You wander around the map, talking to people(T icon) and conducting investigations(magnifying glass icon). You have to figure out where the next clue is by asking people. When you play the investigation mini-game at the correct location, you will find the clue and must now find the next clue.
After some number of clues (in this instance, just one so that the demo isn't too long) the next "clue" you find is actually the criminal. You can choose to deal with him in a number of ways. At this stage, the game is theoretically over, though you can still wander around the map and play the mini-games.
Oh, and you also only have a few seconds to pick the next mini-game in the overworld, otherwise one is chosen for you.


After I made this, I realized I pretty much made a Carmen Sandiego game, but that's OK, since the mission structure wasn't really the point of the demo.

Tuesday, December 13, 2011

Abandoning HTML5

Originally we had seriously considered making Micro Missions in HTML5with the mini games potentially possible in HTML5, Flash, or Unity. In order to test the feasibility of this I decided to try building an HTML5 based mini game collection during the Microsoft Imagine Cup event. The game turned out well and our team ended up winning third place in the competition, however it was ultimately decided that HTML5 would not be a very good platform on which to base Micro Missions.There were quite a few reasons for this decision and it was not made lightly.

First, there is the issue of differences between browsers and platforms. Unfortunately HTML5 has not reached a level where it is consistent in different browsers. In our small project alone we saw commands that behaved differently between different browsers (especially with input) and Internet Explorer ended up not working at all. Even when we got commands working consistently between the browsers we ran into issues with timing and speed. Since each browser could render and execute javascript at different speeds we had several inconsistencies where something would work fine on one browser, but far too slowly on another.

Not only were speeds inconsistent between browsers, but they were also overall quite slow. Compared to Flash we were able to have far less images on screen before slowdown became a major issue. Even with small amounts of graphics on the screen and a small resolution we were only able to consistently keep about 30fps across browsers (although with more research into efficiency I'm sure we could improve on this somewhat).

The final issue we have with using HTML5 is that even if we did use HTML5 most of the mini games we would get from other sources would be written in Flash. This is because we hope to get mini games made by students taking various classes and the vast majority of these we can assume will be written in flash. It would take additional time to create a system for communicating between Flash and HTML5 and we would also have to deal with issues relating to loading the swfs in time and having common assets between the different mini games.

Thursday, December 1, 2011

What's Micro Missions?


A LMOG (Lightly Multiplayer Online Game) that aims to bridge the gap between Social games and Party games by combining mini-games into story-based missions, and allowing people to play those missions together both synchronously and asynchronously.



In most mini-game collections, the individual games are either pass/fail or score-based. The mini-games in Micro Missions instead have a qualitative effect on the overarching world and story. For example, some mini games may allow you to travel in the world, while others are fighting mini-games to resolve conflicts with enemies, and others represent side-quests of a sort. At the same time, these games also take input from the overworld - where you are at the moment, whether you have encountered an enemy, what actions are available in the current location and story context, etc.

These mini-games are tied together into missions, and each mission outlines a story through the sequence of mini-games and short informational cut-scenes. Particular missions are based on encoded templates that define what the goal is, what the different roles are, and what must happen along the way. For example, the Hero’s Journey can be encoded into a very flexible and scalable template for missions (but not all missions have to be based on the Hero’s Journey).

The social aspect of the game is tied into how the individual missions intertwine and work together in the overarching world. Since these missions all take place in one big but unified world, players will often encounter the effects of other players’ actions, whether it is recurring characters, passages that have been closed off or opened up by other player, or other, more subtle changes to the world. Friends can also play together synchronously: they can go through the same mission, co-op style, or encounter each other asymmetrically: imagine if one player is the villain, throwing stones in a throwing mini-game, while the other player is trying to dodge these stones in a dodging mini-game.

The mini-game collection aspect of the game also lends itself naturally to social play: acquiring, collecting, trading and showing off individual mini-games are all extremely social activities.

Selecting mission templates, populating the missions with particular mini-games, and reacting dynamically to player actions will be the main source of “intelligence” in the system, and the major research topic in this project.

We want to build this game using HTML5 and related technologies, with hooks for both facebook and Google+. HTML5 would also allow us to extend the game to mobile platforms in the future. We also want to use Flash as a prototyping tool (for developing the mission architecture) and as a fallback in case the relatively new HTML5 technologies prove to be unsuitable for this game.