Source code for my Playdate game, "The Kings Dungeon". Play in this tiny metroidvania, making your way through platforming challenges and unlocking different abilities to progress through the game. Inspired by Ascent on PICO-8. You can find this game on Itch IO.
level/- Holds LDtk levelLDtk_lua_levels- Cached level data made byLDtk.lualibrarylevel.ldtk- Actual LDtk level that was edited in level editor
scripts/end/endScene.lua- UI for showing finished time and score after finished run
game/entities/- Interactable level elementscheese.luachest.luacrankIndicator.luadestructableBlock.luagate.luaspike.luaspikeball.luawater.luawaterfall.lua
npcs/dialogueManager.lua- Manager for NPC dialognpc.lua- Sprite for npcspeechBubble.lua- Speech bubble text
dialog.lua- Full screen dialog for ability unlockgameScene.lua- Handles level creation and game managementplayer.lua- Player character controller
libraries/AnimatedSprite.lua- By Whitebrim: animation state machineFluid.lua- By Dustin Mierau: simple fluid simulationLDtk.lua- By Nic Magnier: converts from LDtk to Playdate compatible dataSceneManager.lua- Handles scene transitionsUtilities.lua- Some simple text/sprite functions
title/menu.lua- Main menu UIspeedRunTimesScene.lua- UI for showing run timestitleScene.lua- Title screen (usesmenu.lua)
main.lua- All imports, globals, and data saving
All code is licensed under the terms of the MIT license, with the exception of Fluid.lua by Dustin Mierau.