๐ŸŽฎ My First Defold Game ยท Episode 3 of 6 ยท See All Episodes
๐Ÿฐ Episode 3 ยท Tilemaps ยท Enemies ยท Health

Dungeon Crawler
Top-Down Adventure in Defold

Create a top-down dungeon crawler with tilemaps, enemy AI, health system and multiple rooms. Learn collections and tilemap collision!

๐Ÿ‘ถ Ages 10+โฑ๏ธ ~2 Hours๐ŸŽฎ Defoldโœ“ Free
๐ŸŽจ Tilemaps๐Ÿ‘พ Enemy AIโค๏ธ Health๐Ÿ“ฆ Collections๐Ÿšช Room Transitionsโš”๏ธ Combat
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress0 / 11 steps
Build it in our Defold Studio too: lay out your scene, add real Lua scripts and export a Defold project in the browser, with no install. Open the Defold Mod Studio →
๐Ÿ“ฆ
Reference project files: download the finished Defold files used in this workshop: โฌ‡ defold-dungeon-reference.zip. Every code block also has a Copy button.
๐Ÿ’ป
How to run: Open Defold and load your project, then press Ctrl+B to build and run!
๐ŸŒ
How it works: write the code in each step, and the canvas on the right shows what your code does. It is a live preview that builds the game as you go, so you can play every step along the way. Type to see it update, or press Apply to Canvas to test it straight away.
๐ŸฆŠ
Lumo says: every step adds one feature to the same game. Type a little, click Apply to Canvas, and play it straight away. There is no wrong answer you can't undo.

Build Dungeon Step by Step

Each step adds one feature. Write the code, watch it come alive in the canvas, then make it your own.

Step 1 / 6
A hero exploring a dungeon
๐ŸŽ‰๐Ÿฐโš”๏ธ๐ŸŽŠ๐Ÿ†
You Built a Dungeon Crawler!

Amazing, you've made a complete dungeon crawler with tilemaps, enemy AI, combat, health, items and boss battles!

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐Ÿš€ Episode 4: Space Shooter โ†’โญ View My Progress
๐Ÿงฉ
Code Order: Defold Lua Update
+20 XP
Drag these Lua lines into the correct order for a Defold update function that moves a game object.
local pos = go.get_position()
function update(self, dt)
go.set_position(pos)
if self.moving_right then
    pos.x = pos.x + self.speed * dt
end