The Long Con

One way I want to make Kung Fu Legends a bit different is by making it all about the long-term strategy. In stories everywhere, the protagonist has a goal that they strive singularly towards. All the story between the introduction and climax is towards this goal. In fantasy stories, this is typically the arc of character development, where the protagonist and their allies build up their strength and alliance to defeat the antagonist. In fantasy RPGs, this is typically simplified to a bunch of possibly related encounters that allow you to build up your statistics so that the accounting on the final fight looks epic. There’ll be key milestones of acquiring some artifact of power and maybe roughing up the bad guy’s henchmen for intel, but everything else roughly equates to dicking about to increase stats.

This doesn’t stop these intermediary encounters from being massively entertaining (especially in the hands of a good game designer or writer) but nevertheless there’s fairly strict guidelines on how to approach the game. If you don’t mess about with side quests, you won’t be strong enough for the mandatory main quest set pieces and you might miss out on something neat. Open-world games like Oblivion or Fallout blow the “mess around” options wide out, so you don’t have to touch the main quest if you don’t want to. To accommodate this they allow enemy scaling so you don’t break off the main quest to power-level for a while, then come back and slaughter all the carefully-designed main quests. Exploration is extremely fun in these games, but like an extremely patient significant other, the main quest will always wait for you to come back and pay it attention.

My conception of Kung Fu Legends has a set introduction and then a gameplay system beyond that. The game starts in a dojo where a solitary Master overlooks a small class of young Students left in his care by their parents. One day a rival clan busts in and destroys the dojo, killing the Master in the process. Most of the Students flee the carnage. You begin the game proper by choosing the Master’s characteristics, and a Student from a randomly created assortment (or perhaps your own). Then you adventure from there as ghost Master and Student. I haven’t decided whether to have players take the role of Master guiding the Student, or the Student receiving guidance from the Master. In either case, the personalities of both will suggest long-term plans:

  • Seek bloody or just revenge on the rival clan.
  • Search for the remaining Students and/or rebuild the dojo.
  • Leave the martial arts world behind and try to find your parents.
  • Learn the myriad skills of the lost dojo and become a Kung Fu Legend.

None of these are achievable at the start, and as the Student builds up his abilities, some of these goals slip and move. Maybe someone destroys your rivals before you get a chance. If the player achieves any of these, it’d be nice if the world kept going. Perhaps if they kill the rival dojo Master, they find out that it was actually a small piece of a larger clan conflict. Or perhaps the Emperor ordered the attack. Or perhaps it was yet another clan secretly trying to mire yours and the other clan in fighting as it gained favour elsewhere. Perhaps your defeat of the rivals cues a reverse revenge story. Or your Master tries to convince you to not seek revenge, but when you stain your hands, he tries to help you find redemption. Perhaps it was actually all the Master’s fault and his machinations have turned you into a monster seeking an empty revenge.

I want these sorts of stories to inhabit Kung Fu Legends. I want this flexible, extensible storytelling to be the basis of gameplay, not a bunch of random encounters between predefined milestones.

On the technical side, this is tough. If you suspend disbelief long enough to assume I can come up with a system to produce text for all these plots, I need a system to encompass the plots and a vague understanding of how they interact. In the background, all the major characters in the world will be autonomous AIs. For the most part, these AI are protagonists in their own right, bumbling around the world, doing stuff. There is a separate AI mechanism called the Storyteller, whose job it is to gently steer the protagonists towards your character’s story arc when required. In some way, the plots will be dynamic in the way that the protagonists interact. If they form friendships and rivalries, and impact change on the world, your character will witness a world that changes around them. Part of the con of this is giving the AIs enough latitude to do things, but not fix too much detail so the Storyteller can conveniently shuffle world elements around to satisfy the player. Need a short-term bad guy but the nearest is 100 miles away? Let him walk into town right away because if the player doesn’t know any better, the player can’t protest. And they’ll hopefully be thankful that interesting things keep happening to them.

Some of this can be achieved through large granularity planning algorithms. Some computer-generated text approaches have used planning algorithms for plot generation[1. See one of Mark Riedl‘s approaches with his PhD on Fabula ]. I think I might have a slightly easier time given that I don’t want a particular story coming out, but any story to come out. Hopefully the Storyteller has enough sway and the AI have enough breadth of scope that interesting things can fall out. And yes, this is very much a “try and see” approach.

So we’ve got the Storyteller pushing agendas on the player. It has to recognize certain long-term goals and plan towards them, hoping the player will meet the partway. How do we identify long-term goals and goals in general?  The simplest approach is for me to code a finite number of reasonable, interesting goals. To an extent I have to do this because a computer honestly doesn’t know any better. This could be a simple fixed flags system (“if rival.dead then…”) which is easy to code for, but pretty limited. I think you might be able to get a lot of flexibility and capability if a plot recognizes the plot elements and figures out their importance by evaluating the question “what happens if this event happens”? This allows a character-centric approach where this evaluation can change with the character. Say, for example, killing the rival would have a high utility to a brash, angry youngster. But as maturity and perhaps an understanding of the Tao set in, bloody murder seems to be a bad idea (schooling or just plain ignoring them might have a higher utility). It be nice to use this in an active way (directing the action) and in a passive way (the Master giving suggestions on what to do, perhaps with a hidden agenda).

This requires the AI protagonists to be reactive, (somewhat rational,) autonomous agents. Which is not an unknown technique in artificial intelligence studies. We just need to limit their scope enough so they do something useful, but broaden their scope so that they do something interesting. They don’t have to think, they just have to look good faking it. They need to appear to have goals and desires in hindsight, but they don’t need to be particularly effective in reaching them. Remember everything is just a show put on for the player. If you give them at least one quantum of entertainment, something’s working.

These are all just swarms of ideas I have around the Kung Fu Legends project. Don’t take any of them too seriously. I think they are great things to think about and try, but I’m okay with getting to some point and going: “Okay, this doesn’t work”. It may not work, but imagine if it did! 🙂