Contact Us

Use the form on the right to contact us for promotional information, questions, or to join our mailing list,. 

           

123 Street Avenue, City Town, 99999

(123) 555-6789

email@address.com

 

You can set your address, phone number, email and site description in the settings tab.
Link to read me page with more information.

Devlog

Level Design pt. 1: The Illusion of Space

Matt Judge

This was originally posted 7/30/16 on Kickstarter

Hi! Today I'm gonna talk about the process of building a Lonely Star level. Let's look at the "Home" area where the demo starts-- it's a good example because it's complex, with indoor and outdoor areas and spatial illusions. First I do a few super rough sketches describing the layout and perspective of the area, including indoor and separated sections.  

Indoor zones

Indoor zones

How the level fits into the landscape

How the level fits into the landscape

You can see how, with an open outdoor area like this, the central layout of buildings and the boundaries of the level are often figured out separately. It's weird, even psychologically disconcerting, to realize that when you're offering the player the illusion of freedom, what you're really doing is figuring out how to trap them in your world without them noticing, or escaping, or even wanting to escape. Renee Nejo described it as building a prison for the player. It's hard to look at game worlds the same way once you've built one.  

(Can I digress here for a second? Hiding these boundaries is important. The player should never be prevented from going somewhere they want to go by an obstacle that they could easily pass in real life. You've all probably stepped off a tiny ledge in a video game, only to discover that you can't get back up, just because the game doesn't have a jump button. A surmountable obstacle in the right place piques the player's interest, gives them something to do, and distracts from the arbitrary insurmountable obstacles on the edge of the game world. )

After sketching I make any new tile graphics that the new area requires. Tiles are for unchanging graphics like floors and walls-- particularly anything I know will be either always behind, or always in front of, the moving objects (e.g. the player character, enemies, animals). The engine I'm using, Game Maker, is pretty ubiquitous in 2D indie games-- Hyper Light Drifter, Hotline Miami, and Spelunky all use it-- in part because it's well equipped to deal with these very problems. Tiles are organized into layers of different depths; tiles with lower depth than the player's character will appear in front of them, tiles with higher depth will appear behind. Here's how the layers look in the Game Maker level editor:  

This is a 2D game with an illusion of 3D space, so things get even trickier. It's a lot like building theater sets. (Remember the opera house in Final Fantasy, where the stage flats look and function exactly like the "real" castles in the game world?)  

The player can't be allowed to move into the space behind some of these tiles, either because that space doesn't actually exist, or because letting them go there would obscure the action. But by making the "stage flats" big enough that the player can step partially behind them, the 3D illusion is preserved. And though the player gets that it isn't quite realistic, I can show them the rules of the game on an intuitive, unconscious level, just by being consistent in the way I depict things.  

For example, when the player really can move behind a large object, it turns transparent when they're on the other side of it. That also lets them see whether an enemy is hiding behind it!  

Objects are distinct from tiles; they're things that the player needs to able to maneuver freely around, like the pillars and the still here, or the semi truck pictured above. Freely intermixing tiles and objects does a lot to convince the player that they're moving through space in a realistic way.  

Here are the tiles vs. the objects in the level editor. Some things, like the pillars, are part-tile and part-object, so that I can increase their heights with tiles without having to make new object graphics for every possible size they could be. In the object view, you can also see the invisible architecture of the level. Those transparent red and blue boxes define where the player really can move, and you'll notice that they don't always line up where you'd expect, but the result feels right when the player interacts with it.

While I'm building the level, I constantly reference the original sketches to keep proportions in check. I usually keep the level editor zoomed in to actual size, because it helps me keep track of what the player will see on the screen at any given moment, and gives me a reference point for the size of things relative to people.  

Here's another kind of invisible architecture-- a "fall," which is a wall with built-in gravity. It can be disorienting to try to build this stuff in a way that neither looks nor behaves unnaturally. The player can never be allowed to fall off the north side of something, because "north," "up," and "uphill" are all the same thing behind the scenes.  

To help with the illusion of space, I built a special kind of isometric fall, one that can function as either a "wall" or a "fall" depending on the direction the player's coming from. It's kind of hard to explain, so let me just show you:  

Here's how it's supposed to work. But if I disable the line of code that makes this object distinct...  

...the player plunges through non-Euclidean space like a hapless explorer in a Lovecraft story. There's not a shred of true 3D functionality in this game; it's 100% optical illusion.