๐ŸŽฎ My First Defold Game ยท Episode 4 of 6 ยท See All Episodes
๐Ÿš€ Episode 4 ยท Bullets ยท Spawning ยท Waves

Space Shooter
Vertical Shooter in Defold

Build a vertical space shooter with bullet spawning, enemy waves, power-ups and particle effects. Learn factory spawning and dynamic creation!

๐Ÿ‘ถ Ages 10+โฑ๏ธ ~1.5 Hours๐ŸŽฎ Defoldโœ“ Free
๐Ÿ”ซ Factory Spawning๐ŸŒŠ Wave System๐Ÿ’ฅ Particlesโšก Power-ups๐Ÿ“ฆ Dynamic Objects๐Ÿ”„ Object Pooling
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress0 / 10 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-shooter-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 Shooter 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 ship shooting waves of enemies
๐ŸŽ‰๐Ÿš€๐Ÿ’ฅ๐ŸŽŠ๐Ÿ†
You Built a Space Shooter!

Amazing, you've made a complete space shooter with factory spawning, enemy waves, bullets, power-ups, particles and sound!

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐Ÿงฉ Episode 5: Puzzle Match โ†’โญ 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