Roguelike: Part 4: Mutations in the Dust
Add item pickups, inventory management with typed arrays, equipment stat modifiers, and permadeath progression mechanics.
No login required.
Chapter 1
Data-Driven Abilities
Now you'll add data-driven abilities using dictionaries and route their effects with match statements.
Data-driven design lets you add new abilities without changing game logic.
Loading game...
Click the game window to interact with it
What You'll Build
You will add items that spawn in the dungeon and can be picked up by the player. An inventory system tracks collected items using typed arrays. Equipment modifies player stats (damage, defense), and permadeath means losing everything on death. This part completes the core roguelike loop.
Learning Goals
- ✓Item pickup detection with groups and Area2D overlap
- ✓Typed arrays (Array[ItemData]) for inventory management
- ✓Stat modifiers: applying and removing equipment bonuses
- ✓@export variables for item balancing in the inspector
- ✓Permadeath: resetting state on game over
GDScript Concepts in This Part
GDScript Groups & Pickups PracticeMaster Godot 4 groups: add_to_group in code and editor, is_in_group filtering, call_group broadcasting, get_nodes_in_group queries. Build clean pickup and trigger systems.GDScript Arrays & Loops PracticeLearn GDScript arrays and loops in Godot 4 with game-ready patterns: iterating with indices, safe removal, sorting enemies by distance, and choosing Array vs typed vs packed arrays.GDScript Exports Practice@export, @export_range, @export_flags, typed vars. Tune your game from the Inspector without touching code.
Tips
- ✨Define items as Resource subclasses so they are reusable, inspector-editable, and easy to serialize.
- ✨Use groups to tag pickup nodes — check is_in_group("items") when the player overlaps an Area2D.