Ah, the holidays! Well I've been up to different things lately, took some time to work on Hunters of the Northwest Passage.
I've had some ideas about generating dialogue/stories in games ever since I finished Venture the Void and am taking some time to experiment with that in the context of my Ludum Dare game. I'm basing this on a system of context-transformations. What the heck does that mean?
What makes stories so interesting is the that we relate to them on a human level. Having a computer do this is daunting.
A good story draws on our emotional responses, understanding of human relationships, knowledge of both the world at large and everyday objects; everything already in place before a single word has been written. This is external context and it is shared between the teller and listener.
Then there are elements within the story: players with their motivations, actions, information. There are "internal external events", things that happen within the story to create interest such as a snowstorm. A good storyteller weaves events together believably to draw us into her world.
For a computer program to do this seems an impossible task. It needs to somehow be able to synthesize external context, together with the internal context of the story itself, and produce a result.
First, let's chop down the context as far as possible. Create a comparatively tiny external world that our computer program needs to know about. In the case of Hunters, that world is the sea; but even narrower than that, since we're only going to tell it from the point of view of the captain.
Imagine Star Trek if it were ONLY the little "captains log" narratives. Much simpler, but now maybe we have a problem that can be attacked.
"Internal external events" are actually the simplest things to handle in a computer program. Computers are good at simulating physical things, perhaps not realistically but convincingly.
So for instance we can put together a simple weather simulation with variables like the storminess of the seas. We can then simulate events such as the boat being swamped, men overboard, or freezing to death, based on this. We won't manipulate these like a master storyteller, instead we put the player adrift among them; the real power of a game world.
So what's left is the external and internal context of the story.
We're going to get to external context through heuristics. These will amount to tons of tons of little rules determining things that can happen. I imagine hundreds of these, if not thousands.
So for instance, "if there are no apples, and crew member X really likes apples, he complains". Or, "if crew members X and Y are enemies, they get into a fight". And on and on.
As these events happen, we record them into the story context.
Internal context is the final layer, and it's the most artful. As we describe different events, we need to reference the story context. For instance, if we are describing that crew members X and Y got into a fight today, we need to reference back to what they have done in the past. The captain (our narrator) might then write:
"Jones and McVale have been bickering for weeks, it seems like. Today, maybe due in part to yesterday's apple-stealing incident (Jones loves his apples, damn him) it finally came to a head. Jones threw the first punch, and caught McVale in the gut. But the hardy Scot was not one to go down so easily, and countered with a solid kick to the groin. Jones may not have children, though it's doubtful any woman would take him anyhow. And well, that would have ended it, except Jones' brother Marcus then decided to have a go. He managed to wind the Scot and was about to kick his face in when I pulled pistol and told him to stand down. I won't have any more chaos on this ship than is strictly necessary. For now, Jones and Marcus are in shackles until they can cool it. But I need all hands I can muster, and can't be carting around dead weight in the North Atlantic."
We need to somehow get from an event like "Jones fights McVale" to the above.
A lofty goal.
Today I'm back at work on Texas, though, which is really coming along quite well. I have a few more things to finish and then will do another playtest alpha version.
Happy Boxing Week everybody!