# Discovering Godot - The Game Engine You've Been Waiting For
Section 4 - Heist Meisters
This is GameDev.tv's guide to the free and open source Godot game engine. Learn the free to use, free to modify, free to create engine with one of the most successful online game develeopment educational groups out there.
You're welcome to download, fork or do whatever else legal with all the files! The real value is in our huge, high-quality online tutorials that accompany this repo.
reate a tense and dramatic top-down stealth game while you learn more advanced Godot techniques! (Our ref: HM_GDT)
This is a Godot project. If you're familiar with source control, then "clone this repo". Otherwise download the contents and place them in your projects folder, then import the project in Godot's launcher.
This branch is the course branch, each commit corresponds to a lecture in the course. The current state is our latest progress.
Here are the lectures of the course for this section...
1 Discuss the game we're making 2 Examine the features we'll need to create
Plan out the central mechanics and feeling of our tense, top-down stealth game!
1 Where to find the assets 2 Where to find additional Assets 3 a Quick overview of what's included
Install the assets we'll need for our game
1 Create a Character scene and script as templates
Understand how to use template scenes and scripts in your games
1 Create a Player scene that inherits from the Character scene 2 Create a Player script that extends the Character script 3 make the player character move and look at the mouse position
Inheriting scenes and extending scripts
1 Set up an Autotile to make levels creation easy 2 Add collision to our Autotile 3 Create a basic test level
Autotiles, Bitmasking and Auto-Collision
1 Set up a quick and easy tilemap for floors 2 Add floros to our level
How to work with Tilemaps and Autotiles at the same time
1 Set up a Light2D
node
2 Set up Occlusion is autotiles and characters
2 Enable shadows
How to bring dynamic lighting and shadows into a 2D game
1 Create a Security Camera 2 Correctly set up the Torch node for it 3 Add physics layers
Get the security camera in game ready for the player detection system!
1 Set up FOV 2 Calculate the npc's direction 3 Get the direction to the Player 4 Determine if the NPC can see the Player
Get the first phase of player detection set up!
1 Draw a ray from the NPC to the Player 2 Check what's intersecting the ray 3 Check if the Player is in Range
Finish off Player detection with Line of Sight and detection range
1 Create a Guard Scene that extends the PlayerDetection.gd script 2 Fix the Torch scenes 3 Populate/Recreate our level
Get some Guards!
1 Setting up Navigation2D
2 Creating a NavigationPolygonInstance
3 Using Position2D
nodes to mark destinations
Get pathfinding set up for HeistMeisters!
1 Using get_simple_path
2 Making sure that pathfinding works no matter wher we put our destinations
3 Have the guard move along a pathfinding
4 Have the guard wait at their destinations
5 Troubleshooting guards getting stuck
Have pathfinding and guard movement fully implemented
1 Setting up a Tilesheet 2 Adding Collision and Occlusion to tiles 3 Rotating Tiles
Install furniture in out level
1 Set up Nightvision
2 Use an Enum to list possible vision modes
3 Use call_group()
to change vision modes
Enable nightvision mode through enums and the amazing power of groups!
1 Set up an NPC Group
2 Use call_group()
to have all NPCs switch torches on or off as needed
Make all torches switch off when the Player is using Nightvision
1 Use an Input_event()
function to detect if a player is clicking on a door
2 Only allow players to open a door if in range
3 Set up different logic for NPCs and players using doors
4 Add sound effects to doors
Create simple doors that open if the player is in range and clicks on them!
1 Create a Numberpad as a Popup
Node
2 Use Container
nodes to organise the Numberpad
3 Use Grid Container to organise the buttons
4 Beautify the Numperpad with a Theme
Learn the wonder of Themes in Godot!
1 Fix the bug that causes all doors to open when the level loads 2 Create Locked door that inherits the Door scene and extends the Door scripts 3 Have the Numberpad popup when the player clicks on a locked door
Simple debugging techniques and how to show and hide Popup
nodes
1 Use a for
loop to get all the children of ButtonGrid
2 Connect all the buttons to the script with a signal
3 Use the text label of each button as an argument
4 Display the Player's button input
5 Check if the Player's guess is correct
Wire up the Numberpad to the Locked Door
1 Have the Locked Door open when the combination is Correct 2 Add sounds to our numberpad
Make locked doors fully functional and polished!
1 Create a node responsible for generating all combinations on a level
2 use return
to send the combination to whatever function asked for it
Take advantage of Godot's Object Orientation to make a node that generates all combinations!
1 Create a Computer Scene
2 Using find_node()
to get a node by name
4 Ask CombinationGenerator for a random combinations
5 Display that combination to the Player in a Popup
Using a returned value from one script to change the contents of another
1 Link computers to individual or multiple locked doors 2 Allow locked doors to open if the player approaches a specific side
Use signals with an argument to set the combination of one or more locked doors at a time
1 Label Computers and Locked Doors 2 Rotate labels automatically 3 Only show labels in Nightvision mode
Turn Nightvision Mode into a strategic layer but revealing helpful information to the player
1 How to use TextureProgres
nodes
2 How to change values in the inspector and have them reflected in an already running game
Unleash the power of TextureProgress
nodes!
1 Using TextureProgress
as game logic
2 Adding stealth to our stealth game!
3 Quitting the game
Update the GUI when the NPCs see the player!
1 Implement a disguise system
2 change collision_layer
information in script
3 save and load occlusion
Fulfil your dream of hiding in a box!
1 Limit the number of disguises 2 Slow the player down when wearing a disguise 3 Have a time limit on disguises
Display a certain number of decimal places in a text field and add a cost to disguises
1 Display the number of disguises left as a number of icons 2 Update the GUI with very little code
Use ItemList
nodes to make polished GUI elements easily
1 Have loot that the player can pick up 2 Create an exit that works if the player has loot 2 Craft an Object Oriented inventory system
Create an inventory system in the SceneTree
1 Create a GUI element that only appears when it's needed 2 Show the player that they're collected loot
Finish the GUI system!
1 Load a scene as a singleton 2 Create Game Over and Victory screens
Add polish to our game with consistent background music and the ability to retry or quit the game.
1 Designing a Tutorial 2 Creating a level for a tutorial
Lay the foundations of our game's tutorial
1 Create a visual objective marker 2 Move that visual marker to a new position when needed
Understand how and when to use Tween
nodes and use a parent node as an array
1 Adding text to objectives in the tutorial 2 Using a JSON file to update the objectives
Finish the tutorial by revisiting JSON files
1 Plug the tutorial into the game 2 Fix the tutorial GUI position changing 3 Animate the tutorial GUI
Finish Heist Meisters!
1 Recap some of what we've learned 2 Look at where this project could go from here
Look at what we've learned to make this projevt happen and where we could go from here