The web home of Kim o the Concrete Jungle, including Kim o the Concrete Jungle, Kinsley Castle, the Mortal Taint, the Mojo Liberation Front, Creighton Keane, and the Blues Convicts.

Navigation

Dynamic Map Loading
A Game Design Idea

Introduction

I'll start this with a caveat. I am not a professional game designer -- just a general creative type who likes to dabble. But having said that, I've dabbled with quite a bit of game stuff. It started back in the day when I cobbled together a house-rules system for a pencil and paper RPG, because I wasn't very happy with standard D&D rules. In the computer realm, I've messed around with 3d game engines starting with Ken Silverman's Build Engine (used in games like Duke Nukem 3D and Blood). From there I messed with Halflife, Unreal Engine 2, and more recently, Unity 3D. So I like to think I'm not entirely clueless. And the idea of actually making a playable game has always tickled my fancy.

I've had this idea for a game design, and I'm going to try and build it in the Unity 3D project I'm currently tinkering with. It's not a complex idea, and may not be particularly clever. I'm no genius, after all. On the other hand, a simple idea -- such as this -- is easy enough to implement, and simple doesn't necessarily mean ineffective.

This idea was inspired by two different things, the first being a complaint. One of the most common complaints I see about modern 3d games is that they are too static. The players never really feel like they can make a difference through their actions in the game. First person shooter style games are on rails. They shunt the player from one set piece to the next. This can be great, because going from one set piece to the next allows the game designer to craft the most coherent and satisfying experience. But playing a game like this is sort of like watching a movie -- a movie that keeps stopping to nag you, just to make sure you're still paying attention. Other games, like GTA, are sandbox games that give you big open worlds to wander around in. This at least gives the player a sense of autonomy for a while -- until they realize the world is essentially static and unchangeable, and the act of traipsing across the world from one mission to the next is little more than padding.

Of the sandbox style games, I consider GTA: San Andreas to be the most successful. The designers of San Andreas stuffed their world full of little mini-games you could discover by exploring. The Elder Scrolls games take this to the extreme -- where there are so many little side-missions it's all but impossible to play them all. But on the whole, most open-world games actually punish you for attempting to explore their worlds -- you can barely move in games like Just Cause II or Far Cry II without being attacked by men in trucks. I just don't understand why you would go to all the trouble of making an open world game if you're going to discourage exploring, rather than reward it.

There are several on-the-rails type games that have tried to solve the problem of static game-play by introducing "moral dilemmas". I'm not aware of any game that's done this entirely successfully. Making a player choose between good and evil is, in practice, actively stupid. Choosing the path of good is a no-brainer, because everyone knows the moral imperative of story telling -- that evil always loses in the end. Only cartoon villains actively choose to be evil. In good fiction, even the worst of the bad-guys are given psychologically credible motivations -- they don't see themselves as villains at all -- and sometimes they are even sympathetic. But this usually doesn't matter, because these "moral choices" are often very superficially tied into the game. Too often the only difference it makes is whether you get the "good" or the "evil" ending. It has to be that way. Fully integrating that sort of binary moral system into the game would mean you'd have to create every set piece and cut-scene twice -- one for the evil choice, and one for the good choice. That's twice as much work for the same number of hours of game-play.

Size and Scale

The other line of inspiration for my idea comes from playing FUEL. Now, in most respects, FUEL is just an ordinary off-road racing game. The post-apocalyptic angle is kind of fun. You're racing for fuel rather than money, and your vehicles all have a jerry-rigged quality to them. You get a good mix of on-road verses off-road racing, and a fair variety of race modes in the challenge section -- from time trials, to knock-out races. You even get to race against helicopters.

FUEL is also completely and utterly insane. You'll see what I mean if you look at these two charts that compare the size of game maps. Compare the size of FUEL's world to GTA: San Andreas. San Andreas was a big game, with quite enough square mileage to convincingly depict three large cities and some of the country in between. FUEL utterly dwarfs San-Andreas. FUEL's map is so ridiculously large that only a tiny fraction of it gets used in the actual game. It's so large that the developers couldn't physically produce enough art assets to fill the entire map, so if you stop to look at the details, you'll begin to notice the same barn, the same house, and the same cow skeleton repeating endlessly across the world. You could quite easily fit the entire game of FUEL into a map a quarter of the size.

And that's what got me thinking. Clearly, we've passed the point where the size of a game map is any kind of limiting factor. (Actually, if you take procedurally generated maps like the map of Daggerfall into account, that's pretty much always been the case, right from early days of 3D games.) In Unity 3D, the default terrain size is a 2x2 kilometer square, and you can have multiples of them in the same scene.

Now some people -- particular gamers with no knowledge of game-design -- are obsessed with the idea of large maps, and 1 to 1 ground scales. And I suspect this is the sort of obsession that caused FUEL to have an insanely oversized map. But it's entirely unnecessary. A game world only has to be large enough to be convincing. San Andreas is convincing as a city, even though the map is tiny by modern standards. One to one ground scales are particularly wrong-headed, which is obvious when you stop to think about what that would mean for a game. In real life, it takes me seven minutes to walk from my house to the bus-stop at the top of my street. That's a seven minute journey with literally nothing to see but other suburban front-yards more or less the same as mine. It takes another fifteen minutes on the bus to actually get anywhere even remotely interesting. Can you imagine those sorts of time scales in a game? It would be a very boring game.

Anyone whose actually attempted anything in the way of map designing knows you don't need one to one scale. If I wanted to recreate the suburb of Sydney where I live as a game map, I'm pretty sure I could fit it all into a dozen or so streets, instead of the hundred or so streets of the real life place. If I was careful about it, I could squeeze all the main landmarks into that reduced space, without making it seem unnatural. Likewise, if I was making a map of the whole of Sydney, I would only need to include a few representative suburbs, instead of the dozens that exist in real life. And the larger you go, the more you can compress the space. I could create a game map of the whole of New South Wales, and I wouldn't need to waste a whole heap of map space reproducing the desert up in the northwest corner. A couple of square kilometres of it would be more than enough. I'd be willing to bet that nobody would even notice that, according to the ground scale of my game map, it's only six kilometers from Broken Hill to Cobar (instead of 400), or that they didn't pass through Wilcannia on the way.

Compressing the ground scale is a fact of life in computer games. A game is meant to be fun rather than painstakingly accurate, so you don't want to be reproducing big old pointless empty spaces. A good map designer uses just enough space so things don't seem weirdly proportioned or implausibly crowded together.

My Idea

So here's what I thought. Instead of making a map four times as large as it needs to be, why not make four separate maps? I don't mean that in a weird, zen kind of way. I mean make four maps of the same area. The first map represents the area as the player first encounters it. Subsequent maps will show the area as it changes -- either through time, or as a consequence of the player's actions. It's trivially easy to set up a few flags so the game can serve up the appropriate map according to the player's progress through the game.

Now the immediate objection here is that I've just set myself up to do four times the amount of work. But actually, that's not the case. A lot of assets will be repeated across all the maps. They will probably use the same terrain map, for a start. I imagine quite a bit of the art will be repeated too, since it's supposed to be the same place, and recognizable to the player. In fact, in this scenario, repeating terrain assets will be far less likely to raise eyebrows than in FUEL, where the same art gets used repeatedly because there's not enough of it to fill the absurdly huge map.

Adding dynamic changes to your game world becomes trivially easy when you've got different maps for different points in time. You just go ahead and add or change whatever you want. If you only had one map to work on, integrating dynamic changes to that map would be difficult. Can you even imagine what a debugging nightmare a game like Morrowind must have been, with so many different missions coexisting on the same map, interfering with each other and causing chaos? But when all the changes are on discrete maps, no problems of that sort can arise.

The idea is that you don't have to make your map very large to create a sense of immersion and diversity for the players. You keep the players in one place, and have an evolving landscape instead. So you're not really doing four times as much mapping. You're really just adding more detail to a smaller map, with a view to breathing more life into it.

Organization

Okay, so let's flesh out this idea of multiple maps and make it suitable for using in an actual game. The first thing I'm going to do is divide my game world into nine different regions, roughly corresponding to a 3x3 grid. (I was going to do that anyway because of the limitations of Unity 3D. Now I can make that work for something.) I'll try, where possible, to divide the territory up according to natural barriers, so I can avoid invisible walls as much as possible. Each of the nine maps is a scene in Unity 3D, and each will have four further maps associated with it.

This means I've got nine stages to tell my story in. I'll control the flow of the story by opening up each of the nine regions in turn. And in each region I can have missions that reflect the development of the main story line at the given point in time. But apart from that, the player can have a fair degree of autonomy.

Now, of course, each of these nine regions is going to have four maps, which I will label I through IV. And to maximize the potential of those, I'm going to divide them up in the following way. Map I is the initial state. It's what will be presented to the players when they first go to the region. It will have it's own set of side missions, plus a main mission that will lead to the second map of that region. Map II is the crisis map. Every story you will ever read has a middle section that ramps up the dramatic tension, and games should be no different. The crisis map reflects this. You've got a whole map where you see the changes that occur in the area as the crisis plays itself out.

As the plot comes to a head, the player is presented with a choice as to how the crisis will be resolved. Maps III and IV are resolution maps, and there's one for each of the two alternative endings presented to the player. Now you'll see right away that this is not the infinitely branching tree of decisions gamers dream about, but it is more than just the old good ending/evil ending alternative cut-scene. Two maps independent of each other can represent wildly diverging outcomes as a direct consequence of the player's decision. And as there are nine separate regions, each with their own independent ending states, the player does get a considerable amount of input as to how the world looks after playing through the main mission.

Now you might raise an objection that having alternate endings for each chapter of the story along the way is very inefficient. It means there are large areas of the game the player won't even see on his first play-through. This is true. But it's still more efficient than the old infinitely-branching tree thing. If you're my age, you'll remember those old choose you're own adventure books. Those tried to be a bit too clever with it, and included dozens of alternative story lines, which meant that you had one ideal story and a bunch of shorter, alternative ones that were quite unsatisfying.

The alternative resolution maps I'm suggesting here are a slightly different beast. For a start, only one map out of every four will go unseen by the player. 27 out of a total 36 maps will remain in play. If you follow Bethesda's example and try to give the player the illusion of autonomy through the sheer size of the world and the number of side-missions available, you'd be lucky if anyone saw as much as three quarters of the game's content -- lucky if they see more than half. Also, resolution maps of the kind I'm proposing wouldn't need to be as detailed and polished as regular maps. By the time they've come into play, the main action will have moved onto the next region. They're not so much maps to play as maps to revisit. They're their for the sake of continuity, and as a reward to the player for finishing that portion of the game. The kind of missions you include might be about wrapping up subplots, or equipping the player for the next part of the game. It's where I'd include stuff like procedurally generated fetch-quests, collecting all the flags kind of tasks, stronghold building, and easter eggs -- all the low-stakes, open-world kind of things.

Variations

That's the main structure I'd stick to. An opening state, followed by a crisis, followed by one of two possible endings. Anything you put in a structure like that is practically a story all by itself (providing you can come up with some plausible transitions). But, just in case the story you want to tell doesn't fit neatly into nine iterations of that structure, or if you occasionally want to throw in a bit of variety, I can think of a few variations on the theme you might want to use.

The simplest variation is the one where you leave out the alternative resolutions, and just have a linear progression through time. In that case, you'd use a four act dramatic structure -- initial conflict, crisis, climax, and denouement. When I think of a climax, the riot section of GTA: San Andreas comes immediately to mind. To pull that one off, Rockstar had to introduce a whole new level of AI for all the NPCs that could be switched on and off. But I'm thinking that having a entirely separate map for a climactic section of a game would open up a lot of possibilities. Of course, such a structure removes the element of player choice and puts the game back on rails. But maybe that's what you want. Maybe you can use it in the end game where having alternate resolutions won't make much difference anyway (because you know most people are going to stop playing after they've completed the main story mission).

Another variation would be to shift the alternatives from the resolution to the crisis section in the middle. Perhaps sometimes the most important thing is letting the player decide how he wants to fight the battle. This would be a good idea where the ending would be a foregone conclusion. If your player is a lone man taking on an entire army, for example, you know that can't end well. So rather than wracking your brain trying to think of qualitatively different alternate endings, why not have alternate middles instead?

Following on, the final variation of the structure would be to have alternative initial states. You'd never do that for the first region of the game, because the alternatives would have to be completely arbitrary. But if the player is faced with a very momentous decision, you might want to have that decision effect not just the ending for the current region, but the initial state of the next region as well. This would be very good way to effect a tight transition between one section of a game and the next. The downside is you eliminate a bit of player choice.

Of course, you could go mad and start having more than four maps. I mean, you could have regions with alternative crises as well as alternative resolutions. Why not? It's only one more map! I don't think I'd go for that, though. I know that having more than four maps of the same area would test my ingenuity as a mapmaker. It would probably test the patience of the players as well. Besides which, it would be inelegant. It offends my sense of symmetry.

An Example Storyline

All this has been very abstract so far, so let's rough out a storyboard for a game using this method. Since I've been reading a lot of SF recently, let's make it a science fiction game. I approach storyboarding a game the same way I write novels. It's all part of that same simple three act structure, where we go from the first engagement, to the crisis, and end with the resolution. (I've got a theory of stories based on chaos theory, which describes that same dramatic sequence as: i. Disruption of the steady state; ii. Chaos; and iii. Establishment of a new steady state -- but that's one for another article.)

For a longer work, like a novel or a game, I treat each of those steps as a story in it's own right, each with it's own first engagement, crisis, and resolution. For me, a novel is simply a collection of stories that happen to fit together as a coherent whole (it's an excellent way to approach it, if you're a writer looking to make the leap from short stories to novels). Because a game is a particularly long form, I'd do that same division a second time. So, basically, what I'm looking at is nine separate stories that happen to add up to a coherent whole. And it's no coincidence that I've chosen to split my game map into nine separate regions.

Okay, so here's the premise for our SF game. You are an exo-biologist who's come to the recently colonized planet of Solon. It's an earthlike planet, with plenty of native flora and fauna, and it's hardly been explored or studied yet. This is why you've come -- to be the first in on the ground, and to make new discoveries. The one thing you know -- the one thing you've been categorically assured -- is that there is no intelligent life on Solon. It's why the colonists were allowed to move in so quickly, before even the survey teams showed up. You've joined such a survey team. It's a joint military/science team. The scientists are there to document everything. The military are there to learn how to defend the planet on the ground, and to scout out possible engineering projects.

The first, introductory area of the game is a section of sparsely inhabited wilderness beyond the southern edge of the main colony. It contains the main survey camp, a couple of camps of colonists, who are doing a bit of unofficial exploring of their own, and a whole bunch of alien woodland. This is region one, map I. And on this map, the side-missions are going to be things like surveying the area, checking out cave systems, collecting specimens of various plants, helping out the colonists when they're in trouble, finding a pass across a mountain range, and so on.

The main story in this region is going to revolve around you, as a biologist, discovering the intelligent alien life that is definitely not supposed to be there. In fact, you discover two distinct species of the same genus. There is a robust alien, and a gracile alien. You suspect the former is the more violent, and the latter, the more intelligent. This is a huge political problem, because colonies are not supposed to be established on planets with intelligent life. Most of the main story missions revolve around trying to convince your fellow survey team members that the intelligent aliens actually exist.

The crisis occurs when the robust aliens notice the presence of the survey team and other humans, and decide to invade the area en masse and eject the human usurpers. It turns out that the robust aliens are not just violent, but very territorial as well. We move onto Map II of the first region now. Map II is different from Map I mostly in that there are now large camps of hostile robust aliens around the place. Most of the missions on this map will revolve around futile attempts to negotiate with the robust aliens, rescuing colonists from them, and rebuffing their attacks on the camp. And note, this is all happening in the exact same area as before, we've just gone one step forward in time. For the player, the transition should be seamless.

When it becomes clear the robust aliens are here to stay, the survey team is divided. The military attachment wants to stand its ground and dig in, wage a counter-offensive against the robust aliens, and drive them out of the region. The science team wants to retreat from the area, northwards back up towards the edge of the human colony, and study the aliens from a safe distance. The team can't make up its mind which is the better plan. They turn to you to decide it for them. So this is the first decision you will make in the game -- whether to retreat and observe, or stand ground and fight. If you decide in favour of the military, then you get resolution Map III where military strong points are added to the region and most of the side-missions are about fighting with the robust aliens. If you favour the scientists, then you get resolution Map IV, where the region is abandoned and left to the robust aliens, save for a fortified science station on the northern edge of the map. The side-missions are mostly about stealthy observation of the aliens.

But in the mean time, the story has carried you on, and now you've opened up the second region of the game. A gracile alien comes to you and shows you the pass over the mountain range. Beyond is a region where gracile aliens and robust aliens compete for territory, and it's pretty clear that the gracile aliens are getting the worst of it. Nonetheless, they take you into their villages and play host to you. In spite of their primitive state they are indeed very intelligent, and very curious about you. The missions for Map I of this area revolve around programming your universal translation computer to interpret the gracile language, and helping defend the gracile aliens against robust attack.

The crisis comes when, having taught your little alien friends to defend themselves, the robusts now view them as a legitimate threat and wage all out war. Again, the map II for this region is the one that suddenly sprouts robust military encampments. When the two sides fight to a stalemate, it is up to you to decide the matter. The gracile aliens choose you as their champion. The robusts choose some big battle-scarred brute as theirs. You must fight each other in single combat. If you win, you get resolution map III, where the graciles are dominant in the region. If you lose, you get resolution map IV, where the robusts are dominant.

In the mean time, the graciles have adopted you and made you an honorary gracile alien. Which means you get invited to region three, which houses the gracile's great hidden city. There you will be doing missions aimed at setting up a gracile military, so they can get one up on their traditional robust, because you're now beginning to suspect that the graciles are good candidates for a bit of uplifting. It culminates with the big battle that ends the first third of the game, thus resolving the first major story line about ending the aggression of the robust aliens.

And so it goes. Completing the challenges in one region leads you logically onto the next, where the story enters a new phase with a new set of challenges, with more decisions to make with more alternatives. And of course, as you go along the challenges get bigger and the backdrops more spectacular. The second story sequence of the game might revolve around introducing the aliens to the colonists and settling treaties between all three groups. The third sequence might revolve around the galactic authorities getting wind of the aliens, declaring the colonists illegals, and withdrawing official protection. So all of a sudden the three groups have to work together to protect their planet from an invasion of slavers, looters, and space pirates.

That's nine episodes, that add up to three stories, that add up to one big game. And it's all driven by this idea of using different maps to represent dynamic change over time. Best of all, when it's all over, the way the game map looks is, for the most part if not 100 percent, down to the decisions the player has made along the way. And that's what players want -- real consequences for their actions, not static and unresponsive worlds that never change.

Appendix #1: Pie In the Sky

Having read over all of the above, it occurs to me that my idea could be developed further, were I not limited to such an unsophisticated engine as the free version of Unity 3D. Basically, I'm obliged to use discreet maps here because dynamic loading of content and real-time lighting are only available in the licensed version of Unity 3D. So let's have another look at my dynamic map loading concept as if it was on some imaginary game engine with no limitations of any kind whatsoever.

My dynamically loading maps could become several degrees more sophisticated if they became dynamically loading layers. To some extent, we're already familiar with map layers that change over time, because we've all played games that have a day/night cycle. Having real time lighting in a game makes it much easier to change terrrain features on the fly. (Whereas this is pretty much impossible when you have to bake light maps.) By using layers on a map with real time lighting, you could break down my idea of dynamically changing the world over time even further, applying changes in steps, or maybe even on a mission by mission basis.

As an example, let's imagine a survival level on a fantasy game, where the region is being invaded by an army of fantasy bad guys. If we are restricted to dynamically loading maps only, then the transition into crisis would have to happen all at once, as we move from Map I to Map II. But if we could use multiple layers instead, we could break down the invasion into stages. Stage one might be the invasion of the orcs, where you switch on a layer that adds orc encampments to the map. Stage two might be the bit where dragons fly into the area and torch several towns. Here you'd swap the layer with the intact towns for a layer with the burnt-out towns. For the finale, an army of evil mermen raise a flood that engulfs the main city, and you'd have a layer reserved for that as well. Since you've got the invasion in stages -- each stage with it's own layer -- there's no reason you couldn't have separate resolutions for each.

But do keep in mind that real time lighting is pretty much essential for this scenario. While the free version of Unity 3D does have layers you can switch on and off, you can't use them in this way, because none of these changes you make on the fly would be lit. Dynamically loading content is also pretty much essential. A game engine that's trying to load all the various alternatives into memory at the same time would start to choke your computer pretty quickly.

The other thing you could do with layers (as opposed to maps) is have multiple story lines in the same region, each one building and resolving independently of the others. It would only be a little bit more work to ensure that these multiple threads didn't interfere with each other. By doing this, you could have all the action occurring in one big region, instead of making the player move between several smaller regions. That might create a greater sense of continuity in the world of your game. It would certainly give the player much more autonomy of movement.

Remember that for all these alternatives, I'm still recommending the same 4 part dynamic loading system I described in the main part of this essay -- the initial state, the crisis, and the two alternative endings. The only difference is I'm imagining how it could work if that was applied to layers instead of discrete maps. But for now, and until I can get my hands on a game engine that would allow me to use layers in this way, I'll stick with the maps.

Contents

Free Web Hosting