Game Engine Tools
With Godot 4.6
by Brendon Thiede
Student Goals
- Understand nodes + scenes
- Run a 2D platformer project in Godot
- Add animation, score, and a win message
Icebreaker
What is a game mechanic you love?
(jumping, gems, power-ups, dash, double-jump, etc.)
What is a Game Engine?
- It helps you build games faster
- It handles rendering, input, and physics
- You still choose the rules (your code)
Today's Project
A tiny 2D platformer
- You can move + jump
- Gems disappear when touched
- No score yet
- Character looks idle all the time (for now)
Godot Mental Model
- A scene is a saved bundle of nodes
- A node is a single game object/feature
- Nodes form a tree
- Scripts attach to nodes to add behavior
Common 2D Node Types
- Sprite2D / AnimatedSprite2D
- CharacterBody2D (player movement)
- Area2D (pickups like gems)
- CollisionShape2D (hitboxes)
- CanvasLayer + Label (UI)
Setup
- Open the web editor
- Import the starter project zip
- Press Play
Web editor: https://editor.godotengine.org/releases/latest/
Starter Project Checklist
- Player can move left/right
- Player can jump
- Gems disappear on touch
Physics (Quick)
- Gravity pulls you down
- Collision shapes decide what can touch
- CharacterBody2D helps with movement on the ground
Gems
- Gems are usually an Area2D
- On contact: remove the gem
- Today: we'll add scoring on top
Mission 1
Switch animations
- Idle when not moving
- Move when running
- Jump when in the air
Changing Animations
Think: velocity + "on the floor"
if not is_on_floor():
animated_sprite.play("jump")
elif abs(velocity.x) > 1:
animated_sprite.play("move")
else:
animated_sprite.play("idle")
Names may differ in your project. Follow the starter code.
Mission 2
Flip direction
- Face right when moving right
- Face left when moving left
Flipping the Sprite
if velocity.x > 0:
animated_sprite.flip_h = false
elif velocity.x < 0:
animated_sprite.flip_h = true
What happens if velocity.x is 0?
Mission 3
Add scoring
- Create a score variable
- When a gem is collected: +1
- Update a UI label
Updating Score
score += 1
score_label.text = "Score: " + str(score)
If Time
Winner message
- Track gems remaining
- When zero: show "You win!"
Debugging Tips
- Read the error message (it tells you the file + line)
- Print values to learn what the game is doing
- Change one thing at a time
Wrap-Up
- Nodes build scenes
- Scripts control behavior
- Physics makes movement feel real
- Make it your own with assets, mechanics, and story
Next Steps
Add enemies, sound, and new levels!