Monday, March 30, 2009

Level Design Primer: S-Curve Variations

Monday, March 30, 2009
Level Design Primer is an introduction to the high level concepts of first person shooter level layout and design.
As to credentials: for two years I built the majority of levels for the forthcoming single player FPS title Darkest of Days. Anything written here is backed by my own experience and observation from building and playtesting.

Virtually all levels are about basic spatial progression, getting from the start to the finish alive. The job of a level designer is to make that progression as varied, interesting, and worthwhile as you can. Or as I like to think of the work: your job is giving the player an idea and make him think it was his. The better immersed he is in your world, the more he believes it to be his.

With this introductory primer, we'll be looking at some basics of path layout, high-level approaches that keep even a linear path interesting to most players if handled well.

1. The S-Curve
One of the single best guiding design principles for single player level design layout is the s-curve. The s-curve is central because it is the intersection of a variety of desirable qualities: ease of navigation, visual fidelity, interest and surprise. As a guiding high-level concept it will not make a level for you (nothing will), but it will enrich every level that it is incorporated into.

An example scene built in Far Cry 2 on a straight line. While this scene is fairly well composed visually, the path ahead is devoid of surprise. The player can see all three buildings on either side of the street plainly.
Starting out on a straight street or forest path with everything visible from the starting point makes traversing the space a chore; there are no surprises, it is merely ground to be covered.

Take the same path and introduce a slight s-curve. While the direction of travel is still clear, now portions of the path are occluded. Which makes for natural cover placement, enemy placement, or other points of interest. Now introduce vertical variation as well, and there is yet more occlusion as well as potential elements for vertical play. (This helps with the design maxim well understood by Valve that we'll get to later, which is that "players never look up.")

The same scene with a slight s-curve. The left portion of the street now "opens up" to the player, drawing his interest, while at the same time the middle right side of the street is occluded--to find out what's there, he's going to have to go down the street. Two sides of the bridge are now visible, making it more attractive as an endpoint as well. Where the player is standing is also slightly higher than the riverbank at the bridge, introducing more visual interest.
While only a brief sketch, we see how much more "opened up" the very slightly s-curved street layout makes the scene. This works hand in hand with "keeping it wide," another crucial level design maxim.

2. The Kinked Line
Take a soft s-curve and twist it around a bit more and you have what I call a kinked line. Like a garden hose held in hand, it restricts and slows down the flow of play in ways that can provide interesting variations, or opportunity for ambushes and the like. Hold a garden hose too tightly and the water stops completely, but held carefully and the flow can be manipulated. It helps creates more interest points in the path with reversals of direction, even if the overall direction of travel is still forward.

A benefit is that previous or later segments of the line can be made visible to the player, providing visual interest and incentive to continue, as well as helpful visual landmarks.
Kinked lines are quite regularly employed in linear games with real-world settings, since a kinked line or broken grid (see below) progression circumventing "normal" course of travel is accounted for.
The majority of the level paths in Left 4 Dead, for example, can be considered kinked line-style layouts.

3. The Stacked Line
Coil the player path even tighter than a kinked line and you get a stacked line. Like a ropey coil of intestines, the stacked line provides maximal travel time over the smallest area. It is useful for restricting player movement even further, for mood or practical reasons, or maximizing unexpected corners. With environmental density often at a premium, a stacked line can provide a "high value" area for production (though be warned that the player may not share your same estimation of "value.").

Anyone who has been to Disney World has seen stacked lines managed ingeniously--a large room might be used as the foyer to a ride. Yet instead of revealing that the entire room is filled with people waiting for the ride, partitions are introduced, blind corners, stacking the line in a coil which maximizes the room space without alerting any one segment of the line to the rest of it. Done poorly and the patron (or player) will realize what is being done and will be impatient, possibly indignant about the deception. Done well, and the subterfuge is invisible.

Stacked line sequences can be used as a "cool down," puzzle, or other severe restriction on the relative speed of player progression through the world, since the high frequency of 180 degree turns give them a maze-like quality. These must be employed rarely and with great care; perhaps one of the most notable examples of this layout style is the Nova Prospekt sequence in Half-Life 2. A number of levels from that game end up in this category, given that space is more of a premium and the largely corridor-based environments lent themselves well to this style.

4. Broken Grid
A classic level design form is what I call a broken grid, which is simply an interrupted grid with a snaking path or paths through it.

An area is devised along a grid--a city block, a warehouse interior, a colonnade--and then is "broken" so that the grid is only traversible in a modified path, though the grid itself is intelligible. This could be a deathmatch arena, with the breaks simply to provide cover and unique features, or more typically just a form for a single player linear path. The path is still variations on s-curves, but the player appears to be traveling through a grid (though not at all in a gride-like fashion). A broken grid is one of the easiest methods for creating an interesting or potentially multi-path area to progress.

A superlative example of broken grid-style layout on a larger scale would be Silent Hill 2. While the town of Silent Hill itself is shown on the map as a normal grid of streets, the player comes into contact with walls, fences, or gorges that break the grid in challenging ways. While the structure of the town and the basic path seems clear (and visible on the map), the complicating elements provide challenge where there would be little to none otherwise, and are dynamically marked on the map by the player's character.

All these examples may seem simple, but the strength of s-curves applied all throughout the many stages of level design work will eliminate many common problems relating to player confusion or slack time. When the world itself, devoid of items and enemies, is rich and appealing to navigate on its own, you are far less likely to have problems elsewhere.


Johnnyburn said...

Nice example with the Far Cry 2 level. Straight lines are boring for all the reasons you mentioned.

jeffdr said...



Fraser said...

Now that I've read about it, I can see S-curve variations and sawteeth everywhere I look. Great work! I hope you continue this level design primer series. I'll be reading!

Sam C said...

'This works hand in hand with "keeping it wide," another crucial level design maxim.'

Can you explain exactly what you mean by 'keeping it wide'? Is it trying to keep the player from feeling trapped on a linear path, while still funneling them in the right direction? Or am I off base?

gauss said...

Fraser: thanks man--it'll take a while but I'll keep on them.

Sam C: "keeping it wide" definitely works in a larger sense, as far as not boxing in a player on the overall path--but it's also works on a smaller scale.
If you read the "refrigerator box" post (very first posted), you'll see what I mean when FPS players are much bigger in the world than they think they are, and will constantly feel like they're bumping into stuff like an elephant if you build rooms/hallways/etc exactly to scale.
It's a little better than it used to be, but definitely still a problem. "Keeping it wide," in this context, refers to relaxing out the proportions of things so that the player has a lot of room to maneuver. Especially as FPS games are about running, jumping, moving to maneuver or melee enemies, it's a good policy not to be strictly realistic (which is to say, space-restrictive) with layouts. A player with room to maneuver is a happy player.

S e y 1 9 9 5 said...

It's amazing how I can apply this to pretty much every 3D game I play, yet I never really thought about it before. Awesome.

Post a Comment

gausswerks: design reboot. Design by Pocket