Designing the Level
From this chapter on to the end of this book, you’ll be actively working on creating a point-and-click adventure game. We’ll show you the necessary steps to create a game in which you’ll place and command a character whose name is Clara. Players will be controlling her actions inside a cave that will be initially dark, but you’ll be able to give controls to the player to change the conditions of the lights. Once you figure out how to move her around in the world, you’ll also place trigger points in this cave so that the world reacts to Clara’s actions to make things interesting but also challenging. This part of this book will cover enough basic building blocks for you to start practicing building small-scale adventure games.
Through all these efforts, you’ll learn how to utilize different parts of Godot Engine, especially the ones that are pertinent to 3D workflow. Whenever it’s necessary, we’ll remind you of the previous chapters, where you can revisit some of the basic principles. This is because this part of this book will heavily rely on practical applications of what we have presented so far.
With that said, as every game has a narrative; this is ours:
“It was no more than a fortnight ago when Clara’s uncle had sent for her. Clara was sailing her boat to the coordinates her uncle gave her when she noticed a glimmer in the distance. After she carefully approached the spot where she noticed the flash, she saw that this was the entrance to a cave under the cliffs of a rock formation jutting out of the sea. She cautiously maneuvered the sails on her boat and entered the cave without a hitch. Luckily, there was enough sunlight for her to see a pier and she anchored the boat. She’s excited to visit her uncle.”
Although there is a lot to do, from adjusting the lights in a cave environment to triggering sound and animations, we should start building the world first. That’s what this chapter is about.
We’ll start by composing a scene by placing models from the project folder. This kind of scene structure, where the players experience a particular part of the game world, is often called a level and often signifies different levels of difficulty or a distinctive environment.
While we are arranging assets to build a level, we’ll look into creating and fixing materials in Godot since, sometimes, some things are not perfectly transferred between applications. Chapter 6, Exporting Blender Assets, and Chapter 7, Importing Blender Assets into Godot, covered the intricacies of how exchanging information between Godot and Blender works if you need a refresher.
Although manually laying things out to create a level is alright, we could always benefit from using tools that will make this kind of job easier on us. Godot’s GridMap is the right tool for placing objects on a grid structure. For GridMap to work, it needs another Godot mechanism called a MeshLibrary. We’ll show you how to construct one and use it as an alternative way of building levels.
In this chapter, we will cover the following topics:
- Creating the cave
- Constructing the missing materials
- Laying models on a grid
- Taking advantage of MeshLibrary
In the end, we’ll craft a level by arranging scenes/models, completing missing materials, and taking advantage of GridMap and MeshLibrary for a faster workflow. By doing this, you’ll have the right tools under your belt to design levels.