Supertanker
April 22, 2008
Virtual Worlds
Designing and implementing virtual video game worlds with modern video game engines.
You are in a room. It appears to be a warehouse of sorts, and around you are various objects such as crates, pipes, and barrels. Sunlight filters through grimy skylights set in the aging wood ceiling. With nothing else to do, you decide to start exploring.
Suddenly, the lights go out, leaving the dim illumination from the windows as your only source of light. Spooky music begins to wail quietly in the background. Without warning, a zombie jumps out from behind the nearest box and attacks you! Before you can attack it, the zombie kills you. Game over.
Such scenes are commonplace in video game levels. Virtual rooms and even entire worlds such as the ones outlined above provide an arena for players to guide their virtual counterparts through complex environments filled with puzzles and traps. But have you ever thought about how these maps are created? How video games create the illusion that there is really 'something else' beyond the walls of the level? How does the zombie "know" when to jump and attack you at the perfect moment, every time you play the game?
Creating a map for a video game is no trivial task, especially if it is part of a large single player storyline. A single video game level (which may be as small as a single room or as large as an entire city--or larger) has many different assets and resources that need to be manipulated into a final map ready for the game. In this essay, I will attempt to go over the basics of what video game gurus call "mapping" for a video game (A fancy term for the act of creating a level or set of levels for a game), and will show you the steps I took to implement my current map, Station15.
Notes about terminology: I will often in this essay refer to a 'map', 'level', or 'arena'. These terms all refer to the area a virtual player travels through in a video game and can be used interchangeably. A 'mapper' is a person who creates maps for a video game. A 'player' generally refers to either the person controlling the video game or the viewpoint of the person 'inside' the video game. To eliminate confusion, I will use the term 'virtual player' to apply to the player 'inside' the game and 'player' for the person outside the game. Lastly, 'feeling' and 'atmosphere' I may use interchangeably, depending on the context. I will generally use the term 'atmosphere' in relation to the map and 'feeling' in relation to the player.
Look around you. What do you see? What do you hear?
We receive information about the world through our 5 senses: sight, smell, touch, hearing, and tasting. We see the shape and color of a door in front of us, we can smell fresh paint on a building, we can feel the texture of tree bark, we can hear the soft whine of a computer hard drive, and we taste food. With these 5 senses we can (usually) create a fairly accurate sense of the world around us.
In a video game, we don't have the advantages (yet) of addressing a player's sense of smell, touch, or sight. As a result, we have three main tools with which to craft an environment for the player: sight, sound, and illusion.
Using these two tools, we can craft the most powerful aspect of the map: atmosphere. Atmosphere is how the level 'feels' to the player. A level with a dark and dank atmosphere, one that gives the appearance of being ill-maintained might make the player feel fear, while a well lit and maintained area may make the player feel relieved or even overconfident, once they are in 'familiar', 'human' surroundings.
Although they are not quite as well-defined as graphics or sound (And, in fact, can utilize either of the previous two tools), illusions are also very important in creating an atmospheric level. Properly using illusions, a mapper can make the player feel like there is a world beyond the level that the player is running through.
You slowly creep through the swamp at night. The water around your waist is black and oily looking. Around you, visibility is limited to a few feet; a thick, swirling fog obscures your vision beyond. A light rain is falling through the leaves of the tall, ancient, alien trees around you. The vegetation around you is strange, alien, colored in a way that no proper plant on Earth would be colored.
A shape looms out of the fog ahead of you.
The butterflies that were in your stomach increase their antics. You carefully creep forward, looking carefully for any sign of movement.
The shape swirls and resolves into a large UNSC drop ship that has crashed into the hillside ahead of you.
You heart starts beating again. You hurry forward to check for survivors...
The main tools of the trade for a mapper are the graphics. By manipulating shapes, colors, and textures, it is possible to create almost anything imaginable. Manipulating a simple cylinder could result in something as simple as a pipe or complex as a fusion reactor core. Adding effects such as fog, sparks, and rain can make a level feel much more realistic and adds atmosphere to the level.
A mapper has complete control over the shape of just about everything in the level. By carefully manipulating shapes, it is possible to craft feelings in the player as well. A straight walled corridor, crafted of gray plate metal and lined with pipes and cables, could easily belong to a human spacecraft or industrial facility. Make the walls curved, give the metal an odd, unnatural color such as blue or purple, and the corridor quickly becomes strange and alien. A player might begin to feel nervous or afraid in an odd environment. When he/she returns to the familiar confines of the human ship, the player may feel relief. This crafting of emotions is one of the keys to atmosphere.
Adding effects such as fog can induce fear in the player, making a level seem more oppressive and dank. Poor lighting can cause the same emotion in players. A player can feel relief, when he/she steps out of a dark tunnel into the sunlight.
Also note that the contents of an room can have an effect on the atmosphere of a level. A room filled with nuclear waste barrels may make a player nervous, while an empty room may make the player slightly anxious, wondering "What used to be here?"
After a moment of deliberation, you decide to enter the strange gray archway into the hillside. Unlike the rest of the graceful architecture on this strange, alien world, this arch is vaguely arachnid shaped, flanked by two powerful spotlights mounted in the hillside. You carefully step inside.
Once inside, you start to walk down the gently downward-sloping tunnel. The constant sound of the gentle pit-pat of rain suddenly cuts off, as if someone or something just threw a switch. The newfound silence is oppressive and unnerving. Carefully, you back into the structure, making sure none of the aliens are following you.
Suddenly, you hear a loud click! behind you, followed by a soft whirring noise. You spin around, hand on your weapon.
In the middle of the large, gray room, a glass-floored elevator platform softly rises from an open pit in the floor between two large support columns.
You carefully step onto the platform, and look down through the glass. There is nothing supporting the elevator, and you can see the shaft extend downwards until it disappears into fog. You quietly gulp and them touch the holographic control panel near one of the giant support pillars.
With another drawn out whiirrrr the elevator begins to rapidly plunge into the depths of the alien structure in the swamp.
The silence grows even more oppressing...
Although often noticed, sounds can be as powerful as visual effects when creating an atmospheric level. Sounds such as rain, or the soft engine whir of a space ship, provide a setting for the player to identify with. Localized sounds such as alarms, or the hiss of steam through a pipe, are used to add atmosphere to particular areas of the map. The absence of sound, as described in the story above, can make a level seem ominous and foreboding.
You're wandering through the aging industrial complex when you happen to look out a window. Outside, you spot other low industrial buildings, all in a similar state of disrepair. In the distance, you see the tall, graceful spires of the city skyscrapers. The map is so realistic you actually feel as if you are in a city.
You're not.
If the player were to somehow get out of the 'playable' area of the map (the area that the virtual player stays in while the storyline progresses), the illusion would be quickly shattered.
Instead of venturing into a city that appears as detailed as it did from the window in the building, the player would find himself wandering around in a forest of flat planes that appeared to have an image of a building on them. And if the player tried reaching the spires of the 'city', he or she might find that no matter how long the virtual player moves towards the city spires, they never come nearer. The reason?
They're carefully crafted illusions.
In the real world, we are surrounded by an infinite amount of detail. Outside the window of your home or office is an entire world of people and objects, all moving and interacting. And beyond that is a galaxy that might just be filled with millions of planets just like ours. And beyond that is an entire universe that could be filled with millions of galaxies just like ours that could be filled with millions of planets just like ours. And so on...
In a video game, a mapper cannot make a map as large and detailed as in real life. Complex and detailed as the most beautiful maps may seem to be, as realistic and gigantic as they appear, all video game maps are most definitely finite. If a mapper tried to create a 1-to-1 exact replica of a city, while mapping every building and object in the city, the map would overload even the most powerful hardware.
Instead of trying to create a fully accurate replica of a city, a mapper implies that outside the playable area of the map is a living, breathing world full of people. This is one of the keys of mapping. When playing a video game, you see what the mapper wants you to see. In order to create a believable level, the mapper must work hard to create the illusion of a world beyond that which the player sees.