Uploaded January 2023 | Updated December 2026, 3 hours ago
In this video, I go step by step in teaching you how to make a metrodivania/platformer game similar to my game "The King's Dungeon" for the Playdate SDK using Lua.
- Github Repo for this project: github.com/SquidGodDev/MetroidvaniaTutorial
- LDtk: ldtk.io
- Playdate LDtk Importer Library: github.com/NicMagnier/PlaydateLDtkImporter
- Animated Sprite Library: github.com/Whitebrim/AnimatedSprite
- Diff Checker: diffchecker.com
This is an intermediate/advanced tutorial. Some recommended resources before watching this video:
*No experience programming*
- Learn to Program for Playdate Game Dev! Part 1/2: youtu.be/C4o7n0LNQhA
- The Beginner's Guide to Lua for Game Development: Getting Started From Zero: squidgod.itch.io/lua-for-game-development
*Playdate environment not yet set up*
- Getting Started with the Playdate SDK: Setup and Basics: youtu.be/J0ufxinp7No
*New to Playdate development*
- Everything About Playdate SDK Collisions in 7 Minutes: youtu.be/27vCPiwgWzQ
- Everything You Need to Know About Sprites in the Playdate SDK: youtu.be/8OCebUVKlb4
- Object Oriented Programming for the Playdate SDK: youtu.be/e9x6DsWk-IU
Get the game this tutorial was based off of: squidgod.itch.io/the-kings-dungeon
Get access to that games source code and support the channel: patreon.com/squidgoddev
Join my Discord!: discord.gg/kDM8RU4aFt
Follow me on Twitter to see sneak peeks/updates!: twitter.com/SquidGodDev
Timestamps:
0:00 - Intro
0:45 - Suggested Resources
1:40 - Required Setup
3:05 - Creating LDtk World
6:38 - Adding Libraries
7:52 - Setting Up Main File
8:27 - Creating Game Scene/Loading Level
14:22 - Creating Player Controller (Initialization)
21:00 - Player Update Loop
22:05 - Handle State
23:13 - Handle Movement and Collisions
26:02 - Input Handlers
27:38 - State Transitions
29:02 - Apply Gravity
29:43 - Spawning Player
31:22 - Flipping Player Image
32:18 - Jumping
34:43 - Fixing Run/Jump Issues
39:02 - Double Jump/Dash
44:58 - Moving Between Rooms
50:09 - Spike
54:25 - Spikeball
58:10 - Handle Player Hitting Hazard
1:01:54 - Spawn Hazards
1:03:19 - Ability Pickups
1:08:04 - Handle Player Picking Up Ability
1:09:17 - Remove Pickup Permanently
1:10:30 - Jump Buffer
1:12:54 - Improve Playdate Load Performance
1:15:13 - Caveats
In this video, I go step by step in teaching you how to make a metrodivania/platformer game similar to my game "The King's Dungeon" for the Playdate SDK using Lua.
- Github Repo for this project: github.com/SquidGodDev/MetroidvaniaTutorial
- LDtk: ldtk.io
- Playdate LDtk Importer Library: github.com/NicMagnier/PlaydateLDtkImporter
- Animated Sprite Library: github.com/Whitebrim/AnimatedSprite
- Diff Checker: diffchecker.com
This is an intermediate/advanced tutorial. Some recommended resources before watching this video:
*No experience programming*
- Learn to Program for Playdate Game Dev! Part 1/2: youtu.be/C4o7n0LNQhA
- The Beginner's Guide to Lua for Game Development: Getting Started From Zero: squidgod.itch.io/lua-for-game-development
*Playdate environment not yet set up*
- Getting Started with the Playdate SDK: Setup and Basics: youtu.be/J0ufxinp7No
*New to Playdate development*
- Everything About Playdate SDK Collisions in 7 Minutes: youtu.be/27vCPiwgWzQ
- Everything You Need to Know About Sprites in the Playdate SDK: youtu.be/8OCebUVKlb4
- Object Oriented Programming for the Playdate SDK: youtu.be/e9x6DsWk-IU
Get the game this tutorial was based off of: squidgod.itch.io/the-kings-dungeon
Get access to that games source code and support the channel: patreon.com/squidgoddev
Join my Discord!: discord.gg/kDM8RU4aFt
Follow me on Twitter to see sneak peeks/updates!: twitter.com/SquidGodDev
Timestamps:
0:00 - Intro
0:45 - Suggested Resources
1:40 - Required Setup
3:05 - Creating LDtk World
6:38 - Adding Libraries
7:52 - Setting Up Main File
8:27 - Creating Game Scene/Loading Level
14:22 - Creating Player Controller (Initialization)
21:00 - Player Update Loop
22:05 - Handle State
23:13 - Handle Movement and Collisions
26:02 - Input Handlers
27:38 - State Transitions
29:02 - Apply Gravity
29:43 - Spawning Player
31:22 - Flipping Player Image
32:18 - Jumping
34:43 - Fixing Run/Jump Issues
39:02 - Double Jump/Dash
44:58 - Moving Between Rooms
50:09 - Spike
54:25 - Spikeball
58:10 - Handle Player Hitting Hazard
1:01:54 - Spawn Hazards
1:03:19 - Ability Pickups
1:08:04 - Handle Player Picking Up Ability
1:09:17 - Remove Pickup Permanently
1:10:30 - Jump Buffer
1:12:54 - Improve Playdate Load Performance
1:15:13 - Caveats










