Code: The Diamond Square Algorithm

I’ve been interested in procedural generation in games for a while, so when Notch’s entry for Ludum Dare 22 (Minicraft) was released, along with the source code, I went spelunking. I’ve always been intrigued by Minecraft’s world generation, and this gave me a chance to peek behind the curtain at a 2D version (which, in all honestly, is more inline with my sensibilities).

I isolated the core algorithm. It looked vaguely familiar, almost like some of the pixel upsampling algorithms I’d looked at in the past. But I wanted to know if this was something known, or if Notch rolled his own. So I immediately went to my favorite question and answer site: Stack Overflow, where I asked about it. A quick response pointed me in the right direction.

So now that I knew what it was, I hit up Wikipedia, which wasn’t all that helpful. I hit up a few related links, and found a bit of random information, but nothing so clear as I would have liked. So I set about rebuilding the code from scratch in my own project to see how it worked.

The first interesting thing I learned from Notch’s version, was to modify my point accessor functions to implicitly wrap. This has the side effect of allowing the terrain to wrap perfectly across the edge of the generated texture. Which is great if you are using it to generate a game map!

public double sample(int x, int y)
    return values[(x & (width - 1)) + (y & (height - 1)) * w];
public void setSample(int x, int y, double value)
    values[(x & (width - 1)) + (y & (height - 1)) * width] = value;

These functions let us safely index off the edge of a texture, since it will wrap the data.

Now, we start building our data. Step one is to jump around the texture and initialize a stippled pattern. These are our pure random seed values, which will be interpolated across the texture in order to generate the terrain. The granularity is up to you, but what the spacing accomplishes is a rough control over the ‘size’ of the various features of the terrain map.  If you set your initial step size to the size of your texture, you will usually end up with a large mountain, or basin, depending on how you choose to look at it.

double[] values = new double[width * height];
for( int y = 0; y < height; y += featuresize)
    for (int x = 0; x < width; x += featuresize)
        setSample(x, y, frand());  //IMPORTANT: frand() is a random function that returns a value between -1 and 1.

You’ll note that we actually index off the side of texture; but that is okay since we build our sample functions to wrap.

Now comes the meat of the algorithm. We have two functions we use to set a new sample in the texture.

public void sampleSquare(int x, int y, int size, double value)
    int hs = size / 2;
    // a     b 
    //    x
    // c     d
    double a = sample(x - hs, y - hs);
    double b = sample(x + hs, y - hs);
    double c = sample(x - hs, y + hs);
    double d = sample(x + hs, y + hs);
    setSample(x, y, ((a + b + c + d) / 4.0) + value);
public void sampleDiamond(int x, int y, int size, double value)
    int hs = size / 2;
    //   c
    //a  x  b
    //   d
    double a = sample(x - hs, y);
    double b = sample(x + hs, y);
    double c = sample(x, y - hs);
    double d = sample(x, y + hs);
    setSample(x, y, ((a + b + c + d) / 4.0) + value);

These two functions do most of the heavy lifting. They take an average of a set of points around the given pixel, and store it back into the data.

Now, the core algorithm.

void DiamondSquare(int stepsize, double scale)
    int halfstep = stepsize / 2;
    for (int y = halfstep; y < h + halfstep; y += stepsize)
        for (int x = halfstep; x < w + halfstep; x += stepsize)
            sampleSquare(x, y, stepsize, frand() * scale);
    for (int y = 0; y < h; y += stepsize)
        for (int x = 0; x < w; x += stepsize)
            sampleDiamond(x + halfstep, y, stepsize, frand() * scale);
            sampleDiamond(x, y + halfstep, stepsize, frand() * scale);

So now we go over all the data, and fill in the middle points. We do so by creating new samples with the given pattern, and adding in a random value. I’ll get to scale shortly, ignore it for now. It may seem strange at first, but remember, our goal on one pass of the algorithm is to fill in all the midpoints, so that we can run the algorithm again, with successively smaller step sizes, until the texture is filled in completely. We sample the square once, and then do two diamond samples, in order to accomplish this. I’ve made some really bad programmer art images to highlight this (with apologies to any colorblind readers).

This is our starting state, assuming a 32×32 texture, and an initial feature size of 16. Note that since it’s a power of two, we’re relying on our earlier wrapping behavior heavily in order to get the desired sampling.

After running the sampleSquare loop, we end up with this:

Numbers have been added to show the order in which they are placed. Remember, each new pixel is sampled with a random variance from the neighbours that form a square. As you can see, we don’t have enough data in here to run our diamond square algorithm again. So now we fill in the diamonds:

You should be able to see why we do two diamond samples. The first set gives us the yellow pixels, the second set gives us the green pixels. The numbers in the image are backwards, so the pixels marked 2 are done first, followed by 1. I’d fix the image but I made it on a trackpad and it was hard enough already. Note that this step is relying heavily on the wrapping behavior — it is wrapping backwards around the texture in order to complete the diamonds.

Now that we have all the individual points filled in, we can now complete our algorithm and build a full terrain texture.

int samplesize = featuresize;
double scale = 1.0;
while (samplesize > 1)
    DiamondSquare(samplesize, scale);
    samplesize /= 2;
    scale /= 2.0;

We successively shrink the scale, so that the random variance added to each sample is diminished with step size. The result of this is smooth ‘hills’ and ‘valleys’. We run the algorithm while our sample size is greater than one, and successively shrink that as well, so that at a sample size of 2, we fill in the last step, completing each pixel in the texture.

Below is a completed texture at a size of 128, with a feature size of 16:

There you go! You can now generate 2d terrain to your heart’s content. I’m just mapping the floating values to a color lerp between black and white, but you can very easily use the value as a z component instead, and make yourself 3d terrain instead!

Google Plus

You might notice I added some Google Plus buttons. I may not write a lot here, but I’ve been fairly active on game related topics on Google+. So please, subscribe to me over there. And I will try and post more often here!

This is Not Your Older Brother’s Deus Ex

First of all, Deus Ex: Human Revolution is not a bad game. In fact, I find myself looking forward to getting back to it. Which means it’s a pretty good game, in the grand scheme of things.

However, it is also not Deus Ex.

I can’t help but feel that DX:HR is a game made by a group of people who had a feature list from Deus Ex, who had tons of reference for Deus Ex in terms of video and audio, but who never actually played the game.

On the surface, it feels like Deus Ex. The art and sound are spot-on, and they are what grab me the most. The somewhat questionable voice acting trigger my nostalgia for days when games didn’t have giant budgets for star-studded voice casts. The music is close to perfection; I’ll have to find a way to acquire the soundtrack.

Where it breaks down, however, is the gameplay itself. On the surface, it’s well done. It has a hacking minigame which hearkens to Shadowrun on the SNES, and puts the original Deus Ex’s hacking progress-bar to shame. The stealth and cover work as well as you could expect for current games. The levels are well laid out, and it’s like second nature to move through a space while avoiding enemies.

But that’s where it ends. Because the more you explore and stretch within the game, the quicker it breaks down. Your reward for exploring spaces early is to find story areas which are not yet enabled. Later on, when you encounter the mission related to that space, the game completely fails to acknowledge or reward your earlier curiosity, and instead, forces you to go back to those areas, triggering either a mission completion, or to find that some item that was previously static and non-interactive has been enabled. To me, this is close to unforgivable.

Then, there’s the static world. The vast majority of objects in the environment are non-interactive. I see a baseball on my desk in my apartment, and I want to pick it up and throw it against a wall. But it’s non-interactive level art. Almost all boxes in the environment are immovable, with the few you can move highlighted in a garish yellow, with a solid outline. Disabling that feature highlights how sparse the environment truly is, as there are a hundred things in a given space you may want to interact with in order to complete your mission or achieve some side objective, yet most of them are not available to you.

And to top it off, I’ve seen absolutely no evidence of any kind of emergent gameplay. I can’t lure an enemy through a locked door in order to have a chance to get through it. Enemies never seem to run for alarm panels. I can’t use gadgets in unexpected ways to boost myself over a wall to shortcut an area. Enemies are bound to their areas in order to prevent them from being lured in to traps. Perhaps this kind of thing will materialize later in the game, but from what I’ve seen so far, I doubt it will.

If my opinions change, I will update this post. But as much as I’m enjoying my time with the game, I still don’t feel it truly lives up to its predecessor. My enjoyment may simply be the case of water for a man dying of thirst in the desert.

Ultimately, I feel that this game is a sad commentary on games today, and where they will continue to go in the future. A game which is pruned by focus tests, data gathering, and the compulsive urge which seems so prevalent in the game industry of making sure the player can see and do everything. Deus Ex is from a time when it was okay if the player didn’t find something, and it was possible to completely miss parts of the game. The game didn’t lead you around by the nose; it was up to the player to discover the possibilities.

Playing the original Deus Ex, I was sure for a long time I couldn’t save Paul. When I found out it was possible, something opened up in my mind, and made me realize, this is the the strength that games, as an interactive medium, offer. The ability to do something again, but to get it right this time. But Deus Ex is one of the few games that really attempted to make choice and player agency the primary focus. The game industry seems to have forgotten that, and so we are left with games where every player has the same experience.

I never expected Deus Ex: Human Revolution to remember its roots, but I am still disappointed to find out that I was right. Games have the power to let us do things differently next time. So why do so many of them fall in the trap of forcing everyone down the same path?

Soapbox: Tiny Tower, Free to Play, and an Alternate Gaming History

So, before I get started, I want to say that I really did try to keep this blog positive. I have a tendency towards ranting (those of you who know me are now laughing at my understatement), but as I mean this blog to be a constructive set of observations on game design, I’ve avoided falling in that trap. Well, I recently started ‘playing’ Tiny Tower, and I can’t hold it in anymore.

I have an admission to make. I hate Free to Play (F2P) games. I can’t stand them, and I wish they didn’t exist. I avoid playing them. I avoid talking about them. And, ultimately, I wish no one played them at all.

Now first, let me be clear, I am speaking of games that follow the F2P pay model, not games which are just free as in ‘free beer’. If these games were free as in beer, there wouldn’t be a pay model attached, now would there?

And to be even more clear, I don’t actually hate the concept of F2P games. Games which are free to play up front, but for which you can pay to further explore the game and what it offers would actually not be a horrible system. This kind of a system would actually benefit gamers, because it would allow us to sample games, and pay for them as we saw fit, based on how much we felt they were worth. Great idea, really.

Only, F2P games haven’t gone that direction. At all. They are actually a whole new genre of game, one in which the design is corrupted in such a fashion that only by spending money would you have the experience we have come to expect from the games we play.

Take Tiny Tower for iOS. If you haven’t played it, on the surface, it seems like a Sims or Sim City style game where you build a tower, choose whether floors are stores or residential, and then populate the tower and give jobs to the people who live in it. Seems fine, right? I agree. Until I played it. I will now present to you, in the style of the now defunct “Games for Lunch” (With apologies to Kyle Orland), one hour of playing Tiny Tower over my lunch break.

12:00 I load up the App Store™, and search for Tiny Tower. I find it, and start the download. It’s only 15mb, which downloads over my 3g connection in about a minute.

12:01 I start the game, and am immediately presented with a tutorial. Great! I buzz through it, and learn how to build floors, stores, and apartments, as well as operate the elevator and assign Bitizens, as they are called, to jobs based on their abilities. The game speeds me through this by liberally rewarding me with Tower Bux, which I can use as a substitute for actually playing, I gather.

12:02 Aha! I now have control and can make decisions. I have a store in the process of being built that was started during the tutorial. The construction crew lets me know there’s an hour and a half left before it’s done being built. That seems excessive, but maybe they are employed by the City of Toronto. Either way, I have 5000 coins, 5 Tower Bux, apartments, and a frozen yogurt shop. One whole Bitizen has deigned to show up and live in my tower. Call me Mr. Slumlord.

12:03 All I can really do right now is ferry people to different floors using the elevator. I get bored of waiting for things to just happen, and spend some Tower Bux to fill my apartment with Bitizens.

12:04 I’m done examining my Bitizens’ hopes and dreams, and have still assigned them to jobs they don’t like. Suck it, pixel men.

12:05 A VIP shows up! I am told if I take him to a floor under construction, it will shave three whole hours off the construction time. Sounds good, kind of like that deal I am negotiating with a Nigerian Prince. I rocket him to the top of my tower, and am rewarded with a fully constructed Night Club. Now I have to reshuffle my Bitizens’ jobs.

12:06 I run out of things to do again, so I spend my few remaining Tower Bux on selling stock and restocking stores. I’m still 1000 coins short of building a new floor. I pop out of the game and hit up Facebook to check for new posts.

12:07 I return to the game, to be notified that I earned 55 coins while I was away. I do some quick math, and it’ll be twenty minutes before I can build a new floor.

12:08 While ferrying Bitizens around, I am asked to help find one. I correctly pick the right floor, and am rewarded with 1 Tower Bux. Yeah, it’s still Bux when there’s only one.

12:09 I complete another Where’s Waldo segment, but I’m tired of ferrying people around, so I explore the menus. There’s a fake Facebook, called “Bitbook” which has goofy postings from my Bitizens about their lives. “What is the alligator policy in this building?” R. Peters asks. I don’t know, honestly. I guess it’s an important question, 7 Bitizens like this.

12:09 I find a menu where I can exchange Tower Bux for coins, but the exchange rate doesn’t make economic sense, unless you are the Money Changer in Quest for Glory 2.

12:09 I click on a menu called “Get Bux” and am presented with the option of purchasing Tower Bux for real money. If I buy $0.99 worth, I get 10 Tower Bux. Which I can immediately change in to 3,000 coins. Which isn’t enough to put another floor on my tower. For $29.99, I can buy 1,000 Tower Bux, which I could exchange for 2,000,000 coins. Huh. Or I guess I could use those Tower Bux to build a complete tower in as much time as it takes me to tap on the screen 500 times.

12:09 I decline to spend real money, and instead, pop out of the game and play Powder.

12:16 My Klaskov worshiping fighter dies at the hands of a ghast. I pop back in to Tiny Tower, but there’s still nothing I can do except operate the elevator. I create a Quizar worshiping thief.

12:18 My thief dies after I read an unidentified scroll that turns out to be a Scroll of Fire. Oops. While trying to decide which god to worship next, Tiny Tower notifies me that my Night Club needs to be restocked. I follow the prompt, and can choose between stocking “Cover Charge” and “Cocktails.” I assume cocktails will be more popular. I pick that, and see that it will take ten minutes to restock. Slowest. Bartenders. Ever.

12:19 to 12:28 I lose three Belweir worshing mages on their first fights. I go back to Klaskov worshiping warriors and make it down to level 4 before dying to a lich. WTF, on level 4!?

12:28 I return to Tiny Tower, and deploy my stock. I do some ferrying, and decide that with my stocked stores, I should spend the Tower Bux I’ve earned finding Waldo. I sell off both my stores’ stock, and oh hey! I have enough to put a new floor on my building! I agonize for about twenty seconds before deciding to put in another set of residential apartments. They’ll take two hours to build. Maybe I’ll be visited by another VIP.

12:30 No VIPs.

12:32 No VIPs.

1:00 I’ve gotten to level 7 with a warrior only to be turned to stone by a cockatrice when my god abandoned me.

I think you can see the problem. Ultimately, you can’t really sit down and play Tiny Tower, because it is not a game, nor is it meant to be played. There’s no goals, and there’s no failure. Of course, there can’t be, because if I paid $30 to build my uber-tower but screwed something up and had my game end, I’d be so mad I’d probably flush my phone down a toilet.

Consider, if this game was made a few years ago, there would have been a speed slider. As it stands, you can’t choose to play Tiny Tower for a period of time unless you are willing to spend significant amounts of money. So to play it for free, you actually have to spend most of your time doing something else, because all the time scales are chosen so that they are optimally annoying. Would anyone ever really want to spend ten or fifteen minutes at a stretch operating an elevator and playing Where’s Waldo?

If I was invested in trying to actually build a tower, I would likely buy a bunch of Tower Bux so that I could actually do so without it taking… I’m not even sure. Weeks? Months? I’d be interested in knowing how long it takes to make a complete tower, without actually spending real money. And that money is significant for an iOS game. Given how many Tower Bux you spend just to play for an hour, 100 Tower Bux is obviously not enough to play for a sustained period of time, and that’s $5, which is basically the price of iOS games made with cutting edge technology and strong financial backing. $30? Forget it.

The other thing, of course, is that you only ever make one tower. It’s not like Sim City where you can experiment and try out crazy new strategies. If you want to replace a store with something else, you can delete the existing store, but you still have to wait hours for the new one to come in. This game’s business is wasting your time, and there’s no real room for any kind of creative input or strategy from the player.

To all of this, of course, you could say, “Well, if it ain’t your thang, don’t play it.” Which is fine, for now. But F2P is the new hotness in the games industry, with people throwing around new buzzwords (buzzphrases?) like “Games as a Service.” If you want to know what that means, allow me to give you a ride in my mythical magical alternate history time machine. It’ll be fun.

The year was 1991…

Civilization was released today, from Microprose. It is a world building game where you build up your city states in order to have the largest, most impressive country, out of all your friends. It uses a free BBS in order to let you compare your city states against those of your friends all over the world. You build cities, which then grow, and based on their population and resources, you earn coins which you can then spend on ever larger cities, and the ability to travel and create new cities. In order to progress, however, you need to first research new entries on the tech tree. 

Researching new technologies is just a matter of choosing which new technology to focus your scientists on. They then research the new technology over a matter of hours, or days, real time, depending on how deep you are in the tech tree. However, if you don’t want to wait that long, Microprose has a 1-800 number you can call, with a credit card, in order to purchase special Knowledge Bux. Once you receive them, you can then choose to instantly finish researching technologies, build new cities without waiting for income from existing cities, and in general, just show up your friends.

Be the first to have a globe-spanning state! That’s the only goal in the game. Unlike other games in which you can fail or be conquered by other states, in this game, you can never lose, because it’s all about fun and competing with your friends!

And millions of gamers cried out in unison, as if an entire history of quality games was suddenly extinguished. This is the future we may be facing if these F2P games continue to gain steam and mainstream acceptance.

Don’t believe me? Lets compare an iPhone game sold at $1, versus a F2P game with rough pricing like Tiny Tower. In general, it is accepted that of any free game, only 1-5% of your player base will ever choose to spend money on it. Of those, only a small percentage will ever spend a lot of money on it. The whales, as they are called. No, I did not make that up. That’s what F2P developers call you if you spend a lot of money on a F2P game.

So, lets say that you have 1,000 sales of a $1 game, versus 10,000 downloads of a F2P. Ten times the downloads for a free game seems extremely conservative for me, so we’ll go with that. The first game makes $1,000. Cut and dried. Now, let’s say 2.6% pay money for the F2P game. And lets say that they all spend $5, because lets be honest, the $1 option looks pointless, and the $30 option is ridiculous. The F2P game has just made $1,300. And that’s without counting whales.

But wait! The reality is that most players who make one purchase, will make multiple purchases. So now we’re at $2,000, say. But a popular ‘free’ game will also earn hundreds of thousands of downloads at the very least. And, of course, we still didn’t account for whales.

So in reality, why would a company interested in making money sell you a well designed game for $1, when they can sell you a maliciously designed game for free, and make more money?

Think about that. And then think about having to pay to accelerate your tech tree in Civ 6.





Design Musings: Chekhov’s Gun

There’s a literary technique called Chekhov’s Gun, wherein seemingly insignificant elements introduced early in a story are later revealed to be important, or conversely, that a story should not include unnecessary elements. The technique has its roots in storytelling methods that go back centuries. To 1706, and Arabian Nights, according to Wikipedia. Obviously, writers and playwrights have deemed it important.

It makes sense, as no one picks up a book or watches a movie in order to be bored by pointless scenes that don’t contribute to the telling of the story. That a character goes to a particular house can be important, but his travels to that house are not, thus you don’t see a lot of long driving scenes in movies.

So I wonder why it is that we so easily accept the complete opposite in games? We have come to expect them to fill our time with as much content as possible. Yet if we extend the concept of Chekhov’s Gun to encompass games and interactive experiences, we can immediately grasp that doing so belittles the experience.

But in order to see why this is, we should define exactly what Chekhov’s Gun would mean to games. Since games are interactive and player driven, the act of seeing something must needs be replaced with the act of doing. So if we paraphrase the literary technique as:

Showing an element to the audience such that its importance is not immediately revealed, or, each element shown to the audience must be relevant to the story.

We can phrase an initial game version as:

Requesting an action from the player such that its importance is not immediately revealed, or, each action performed by the player must be relevant to the story.

But a game is more than just its story. If we apply Chekhov’s gun solely with respect to the story of a game, then really, we aren’t applying a game version, we’re simply applying the literary technique. So let’s tweak a bit:

Requesting an action from the player such that its importance is not immediately revealed, or, each action performed by the player must be relevant to the player fantasy.

Hrmm… still not quite there. After all, requiring only that it relates to the player fantasy would mean implicitly that any action the player takes as a character would be valid, as any actions the character can take are implicitly part of the fantasy. What if we qualify it?

Requesting an action from the player such that its importance is not immediately revealed, or, each action performed by the player must be relevant to the player fantasy, while contributing to his/her ultimate goals.

That sounds pretty good, actually, and you start to see the impact in games. Everyone is familiar with the busywork quests in a game like World of Warcraft. You can immediately see how killing 20 Raptors in the Barrens violates this principle: killing them might contribute to the ultimate goal as dictated by the game designer, but doing so is only tenuously related to the player fantasy (which is to become a great and famous hero), and has absolutely no importance when viewed in the context of the game as a whole.

So all in all, a good rule to follow.

Next time I’ll delve in to why this has been on my mind lately, as well as offering more examples of what it can mean in practice.

(Special Thanks to Not One Of Us for prodding me about updating the site. I’ll try and be a bit more regular.)

Neat Features: Scott Pilgrim vs The World

Scott Pilgrim vs The World is a retro beat-em-up in the style of old NES games.  It is a roughly by the numbers game with some great art done by Paul Robertson, of Pirate Baby’s Cabana Battle and Kings of Power 4 Billion%.  Both of which are absolutely worth watching.

One thing stood out in the game , and that’s the fact that everything collides with everything.  Which sounds ridiculous at first (and kind of is), but results in some great situations. You can pick up and throw any object, and sometimes you can just kick and punch them to move them around.  Eventually you also get a kind of super throw to use.  And then you realize that you can throw people as well (including co-op partners).

It has almost a Dead Rising ethic to it, though simplistic.  The idea that everything can be interacted with on some level.  So of course, you start throwing things around and seeing how long you can keep them in the air.  And that’s where things really go nuts.  Because things collide and bounce when they are in the air.  As well as doing damage to enemies that get hit, either by you or flying objects.

This gets especially awesome in co-op, where you throw a guy in the air and then start hitting some objects, and everything is flying through the air and hitting everything else and damaging everything, while your buddy stands on the other side of the screen and hits them back.  Eventually everything lands and the fun comes to an end, but often it’s enough to make you giggle with glee.

The true benefit, of course, is that this is a new kind of gameplay added to an old style game.  Something that couldn’t have been done with original technology back in the 80s.  I think more old style games should be revisited with a pass of what current technology has to offer.

The Three Hour Game

Something I’d like to see is a move to shorter games.  I find my time comes at a premium, so when I do encounter games that can be finished in an evening or two, it leaves me happy.  But it’s more than just the time requirement, it’s that when game is compressed to a short narrative, you can digest it as a whole, rather than being in the situation where after two weeks of play, the narrative references a character from the first few hours and you can’t remember why he’s important.

Of course, a lot of people don’t like games that are this short.  In fact, if I’m enjoying a game enough, I’ll often be disappointed if it comes to an end so quickly.  But my own disappointment is tempered by the fact that I enjoy not having to spend a month playing a single game in order to finish it.

However, gaming wasn’t always like this.  A lot of earlier games were built in ways which perpetuated short but repeated play sessions.  Either in the form of being difficult and limiting your ability to play (lives), or simply being so good that you were willing to replay them over and over.  My favorite example is Super Metroid, a game which I can play through, start to finish, in two hours or so.  It can be an entertaining evening to sit down and play a game from start to completion, and Super Metroid has enough room for improvement and optimization that it continues to be satisfying, even after many playthroughs.

Of course, these kinds of games weren’t heavy on narrative, and most games nowadays, short of pure sandbox games, push the narrative as their raison d’être.  However, this often results in a conflict over which is more important.  The sandbox is limited by the narrative, and then your gameplay is dictated by the same narrative.  The end result being that the narrative becomes stretched for the sake of gameplay, and the gameplay is artificially limited in service of the narrative.  Which, at the end of the day, serves neither.

I would like to see a move to shorter, more replayable games.  My ultimate game would be one which is built to be finished in a few hours, but all those development resources that would normally go in to making a game much longer would be used, instead, for branching narrative and random level generation.  You could even skip the branching narrative, and instead, just have the variety of gameplay which would let you experience the narrative with no chains on gameplay, so that each playthrough becomes rewarding simply because it plays out differently.

After all, the biggest thing which ruins playthroughs is being forced to do something that you’ve already done.  Even for a lot of the more open ended or simulation based games, it can be frustrating to have to go through a tutorial again, or deal with a part of the story that restricts your gameplay options.

Of course, the narrative issue is something else.  Not sure, yet, how we’d deal with seeing the same narrative over and over.  Branching seems the logical solution but perhaps we can step back and play with a more dynamic and procedural narrative by eschewing words in favor of more Sims-like communication.  But that will be a different post.

Design Crossover: Inception as a Game.

Note: This post contains minor spoilers for the movie Inception.  So if you haven’t seen it, you should.  Also I’m going to assume you are familiar with it so this may be confusing otherwise.

Now that that is out of the way.  After seeing Inception the other day, I could not help but see what a great game it would have made.  In fact, to be entirely truthful, I was jealous.  The setting contains the perfect conceit for a game — that anything is possible.  That the movie industry came up with it before us is more of a sad commentary than anything, especially in a time when hollywood seems only able to remake movies and crib from other mediums.


Now, the first part to Inception as a game would be to accept that the first layer of the movie is actually reality.  You can delve in to dreams, you can take people with you, the technology just works.  There are are dreamers, architects, subjects, etc.  Each would work just as it does in the movie.

The second part would be the setup:  You effectively play an equivalent role to Cobb.  From there, in a type of overworld, you’d find jobs, assemble teams, pick your methods, potentially even have a layer of player setup for how the subject’s dream should play out, and then in you go.  Once there, you can have the dreams play out in many ways, but the core gameplay would swap between action sequences, and more RPG styled dialogue and exploration sequences like Mass Effect.

Of course, so far, this is just the movie, translated directly in to the game.  So down to the meat of the idea.  You control the dream.  Specifically, as the player, you are given control over the architect.  So for any mission, you get to choose the set-up.  You pick the location, you pick the story structure to be used, and part of the game would be attempting to properly target a dream with a subject in order to extract the information.  Picking inappropriately would lead to a mission failure, and a scuttled job, forcing you to go back to the drawing board and find a new one.

The only part of the game not directly influenced by the player would be the real world portions — where you find the subject, how you need to do your job in order to sneak in to their dreams.  That part would be straight classical gaming.  But once there, you pick the where and the how, using background information gathered about your subject.

Once in the dream, to take the experience further and deeper than the movie did, you would be given control over the dream, with the restriction that you had to limit your usage of dream powers for fear of waking your subject.  For instance, you could create walls anywhere you wanted, as a defensive measure or otherwise.  Give yourself weapons, make buildings fall on people, etc.  How much damage you did to the dream would be dependent on how believable the change was to the dream, and the feedback would be from the game world itself.  Too many changes and the dream would become unstable, communicating itself directly to the player via the environment.

From there, each dream would be a matter of finding what you were looking for, and given the dynamic choice of environment, setting, and tools, each time you played a mission would result in a different set of completion conditions.  Each dream would be unique.  Also, to stay within the rules given by the movie, you could never know the layout of a dream, as you would pick a setting, but the architect would create the world.  In game terms, each dream’s layout would be procedurally generated.

Now that would be a game I would love to play.


More content coming soon! Move, wedding, and honeymoon are done with, so I have some time to start thinking (and thus writing) again. Don’t delete that bookmark just yet!

Meaningful Design: Small Worlds

One of the topics I like to talk about in my work, is how we are, in general, only using our vocabulary as game designers to express literal conflict.  Few things are as well represented in games.  But our vocabulary can be used to express far more.

A really great example of this is a small flash game called Small Worlds, which was created by David Shute for Casual Gameplay Competition 6.  I do recommend you go play it now, as I will talk about it in detail.

What is really amazing about this game is how much meaning is packed in to a game which only uses the most basic of game vocabulary.  The only mechanics to the game are movement, jumping, and fog of war.  Which, as far as our game vocabulary is concerned, is as basic as camera is to film.

And yet, this beautiful little game uses them completely out of context from where the mechanics were born, and where they are still mostly used today.  The movement is not about propelling the player to the end, the jumping is not about providing challenge, and the fog of war is not about obscuring an enemy.  Instead, all three combine as tools to let you slowly uncover a story.  A story, I might add, which is conveyed with only a few words, and with extremely rudimentary graphics.

It was also stuffed with meaningful little details.  That the space station you are on has been destroyed.  That the city’s waste flows freely in to the water that rains on them.  The freeze frame of an explosion.  An alien organism that died violently.  Nuclear winter.  An empty command bunker. The fact that the missiles are the only thing in the game that obscures your character.  And then, at the end, with nothing but the word “silence” on the screen, the character apparently ends his existence by launching himself in the sun.

Overall, this game is a masterful example of what can be done when we step out of the common expectations of our vocabulary, and move on to doing something emotionally relevant instead.