Last week I talked about the ultimate immersion killer in video games: the invisible wall at the edge of the game play area. We discussed in quite a bit of detail how to conceal such an abomination. We talked about natural obstacles such as mountains, chasms and pits of lava. We mentioned magical barriers as well as un-deflatable, constantly respawning enemy hordes that would pick off players daring to walk “off the map”. We also agreed that all of these methods seem a bit contrived. Especially the magma rivers.
The problem is simple: we have a sandbox game (Morrowind, Oblivion, GTA, etc..) with a bounded game play area that has distinct “edges” or boundaries. We want to keep the players within the boundaries without actually using invisible walls or impassable terrain features to block them off. What I want to do is try to come up with more interesting ways of making the player stay within the bounds of the in-game world. I have a few ideas of my own, but I’d love to hear yours.
The Magical Leash
The simplest way to force player to stay in some area is to use the good old magical leash trick. At the beginning of the game a wizard puts a curse on you, which will be removed after you finish The Main Quest™ he assigns to you. If you try to leave the country/province and you stray too far away from the wizard’s tower you will die. Or if you are playing in a SF setting, replace the curse with a small remotely detonated explosive lodged deep within your brain. Removing it would involve a complicated and expensive surgery.
Instead of bouncing into an invisible wall or a “you can’t go that way” dialog your character would instead have a very real, and pressing reason to stay inside the borders. Crossing the border wouldn’t necessarily mean instant death – that could be annoying. You could for example start loosing health – at a slow rate at first. The farther you go, the faster you lose health. Or, the thing would work on a timer. You cross the border and you hear an audible alert or a countdown urging you to step back.
This method preserves the illusion that there is a huge world outside the game play area, and also gives the player a compelling reason not to attempt to explore it.
The magical leash doesn’t always work plot-wise. For example, you wouldn’t want to put such a curse on the Chosen One™ who is destined to save the world, universe and all the other stuff around it. Next best thing is to use a natural boundary that is not stupid.
I mentioned this method before, but I will bring it up again, because it is possibly the best one out there. Make the game take place on an isolated island. Tell the player that getting to the mainland involves a many-month ship voyage. If he tries to go swimming, simply procedurally generate ocean around him. Just an empty water, with a flat, clear sandy bottom. Nothing to see or explore. Sooner or later the player will get the idea, and swim back to the island. This is guaranteed to work, and it doesn’t force you to modify the plot in any way.
You can play around with this ides a bit. For example, instead of an island, use an oasis in a middle of a desert. Or a colony on an arid, desolate planet. It will work well, as long as you can justify putting a huge swat of nothing between the game area, and the rest of the world.
Another interesting variation on this idea is the flying island. You put the player on a magical chunk of rock that is floating in mid air. If they want to walk off the edge, let them. Then give them a nice, cinematic view of the underside of the island followed by the loading screen.
Then again, it would be pretty boring if all games took place on isolated islands. Sometimes you want it to appear as if other settlements, towns or cities were close by. For example, you want to have sprawling vistas with an outline of some impressive city or ruins in the distance. You don’t want the player to go there, but you want them to see it from various vantage points. You may even want to have roads that lead to that city appear in the game.
How do we accomplish that? Let’s think about this. How does the player know he is actually moving in and FPS or a 3d person game with a camera trailing behind him? He figures it out by observing the nearby objects as he passes them. If there are no objects, he can tell by observing the textures on the ground. Imagine putting your avatar on a perfectly flat, featureless green surface with no texture, sheen or granularity to it. It is just a sheet of green that extends in all directions. In such environment there would be almost no way to tell whether or not this avatar is actually “covering distance” or running in place. Since there are no observable features on the ground both actions would appear exactly the same.
Let’s exploit that! When the player reaches the invisible wall, don’t make him stop and bounce off of it. Simply stop moving him in space, but continue “advancing” the terrain textures around him. You can probably even put these textures on a loop. For example, if the player is following a road, just make the painted traffic lines scroll past him as he is running in place.
The player can continue in that direction, but the city on the horizon will never appear any closer. He is essentially on a virtual treadmill!
For added realism, use a timer to keep track track on how long player was on the treadmill. Then when he turns around, delay actually releasing him by the same amount of time. This would give him an illusion that he really covered a lot of ground while off the map. It might get a little bit tricky if they go off the road, and try to skirt around at diagonal angles, but you can still figure it out. Maybe instead of a timer use a pedometer type thing – count the steps he make, and adjust for the direction. There might be a little of vector math involved here, but it’s nothing that can’t be implemented efficiently.
Spherical or Toroidal Wraparound World
Finally, how about making the game world have no borders at all. Have the map wrap around itself, so you can’t actually walk of the edge. It would simulate living on a sphere – say a small planetoid of sorts. The actual implemented shape of the world would likely be torus because spherical geography can be difficult to work with. For one, it can’t be nicely flattened out into a 2d map – ask real world cartographers. It screws up all the angles. Not to mention that giving the player access to a whole sphere would probably do weird things to in-game compass.
Torus on the other hand maps beautifully into a square map and allows you to create a 3D world that may appear like a sphere from the FPS/3rd person perspective but really isn’t. When the player walks off the edge of the map, he enters the opposite edge – the world effectively wraps around in a very intuitive way. You don’t actually tell the player he is walking on a surface of a doughnut – make him think it is an actual sphere.
If you design your game play area this way, you can’t really pretend that there is more stuff out there. If the world wraps around, it means that there is nothing more that lies beyond which puts some design constraints on you. For example, the players may want to know how this tiny word sustains it’s population if there are only 3 small farms on the whole planet. In the comments last week Lars mentioned that he would rather have an invisible wall than an incredibly tiny self contained world that didn’t even pretend to be self sufficient. The notion that there is more to the in-game universe was important to him – as it is important to other players.
So making toroidal world only works in some cases. It wouldn’t work for games such as Oblivion, unless… Unless you assume that this world is only a small part of a galaxy of other toroidal worlds. This could be a unique part of your game world’s charm.
Imagine a fantasy setting in which you have an unrealistically dense solar system full of habitable planetoids. The player would see other planets rolling by in the sky – hell, perhaps even be able to make out major cities on their surface. Establish that there is an efficient magical way of traveling between these worlds, and an established trade which explains abundance of food on a world with scantly any farms and no edible plant life. To make things even more interesting, give the player access not to one but two or three small toroidal maps to give him an idea how this world is networked and how these planets vary in size.
If you are creating a SF universe you can make your toroidal worlds to be small, terraformed moons and captured asteroid satellites that orbit some bigger planet. As population blooms, it is unlikely that inhabitants of a planet would migrate towards the big orbiting rocks around it. And if you have super-efficient transforming technology, you can totally capture an asteroid in a stable orbit and turn it into a beautiful urban center, a suburban sprawl or a mining colony with a nice school district. Most of these colonies would naturally be dependent on trade with the main planet for food supplies, fuel and energy.
You could then allow the player to move between several of these orbital colonies, but keep him off the main planet. How? Make something up. Maybe you need a visa to get there. Maybe you need to be a citizen or be invited by a citizen. Maybe the folks down there don’t take kindly to people with criminal records and the player has a prior conviction that got him banished to the Orbital Village in the first place. There could be lots of made up reasons to prevent him from going down there – up to and including exuberant ticket price.
What do you think? Can you give me other interesting ways of constructing virtual game worlds in a way that would limit invisible walls without introducing rivers of lava all around the game play area?