Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning AWS Lumberyard Game Development

You're reading from  Learning AWS Lumberyard Game Development

Product type Book
Published in Oct 2016
Publisher Packt
ISBN-13 9781786460868
Pages 268 pages
Edition 1st Edition
Languages
Author (1):
Dr. Edward Lavieri Dr. Edward Lavieri
Profile icon Dr. Edward Lavieri

Table of Contents (18) Chapters

Learning AWS Lumberyard Game Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Welcome to the Lumberyard 2. Planning Your Game in the Lumberyard 3. Constructing an Immersive 3D Game World 4. Creating 3D Characters 5. Animating Your Characters 6. Creating Gameplay 7. Creating Multiplayer Gameplay 8. Bringing Your Game to Life with Audio and Sound Effects 9. Employing Cloud Computing and Storage 10. Engaging With Users Using Twitch 11. Providing Your Game to the World 12. Stretching Your Lumberyard Wings

Chapter 3.  Constructing an Immersive 3D Game World

In the previous chapter, we defined our game's design. Specifically, we documented the game world we want to create, the player-characters, the non-player-characters, the game objects, gameplay, and our immersion plan. Throughout the remainder of this book, we will make those plans come to life. We'll start with the creation of our game world. That is the focus of this chapter.

Our game world, also known as the game environment, will have several key features to include, such as trees, rivers, hills, mountains, light sources, and shadows. And, in order to test our game, we will create a player-character and a camera.

The concept of immersion is important to grasp. An immersion plan is typically part of a game's design documentation. This might not be a formal part of a document, but it is an overarching consideration. We want players to immerse themselves in our game, also referred to as losing themselves in the game. To achieve this level...

Your first level


Most games are made up of several levels. Using levels in our games gives us the opportunity to nicely organize our game assets. How levels are implemented depends on the individual game. Levels might be progressive in nature with increasing difficulty. Levels might also simply contain different areas of the overall game world. In some games, the player can travel between levels at will, while others require specific in-game achievements before additional levels are unlocked.

Lumberyard uses levels to organize game projects. Using the following steps, we will create a new game level. Once our level is created, we'll modify and configure it for our game:

  1. Launch the Lumberyard Editor. Remember, Lumberyard is a large program and could take longer to load than you are accustomed to with other software packages.

  2. When the Welcome to Lumberyard Editor dialog window appears, select the New level button. On subsequent launches of the editor, you will simply select your level to open...

Creating terrain


Terrain is the surface area of our game world. It will consist of the ground, mountains, water, and other earthly features. Careful planning is recommended when determining how the terrain will look. Your game's players will be fully exposed to what you create and will want to be impressed. If you are making a combat game set in the modern world, having purple grass and trees with feathers might not make sense. Our goal with our terrain is to have it support immersion and not be a distraction.

We'll start by creating terrain texture layers and then assigning materials to those layers.

Creating terrain texture layers

Follow these steps to first create, and then create textures for, the terrain:

  1. Using the pull-down menus, select View | Open View Pane | Material Editor.

  2. Leave the Material Editor window open and select View | Open View Pane | Terrain Texture Layers.

  3. In the Terrain Texture Layers window, click the Add Layer option three times. We will create three different textures...

Configuring the game world


Now that our terrain textures are set, we can begin to make our game world look more appealing. We'll accomplish this by adding colored textures to our terrain, adding vegetation throughout the world, sculpting segments of the terrain to create hills and mountains, and adding a water feature.

Lumberyard offers a lot of flexibility in creating game worlds. We can create our own blank heightmap as we did in the previous section, import a heightmap, apply textures, and use virtual brushes to paint our world.

Adding color

In this section, we will look at two ways to add color to our world. First, we will paint colors onto our terrain with virtual brushes. Then, we will add vegetation to add additional realism and color.

Note

You can and should experiment with the functionality described in this section until you feel confident with it. The completed level file will be available to download on the book's website.

Painting our terrain

The steps required to paint textures onto...

Playing Mother Nature


In order to create an immersive game experience for our players, we will add some environmental effects to make the world seem more real. In this section, we will add fog, shadows, and sunlight.

Adding fog

There are several things we can do with fog. We can add it to the entire world, certain areas, and just above water. We will use Global Fog using the Time of Day functionality.

Using the pull-down menus, select Terrain | Time of Day. This evokes the Time of Day editor:

  1. Under Time of Day Tasks, click the Toggle Advanced Properties link:

  2. You will now see a host of settings listed under Parameters in the rightmost column. You can experiment with these in a test level. For now, accept all the options and close the Time of Day editor.

Note

You can learn more about fog in the Lumberyard documentation: http://docs.aws.amazon.com/lumberyard/latest/userguide/weather-fog-volumes.html.

Adding shadows

We know that sources of light can cast shadows. The source can be the sun, a moon...

Testing your environment using Game Mode


So far, we have accomplished a lot and have several features in our game environment. We have examined our world through the Viewport. The real test is to see and experience our world as a player would when playing our game.

In order to test our game, we will need to add a camera. We'll do that in the next section.

Adding a camera

In this section, we will add and configure a camera. Cameras in games are how the player sees the game world. Think of the lens of the camera as the player's eyes. Let's start working on our camera:

  1. Using the pulldown menu, select View | Open View Pane | Database View. This will result in the Database View window being displayed. As you can see in the following screenshot, there are tabs for Entity Library, Prefabs Library, Vegetation, Particles, and GameTokens. There are several icons displayed:

    Note

    The preceding screenshot shows the Entity Library tab. The Database View interface changes with each of the five tabs.

  2. In the...

Summary


In this chapter, we created our game world and made several additions and modifications to help make the game world come alive. Our goal was to create an immersive environment that our players will appreciate. Specifically, we applied colored textures to our terrain, added vegetation, and used sculpting to create hills and mountains. We also created lights and shadows using the Time of Day editor. We added a river to give our world an added bit of realism.

Our final accomplishment in the chapter was to test our game world in Game Mode. To enable this, we created a player controller with a camera and input controls. After putting our level in Game Mode, we were able to control the player-character and travel in our game world.

In the next chapter, we will focus on 3D characters. So far, we have only used the robot character that came with Lumberyard. We will look at two other options for player-characters. First, we will create our own 3D character using Lumberyard's character tool...

lock icon The rest of the chapter is locked
You have been reading a chapter from
Learning AWS Lumberyard Game Development
Published in: Oct 2016 Publisher: Packt ISBN-13: 9781786460868
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}