Now it's time for the exciting stuff! As we move forward with building our first project, we are going to use the design process we talked about in the last chapter and start with a level sketch. You might be tempted to just open up Unreal and jump right in, right? Why spend time drawing when I could be building that sweet level I've always wanted? Well, here's why. The best way to avoid multiple revisions and costly time spent redoing sections of your level is to plan in advance. Figure out the setting, architecture, background, and story of your level. Put some thought into where you will place story cues and power ups. Run your ideas by friends, players, and team members. Incorporate the feedback you receive and then build your level. It's the level designer's equivalent of "measure twice, cut once".
Let's take a look at our level sketch:
So here is our first level. The level itself is pretty basic. We have two rooms connected by a hallway, with some stairs that lead up to a second tier. After we finish the basic layout, we can add a cargo elevator off to the side and working doors for the player to interact with. I have tried to lay out the level in the form of a small cargo ship, to fit the theme of our science fiction horror game. The level will function as an introduction to the setting, as well as a way to transport the player to the haunted space station environment we will be building later.
In this chapter, we will be covering the following topics:
Go ahead and open Epic Games Launcher, and pull up the project we started at the end of the last chapter. Unreal Engine 4 was a huge upgrade over the last version of the engine, as it gave users a simple drag-and-drop interface. This was accomplished using two important panes in the interface: the Modes pane and the Content Browser. These portions of the interface allow level designers to drag elements into the level and place them where they need to go. Of these two, we will use the Content Browser the most:
The Content Browser holds all of the objects, sounds, materials, and particles that can be used in your creation. These are sorted into folders that mirror the file structure where your project is stored. Unreal does this to make it easy to move project files around, should the need arise. Navigating the browser is easy. Double-clicking a folder opens that folder, while the top portion of the panel displays a breadcrumb trail that can be clicked on to move back through your selections. I like to ensure that the sources panel is on as well; this makes navigation and finding specific files easier. When we created our project, we told Unreal to include the Starter Content folder. This folder includes many basics for us to get started with, such as a variety of basic shapes, architecture pieces, materials, and more. With these, we can start whiteboxing our design.
Start by creating the first room:
Hint: Moving forward, we will begin building our level in Unreal. This book assumes the reader has a basic understanding of using Unreal Engine 4. If you are having issues following along, check out the UnrealEngine channel on YouTube for some great introductory tutorials from Epic Games. It can be found at https://www.youtube.com/channel/UCBobmJyzsJ6Ll7UbfhI4iwQ/.
To start building our first room, we are going to take advantage of the assets we have in the Architecture folder. Using its selection of floors, walls, and doors, we are going to assemble the first room of our design:
x=0 y=0 z=0
. This will make it easy to line up our other pieces.At this point, I'm sure you are just dying to drop into the level and run around inside your new room. However, to test our level, we need to add a couple of things: lights and a player start. For testing purposes, let's drop in a couple of PointLights. Head over to the Modes panel on the left-hand side of the screen and drag two PointLights into your room. Again, use the 4-viewport configuration to make sure they are where you want them to be. Secondly, from the same panel, drag in a PlayerStart. The PlayerStart has an arrow sticking out from its center. That is what direction the player will be facing when they spawn. Always try to point your PlayerStart in the direction you want the player to go first. This ensures that the player is engaged from the start and can enjoy your creation with the minimum of confusion. Lastly, we need to save the file (using the File menu or Ctrl + S) and build the level using the Build button.
Testing your level while it's being constructed is an important part of the design process. Through testing, you can discover if your level has any flaws or issues and fix them before things get too complicated. To test your level, press the Play button. This will start a play session in the current viewport and allow you to run around inside your level. If you click the little down arrow next to the Play button, you will be given the option to open other types of play windows, such as the New Editor Window. It can be helpful to be able to see the whole play screen. Now test your level and make sure everything is lined up properly. Once you feel good about your first room, let's build the rest of the design:
Now let's build the hallway. We can easily build out our hallway by copying existing pieces in our level. I will also show you how to swap pieces in the level without deleting them:
This will swap the existing static mesh with the one we selected and add in that perfect-sized doorway.
Build your level and give it a test. If the hallway does not feel long enough, add a couple more sections. Once you are happy with the feel of your level so far, save your file. Now let's add the final room:
For this room, we will add some vertical elements to the design. We will also build both stairs and an elevator to access the walkways above, so let's begin:
0.7
in the green box. This will scale our floor piece in the Y axis and decrease how wide our catwalk is:15
and Step Width: 275
.For the elevator, I copied a floor piece and moved it to line up with my walkway above. I moved it up and down a few times to ensure it fit, before leaving it sitting on the floor in its down position. We will animate this piece to make the elevator work later in the chapter.
Now that we have our basic level geometry set inside the level, let's think about what other more decorative elements could be added to help reinforce the theme. Science fiction levels come in many different flavors. Some environments might be clean and simple, such as in the Star Trek universe. Others might be more industrial, with pipes and cabling everywhere, such as what we see in the Alien franchise. The aesthetics of a level can be used to reinforce the theme of an environment and communicate information to the player. In this case, we would like to reinforce the survival horror aspects. To do that, I will lean more toward an industrial style. Collecting reference art to help inspire your item placement can help you get the right feel and I strongly suggest taking a look at images online for some great examples. Remember that these props are just placeholders for art that can be created later. Ready? Let's get started with our first room:
Here is my completed whitebox of the bridge:
And my completed whitebox of the cargo bay:
Is it starting to feel more like an environment? If not, add a few more shapes or props until your level feels more natural. However, do not go too far. We want our level to have some objects in it to convey story and immerse the player in our environment. We don't want to overcrowd the level and have it feel clunky and cluttered. Take some time to add some detail to the hallway and the second room. In the next section, we will take a look at techniques to light our level with our theme in mind.
3.12.163.175