Looting! Module overview
- Detect mouse input with
Area2D
nodes: The mouse entering and exiting the area, and clicking over the area. You will reuse this in mobile games, point-and-click adventures, RPGs, and more. - Use a provided shader asset and change its values to show the chest is interactable on hover.
- Use "onready" variables to store references to nodes.
- Use the
@export
annotation to export script variables to the Inspector and easily change their value.
- The
_input_event()
function Godot provides to check clicks over collision shapes. - The
mouse_entered
andmouse_exited
signals to know when the cursor enters or leaves an area.
Tweens are code-driven animations we use to change a value over time.Tween Glossary Entry
Download the project files
On MacOS, you currently need to download Godot 4.3 separately
Open and review the workbook for this module
TileMap
used to draw the dungeon, the pillar sprites, and the torches hung on the wall.Node2D
, a node with a position, rotation, and scale in the 2D space. We use it to group all the background nodes together and keep the scene organized.Will we learn to make environments like this in the course?Yes! Later in the course, we will have lessons dedicated to setting up a tileset and using it to draw your own level. We limit the number of concepts taught in each module to spread the load and build important gamedev and Godot concepts on top of one another. That's why tilesets and tilemaps will come later.
mini_dungeon.tscn
scene file. It's the project's main scene, the scene that runs when pressing f5 (on Mac: ⌘b), which is open in the viewport by default. You will also find two directories for the chest and the items.group_outline.gdshader
. This shader draws an outline around sprites, and we'll see how to use it in the next lesson.
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.