How to Design a Horror Game in Godot 4

You can access the full course here: CREATE A HORROR GAME IN GODOT 4

Ready to dive into the eerie world of game development? Let’s unlock the secrets of creating a spine-chilling horror game in Godot!

Whether it’s the haunting echoes in a deserted mansion or the anxious calm of a deep forest at midnight, the environment plays a huge role in creating the intense suspense that defines the horror genre. A well-designed level can instill a sense of dread in the player, even without the presence of actual threats and within the context of just about any game genre. This tutorial will guide you through designing a spooky game level and setting the atmospheric mood for a horror game using the Godot game engine.

As we delve into this tutorial, you should ideally have basic knowledge of using Godot (no GDScript knowledge is necessary, however). Nevertheless, fear not novice developers, as the tutorial will provide you with a step-by-step guide on setting up items like grounds, lighting conditions, and obstacles to create the perfect ambiance for a horror game. In addition, you can also explore our full course, Create a Horror Game in Godot 4 which covers these concepts more in-depth.

Let’s start creating our horror game world!

Project Files

To make your learning experience more interactive and hands-on, we have included some of asset files that we’ll use during the tutorial. Make sure to download them via the link below.

Download Project Files Here
CTA Small Image
FREE COURSES AT ZENVA
LEARN GAME DEVELOPMENT, PYTHON AND MORE
ACCESS FOR FREE
AVAILABLE FOR A LIMITED TIME ONLY

Designing Our Level

In this first part, we’re going to learn how to set up our environment for a horror game. The environment in a horror game is crucial as it contributes to the tension and fear factor of the game. We’ll start by creating the ground for our player to walk on, add some lighting, and populate our world with obstacles and items.

Step 1: Creating the Ground

Firstly, we need to create some ground for our player to walk on. To do this, we’ll use a terrain model. Drag the terrain model into the level and set the position to be 0, 0, 0.

Terrain model added to Godot environment

You can also increase the scale to make the terrain bigger.

Node showing terrains position and scale

Next, apply a grass texture to the terrain by dragging in the terrain material.

Terrain model in Godot with grass material added

Step 2: Making the Ground a Static Body

After creating the ground, we need to make it a static body. Create a new node of type static body 3D and make the terrain a child of it.

StaticBody 3D node in Godot

Rename the terrain to be ‘model’ and the static body to be ‘terrain’.

Level environment with Terrain and Model nodes renamed

To allow the player to walk around, add a collider to the model.

Create Trimesh Static Body option for Terrain mesh in Godot

Step 3: Adding Lighting

At this point, we don’t have any lighting in our game – something crucial for horror games. As a temporary measure, we can give the player a basic light. In the final game, the player will be holding a lantern that emits light. As a placeholder, we can add an omni light 3D as a child node to the camera.

OmniLight3D Node in Godot

You can change the color and range of the light to suit your horror game atmosphere.

Light color changed in Godot

Horror game with lighting

Step 4: Populating the World

Now, we need to populate our horror game world with objects such as rocks and trees. When placing these objects, keep in mind the gameplay. The player will be walking around trying to find hidden items and avoiding enemies. Therefore, place the objects in such a way that they serve as obstacles and hiding spots for the player and the enemies.

Godot game scene with rocks and trees placed

In conclusion, setting up the environment in a horror game involves creating the ground, adding lighting, and populating the world with objects. Remember to design your world with the gameplay in mind. In the next section, we’ll be adding atmosphere and fog to our game to enhance the horror element.

World Environment

To continue on, we are going to take a look at how to set up an atmosphere for a horror game in Godot. We will be working on lighting, the sky, and fog settings to create an immersive and spooky environment. Let’s start by setting up the navigation mesh for our game.

Setting Up the Navigation Mesh

The first step is to select the navigation region in the Godot editor. At the top of the editor, click on ‘Bake Navigation Mesh’.

Bake NavigationMesh option in Godot

This action will bake all of the navigation meshes, allowing the game’s enemies to navigate around different objects in the game scene.

Adding a World Environment Node

Next, we need to add a world environment node in the game scene. This node allows us to change the fog, sky, and ambient lighting settings. To create a new world environment node, simply select ‘World Environment’ in the editor.

WorldEnvironment node in Godot

Then, in the inspector, create a new environment resource.

New Environment resource in Godot

Setting Up the Sky and Ambient Light

Now, let’s set up the sky and ambient light settings for our horror game. First, we need to change the background mode from ‘Clear Color’ to ‘Custom Color’, and set the color to black.

Godot WorldEnvironment with black custom color in background

This will make the sky black. However, this also changes the ambient light, which is the light that exists even when there is no other light source in the scene.

If we set the ambient light to white, everything in the scene will be visible, even the areas in shadow. On the other hand, if we set the ambient light to black, everything that is not touched by light will be black. This is how we create a dark and scary environment for our horror game.

Game Scene in Godot with horror game aesthetics for environment

Adjusting the Player’s Light

Now, we need to adjust the player’s light settings. Select the player’s ‘Omni Light 3D’ node, and increase the range to 20. Adjust the attenuation (the fall off of the light) to about 1.5, and decrease the energy to 3.

OmniLight3D settings in Godot for spookier horror atmosphere

This will create a smoother fall off for the light, and make the scene look a lot scarier.

Godot horror game with adjusted light

Adding Fog

Finally, let’s add some fog to the scene to make it more atmospheric for our horror game. Select the world environment node, and enable ‘Volumetric Fog’. This type of fog exists in 3D space, allowing the player to walk through it.

Godot WorldEnvironment node settings with volumetric fog option shown

Set the emission color to black, and the albedo (the light that is reflected off surfaces) to a dark red color. Adjust the fog density to 0.1 to make it denser.

Volumetric fog settings in the Godot WorldNode

Final Adjustments

The final step is to adjust the brightness, contrast, and saturation of the image. Enable these settings in the ‘Adjustments’ section of the environment resource. Keep the brightness at 1, increase the contrast to 1.2, and the saturation to 1.5. This will make the colors more bold and contrasting, creating a more immersive and scary environment for the player.

Adjustments settings in the WorldEnvironment Godot node

And that’s it! You have now created a spooky environment for your horror game in Godot. Feel free to tweak these settings further to suit the specific needs of your game.

Showcase of final Godot game world environment

Godot Horror Game Wrap-Up

And that brings us to the end of a thrilling journey through the essence of horror game development. With a solid understanding of level creation and atmospheric design, you’ve created a spine-chilling environment compatible with your terrifying gameplay. But, remember, the art of fear is nuanced and subjective. Don’t hesitate to experiment with these settings and add your own unique touches.

Extend your learning curve by exploring advanced topics like integrating VR elements, incorporating advanced AI for enemies, or adding intricate storytelling aspects to amplify the horror quotient. Every new concept you grasp can open up a multitude of terrifying possibilities for your horror game. Plus, with our comprehensive course, Create a Horror Game in Godot 4, you can expand the concepts touched on here even further.

So, are you ready to add some fear factor to your game development journey? Happy coding and, of course, terrifying gaming!

Did you come across any errors in this tutorial? Please let us know by completing this form and we’ll look into it!

FREE COURSES
Python Blog Image

FINAL DAYS: Unlock coding courses in Unity, Godot, Unreal, Python and more.

Transcript – Designing Our Level

Hey everyone. In this lesson, we are going to be working on setting up our environment for our horror game. Now, since we are working on a horror game and it’s meant to be tense and scary, our environment is going to be very important in order to create that experience. So first of all, we need some ground for our player to actually walk on. And for this, what we’re going to do is we are going to go down to our models folder and we here have a terrain.

Now with this, we’re just going to drag that into the level here, set the position in our transform dropdown to be 0, 0, 0, and I’m also going to increase the scale a bit. So I’m going to increase that to 1.5 just so it is a bit bigger and we have more room to run around.

We can then go down to our file system and drag in the terrain material that we have right here as well. And this is just going to apply a nice grass texture to our terrain. And then what we want to do is we want to make this a static body.

So we’re going to create a new node here of type static body 3D. We can make the terrain a child of that. I’m going to rename the terrain to be model, and I’m going to rename the static body to be terrain. Then we can select our model and we need to add a collider in order for the player to actually be able to walk around. So we’ll click on mesh and then go to create trimesh collision sibling.

And there we go. So we can save that, we can press play and see if it works. So as you can see, our player can look around, they can move, they can jump, they can sprint, they can even open up their inventory.

But right now we don’t really have any lighting or anything here. So what we’re going to do is as a temporary measure, we’re going to give the player a basic little light because in the final game, the player is going to be holding a lantern that is going to be emitting light.

So as a placeholder, let’s just open up the player scene here by double-clicking on it in the file system or clicking on the little icon right here. To open that up, we’re going to open up our player and we are just going to right-click on the camera to add child node, and we are going to search for an omni light 3D.

Now with this omni light 3D, we can click on the light dropdown. We can change the color here to maybe be something more akin to a lamp. Okay, so maybe a nice orange, something like that energy. We’ll bump that up. We’ll also bump up the range a bit as well. There we go. Now if we go back into our main scene here and press play, what you’ll notice is that there is now a nice little light around the player, but the rest of our environment doesn’t really look that good.

It looks pretty bland. Our sky box is gray. We have no obstacles, we have no trees, no rocks. So let’s fix that as well. So let’s exit out of this. And inside of our main scene here, what we’re going to do is first of all, we are going to be storing all of our terrain objects. Everything that we want to have our AI walk around or on, we are going to. Store inside of a navigation region. So we’re going to create that here.

We’re going to create a navigation region 3D, and we’re going to make our terrain a child of that. Now, on the navigation region 3D, we are going to go over to the inspector and create a brand new navigation mesh. So the reason we’re doing this is because if we want, for example, our terrain to be walkable on or a rock to be avoidable, we need to make that a child of the navigation region 3D node.

So let’s start placing down some rocks and trees.So I’m going to go into the models folder here, and you’ll see we have a rock folder. Now inside of that we have a rock scene, which we’re going to drag in. There we go. We’ve got a rock. Make sure it is a child of the navigation region 3D. Same thing for the tree. So we can open up the tree folder here and drag in the tree scene. And there we go.

Now, the next step is going to basically just be populating our world with these objects. So I’m just going to get into an overhead view here, and I’m then going to just go ahead and start copying and pasting these objects around.

Now, when it comes to designing your levels, it’s very important that you design it with the actual gameplay in mind, okay? Because remember, our game is going to involve two things. It’s going to involve the player walking around trying to find the hidden items that are placed in our level, as well as avoiding the enemies. So you need to be aware of those two things while developing your level as that is going to influence how you design it.

So what design decisions did I make for this level right here? Well, basically these rocks are going to be the main source of obstacle and sort of obscuring the enemy for the player. So behind these rocks are where we are going to place our chalices. So for example, if the player starts in the middle here, they’re not going to be able to look around and see any of them because they’re going to be behind the rocks. Now, these rocks also, provide the ability for the enemies to be hidden from the player as well.

Okay? When the player is walking around them, they might not be sure what is around the corner, okay? So even though it is an open field, there is still a lot of hiding spots for the enemies and for the items to be in, okay? And that’s what we want. We want the player to not be sure if there’s something behind the rock. And so they’ll have to then go around and look themselves. And these trees are here to just add to the atmosphere as well, and maybe as a little obstacle if the enemy is chasing after you. But the main aspect are the rocks, so they do add in as a gameplay element.

Now, what I want you to do is I want you to go ahead and design your own level as well. If you’ve got other items that you want to add, maybe you’ve got other obstacles, maybe you have an entirely different setting that you want to design, you can go ahead and do that in the next lesson.

We’ll be right back so that we can start setting up our atmosphere and our fog to make it actually look like a horror game. So thanks for watching, and I’ll see you all then in the next lesson.

Transcript – World Environment

Welcome back, everyone. In this lesson we are going to be working on setting up our atmosphere, our lighting, our sky, and our fog to make this look like an actual horror game, okay? Because right now it kind of works, it’s sort of dark, but our sky is gray. We can still sort of see stuff even though there’s no directional light acting as our sun, it needs some tweaking.

So the first thing that we’re going to do is we’re actually going to select our navigation region and at the top here we are going to click bake navigation mesh. And as you can see, it has now baked all of the nav mesh. So now our enemies, once we implement them, can navigate around everything, which is very nice.

So the next step is going to be adding in all those things I just mentioned. And for this we are going to use a world environment node. So let’s create that right here, world environment. And this basically allows us to have fog change, the sky, the ambient lighting, all those things. So on our world environment, we’re going to go to the inspector and we are going to create a new environment resource right here.

We can then open that up and you can see there is a large number of different things that we can fill out. So the first one is going to be our background, which is basically our sky. And we’re going to change the mode from clear color to custom color, and we’re going to set that to be black.

Now, when I press play, as you’ll see, everything is black. Now the reason why is because when we set the sky black, this also changes the ambient light. And the ambient light is basically the light or the intensity of the light that is there when we have no other light shining on it.

So for example, if I change the color here to be pure white and I press play, you’ll notice that everything around us is suddenly visible. And this is because everything in shadow basically uses that ambient light. And if it’s white, then that means all of the shadowed areas are going to be white. Whereas if we change the color to be black, that means everything is going to be black that is not touched by light. So that is how we’re going to create this nice scary environment.

So we also have to play a light now and automatically you can see it is already a lot scarier because we’re not sure what is out past our player’s light. And in fact, what we’re going to do is we are going to change the player’s light a tiny bit just so it has a bit more range. Okay? So we’ll select our player, select that omni light 3D, open up Omni, and change the range up to 20.

We also have the attenuation, which is basically the fall-off, and I’m just going to bring this down to about 1.5. Okay? Just so it has a more of a smoother fall off here and the energy, I’m going to bring that down to B three. Now, if you press plate, you can see now we have our light. It is going out a bit further, but it’s still dark.

Okay? You can see that we can’t quite see that far and it may be a bit hard on your monitor to see this as we are working with a dark scene here. So of course when you are working on this game, you can change those values as you wish. So there we go. Now we need another thing, and that is going to be our fog. Okay? We’re going to have a nice red fog overlaying everything here, so it looks a lot more atmospheric. So let’s go ahead and do that now.

Okay, so in our main scene here, we’re going to select our world environment. And what we’re going to do is we are going to go over to the volumetric fog. Now, volumetric fog is basically fog that exists in 3D space. Okay? Typical fog just renders your fog once it gets to a certain range on your screen, whereas volumetric fog, we can sort of walk through it and it’s a lot nicer for a game like this. So we’re going to enable that. And then we are going to change the emission color to be, we’re going to make this a nice sort of darkish red, something like that.

We are then going to go over to where we have the density and we’re going to change this to 0.1. So it’s going to be a lot denser as you can see, but there is an issue and that is, it’s kind of bright. We press play and you can see it looks like this. It’s kind of insane.

Oh, now you see we have this sort of weird lighting bug, and the reason why is because we have the player’s light in the middle of their head, which is causing an issue. So I’m going to select the omni light and I’m just going to move it forward a bit here just so it is out of the player’s view. And yeah, there you go. You can see it’s a lot nicer and we can sort of see the light source now in 3D space. But yeah, the issue here is that our sky box, not our sky box, but our fog is basically lighting up the scene, which is not what we want.

We are actually going to change the emission. We are not going to make the emission this red. Rather we’re going to make the emission black, which basically means it’s going to emit no light. And the albedo is what we’re going to make that red. Okay? So we’re going to make the albedo that red. So let’s go ahead and just get that set here. Okay, let’s find that nice deep red color, something like this. There we go. Make it a bit darker.

Okay, now the next step is going to involve changing some of the actual image properties such as the brightness, the contrast, and the saturation. So we can close down volumetric fog and go down to where we have adjustments. And this changes basically the image itself, the output image. So we’re going to enable that for brightness. We probably want to keep this at once since we don’t want to make it too bright or too dark. So we’ll just keep brightness on one.

Now for contrast, as you can see, this is what it looks like when we bump it up and we probably want some contrast. So I’m going to make this 1.2, so the image is a bit more contrasting. And then for saturation, as you can see, it basically makes the colors more saturated, more bold. We’re going to set this to be 1.5. Okay? Just so that the colors do stand out a bit more. So now we can press play and have a look at the changes. Okay?

So first of all, you’ll notice that the image looks a lot more bold because we changed those settings. We have our nice red fog, we have our light, which at the moment is just floating in midair. But in the next lesson we’ll be implementing the lamp for the player. Yeah. So feel free to tweak those world environment settings even more if you wish to adjust how your scene looks, depending on if it’s an indoor scene, an outdoor scene, or it might be a scene on another planet. You of course want to change those things relative to the game you are creating.

So have a go at that, and in the next lesson we’ll implement our player’s lamp. So our light is no longer going to be floating in midair.

Ready to take the next step? Explore our all-access plan, featuring over 300 courses, expert-led Learning Pathways, monthly new additions, and much more!