Story in Game Design (1/2)

lore_cropped900
Story is a huge topic, and there is no way to cover it all in a single blog post. I have split this post in two, but could have just as easily filled the pages of a book. Incidentally, there are already many excellent books about storytelling out there. In part 1, I talk about story in the context of video games.

The following thoughts and opinions about stories popped up during my work on Torgar’s Quest. I hope there might be something here, you can use as well…

On a basic level, stories are the context that tie events and characters together to give them meaning. Through them, we pass on wisdom, tell jokes and share experiences. A story can be simple or complex, and have a lasting impact on its audience regardless.

Storytelling in games

For any story to work, it has to make sense in the context of its universe. In this case, universe refers to the lore and background story as well as the laws enforced by the physics engine of your game; or rather the sum of all those parts. Create any universe you want, but once it is there, you have to commit to its laws. Depth and detail must then be balanced with the circumstances under which the story is told, and in games, this means fitting the story to match the pace and feel of the game you want to end up with.

Simple games typically require less complexity. For example, you won’t find much story in Candy Crush compared to World of Warcraft. Story helps players learn advanced features and in-game strategies, but can also get in the way of the action under less complex circumstances. Note that both games have strong fan bases and hold many hours of game play, and story is not the only deciding factor for a game’s success.

Carefully crafted story greatly enhances the emotional response from the player. Twists and surprises, humor or clever dialog, combined with timing makes your game more memorable, more fun and more likely to be played a second time. When you test your game, try to gauge whether you get the response you were hoping for and if not, tweak the story or the way it is delivered.

Often, action is centered around characters the player can root for. We want our Sims to fulfill their dreams. We want the rightfully angry birds to take down the greedy pigs. We want Lara Croft to make it through whatever temple she’s exploring today. We want to win! Sometimes a good setting can evoke an emotional response from the player as well, much like a character.

You can tell the story in a number of ways, from cut scenes to audio clips or text dialog boxes and in-game choices, leading to different outcomes. Or any combination of these. You can even make it part of your level design. The trick is to choose the method of delivery that works best for your game. Is it okay to break up the action, or should it play out in the background? Does it simply set the stage or force players to make decisions?

It is worth noting that game-based stories often unfold through programmed behavior, rather than a pre-written narrative. For example, Creepers provide fodder for many a Minecraft story, and though each player has experienced Creeper encounters their own way, the damage they do is something all players can relate to. Still, Creepers never speak a word. It is purely their behavior and design that fuels the story here. This is something to be mindful of when designing AI and other behaviors.

header900x360-logo_right

Story in marketing

From a marketing perspective, story is meat on the bones of the basic features and game mechanics. When describing the game to others, story gives people a way to quickly put all those features into a bigger picture, and if you tell it right, make them curious for more.

Avoid obstacles on-screen while traversing from A to B is less fun-sounding than help the frog avoid traffic, and safely cross the road.

A great character can really help boost your game’s fan base. Continuing the Minecraft example, in spite of its lack of dialogue, Creepers are prominently featured on toys and clothes everywhere Minecraft gear is sold. I am personally the proud owner of a Creeper T-shirt, a desk vinyl toy, Legos and more.

You don’t have to be hugely successful to promote your game using characters, you just need to know which characters will appeal to players in-game (again, this is something you can test), and then use those characters as hooks to spark even more interest.

Start testing, already!

With any creative project, you’ll need someone to take a fresh look at it and provide some qualified feedback at some point. This applies to game design, architecture, movie making and any complex creative undertaking. Even small-scale testing will help bring issues to the surface, which when addressed will increase the quality of the final product.

Unfortunately, it’s incredibly easy to put off testing. After all it requires recruitment and wrangling of testers, maybe even some material, test cases and documentation for them to follow. Then comes recording the feedback in a way that allows you to track what comes of it, your progress. If you are new to the process, it may be a tough lesson to learn that your baby isn’t perfect. You will need to get over that and start seeing the value in constructive criticism. Still, testing is a daunting task and often procrastinated or postponed.

With Torgar’s Quest, I waited until late in the alpha phase before starting to actively recruit testers. My early approach was to contact a few select friends directly, asking them to take a look. I got some decent feedback this way, but not a lot of it. I also made a few public calls for testers, but got nothing worthwhile from there. I don’t have a huge fan base to pull from, but if you do, that’s probably a good place to start.

My friend Kristian helped test the game and submitted this screenshot taken one turn before winning the game.
My friend Kristian helped test Torgar’s Quest and submitted this screenshot, taken one turn before winning the game.
What you do not want is a team of yes-men, whose approach to testing is pointing out all the things that are cool about your game. It’s great to get compliments, but testing is about finding flaws and making suggestions, not boosting your ego.

It was when I added a global leaderboard and posted a “friends only” link to a build on Facebook (of all places), that something magical happened. A few friends, who all know something about both gaming and software development, started competing with each other for the highest score on the leaderboard – feeding me their observations and bug reports as they went. Suddenly, I had a long list of things I needed to fix, tweak or add. Awesome!

Takeaway: it’s easier to get a lot of testing done, if you can tie it to any kind of event. Even if that event is a pseudo-exclusive friendly competition for early leaderboard spots.

What they found

Here is what the leaderboard looked like, right after Kristian won the game.
Here is what the leaderboard looked like, right after Kristian (Fenton) won the game.
When savvy people start poking at your game, they will find things. By savvy, I mean people who know what to look for. You may need to provide a little guidance up front, if testing is new to them.

They will find improvements that are right there in front of you. Simple changes that will elevate the overall experience, but you just never thought of them. For Torgar’s Quest, they suggested a limit to the amount of food Torgar can carry. This introduced a new layer of resource management to the game, and upped the fun.

They also pointed out that if Torgar is already holding a potion, new ones should remain where found. This way, they become a resource you can return to later, if you run into trouble (you can only carry one potion at a time).

They will force you to clean up your code. They found a memory leak of the worst kind. If the game ran on long enough, the whole thing would crash and you’d lose all progress. Which sucks. With a bit of investigation and help to reproduce it, the testers helped narrow down where it came from, and it could be fixed with a single line of code.

They will show you that not everything is as obvious and intuitive as you thought. For example, they may suggest you fix a bug that was meant as a feature.

This feedback can offer great insight for adding tutorials or for changing things that don’t work. In testing, it was not obvious to everyone that eating food gave Torgar health back. Not knowing this obviously makes the game much harder to play.

It’s important that the testers know how to report their findings. Mine were great at sharing screenshots and steps to reproduce what they found, though the actual feedback was mainly reported as comments in a Facebook post. I then copied the feedback I wanted to incorporate from the comments to Trello, my project management tool of choice for Torgar’s Quest. Obviously this approach only works for smaller projects. For a bigger test pass, I would have testers log bugs and suggestions directly to a database.

If you are working on a game (or other applicable project), do yourself a favor and start testing now. Do it in sprints of a week or two, gather intel, and you’ll have a ton of improvements to your already beautiful baby. Time to squash some bugs.

You can download Torgar’s Quest alpha via IndieDB (free,PC/Windows).

Designing Procedural Dungeons for Torgar’s Quest

Torgar's Quest
There are many ways to approach procedural level design. For Torgar’s Quest, I wanted randomly generated mine-like dungeons, so I went with the carving approach: starting with a map filled with “walls” from which you cut out the level.

The key to this approach is designing the carver object, the thing that cuts out rooms and corridors. You need to make sure, you don’t get too close to the map edge, or you will have a hole in your level. You’ll also want to decide when to turn in a new direction, and to do so at a good rate, thus avoiding long, unbroken corridors on one end of the spectrum and huge caverns on the other end. I spent a lot of time changing parameters to find an algorithm that generated the kind of map I wanted.

Torgar's Quest

I realized, I would need more than one carver object in order to spawn off side corridors. At first I spawned these at different pre-determined coordinates and let them do their thing. However, this approach proved imperfect, because half the time one or more carvers would fail to connect with the others, so there was no path there, which in turn caused problems when spawning in things like the player and the level exit.

To fix this, I ended up creating a master carver, which would then spawn other sub-carvers from within its own path. These new carvers thereby start from somewhere along the main path and create forks in the map. The trickiest part then, was balancing when and where to spawn in the sub-carvers, in order to get a dungeon that felt right. Again, this came down to trial and error.

Torgar's Quest

How I did it was based on time. The master carver runs for X seconds, and after a quarter of the time has elapsed, it spawns the first sub-carver, then again at half time, and finally again at three quarters. At full time, the master carver destroys all carvers and moves on to spawning in monsters, etc.

One challenge with this approach is time. The carvers need to crawl around and generate the map, but I did not want long load times for the player. A few seconds was fine, because it gave me a chance to display a new bit of the game story, but it had to be balanced. Initially it took too long for the maps to generate, so to fix this, I sped up the frame rate of the game while the map generated, thereby speeding up time in a way.

Once the carvers are done, the loading screen goes away and the action begins.

For more about Torgar’s Quest, check out the website (where you can play the browser version, too).