Source code for my Playdate game "Runic Rogues", a 3D fantasy spellcasting roguelike built on a custom raycasting engine written in C. Pick one of four classes (Mage, Rogue, Knight, or Ranger) and fight your way through room after room of enemies across three areas: the Twilight Court, the Lost Archives, and the Echoing Caverns. Select runes that give you upgrades, create synergistic builds, and fight against 3 different bullet hell boss battles. Fully localized in English and Japanese. You can see the game in action in the trailer and get the game on Catalog.
Requires the Playdate SDK with the PLAYDATE_SDK_PATH environment variable set, plus CMake and Ninja.
# Simulator (Debug)
cmake --preset sim
cmake --build build/build-sim
# Device (Release)
cmake --preset device
cmake --build build/build-deviceVSCode tasks can be used to run the build process as well (ctrl+shift+B). Both builds output RunicRogues.pdx, which can be run in the Playdate Simulator or sideloaded onto a device.
assets/: source art and audio files (.aseprite, music projects, mockups, Catalog art, etc.)Source/: Playdate game assets bundled into the .pdxaudio/music/: music for each area, the title, and the tutorialdata/localization.csv: all English and Japanese stringsfonts/: contains the fonts used: m5x7 and m6x11 by managore, and KH-Dot fonts for Japanese textimages/: all game images (enemies, environment textures, spells, runes, UI, etc.)launcherImages/: contains all images used by Playdate launcherpdxinfo: game metadata
src/: contains all source codegame/enemies/enemies.c- Enemy data, spawning, and state machineenemyAI.c- Per-enemy-type attack behaviors
entities/entities.c- Rendering of the billboard sprites (enemies, projectiles, exit portal, etc.)interactables.c- Interactable level objects (exit portal and unused campfire)pickups.c- Tutorial arrow item pickups (unused health and xp)projectiles.c- Player and enemy projectilesturret.c- Stationary turret entities (unused)
map/map.c- 21x21 grid map data and room layouts
player/classes/classData.c- Stats, descriptions, starting spells, and unlock order for each classspells/spellData.c- Base stats for every spellspells.c- Casting and updating the basic/special spell slots
player.c- Player controller (movement, collision, damage, etc.)playerStats.c- Player stats modified by runes
rendering/particles.c- Particle effects (same as other entities - just billboard sprites drawn from spritesheet)raycasting.c- The raycasting engine: walls, floors, ceilings, and distance fog (sprites handled byentities.c)textures.c- Loading and caching wall/floor/ceiling textures per area
settings/settings.c- Settings menu and saved preferences
systems/audioManager.c- Handles all SFX and musicbossCinematic.c- Boss intro cinematicchainLightningManager.c- Chain lightning targeting and drawingdifficultyManager.c- Per-class difficulty unlocks and the run modifiers for each difficulty levelprogressionManager.c- Room progress, room types (enemy, elite, campfire, boss), and areasruneManager.c- Rune data and the modifier callbacks runes use to change spellsrunStats.c- Tracks stats over a run for the game over screen (unused)shopManager.c- Rune shop popup shown after clearing a roomspawnManager.c- Enemy spawningtimerManager.c- Generic timers
tutorial/tutorialDialog.c- Tutorial text popupstutorialScene.c- Tutorial room
UI/bossTitle.c- Boss name title cardinteractablePrompt.c- Generates localized prompt labels (e.g. "Next Floor") drawn above interactablesgameMenu.c- Pause menupopups.c- Reward/selection popupsquitConfirmDialog.c- Quit run confirmationruneHUD.c- Rune icons on the HUD (used for certain runes that have active timers/counts to keep track of)runeInventory.c- Full rune inventory listUI.c- Health, spell cooldowns, and the rest of the HUD
gameScene.c- Manager for all game elements, runs every subsystem each frame
globals/fixedPoint.h- Fixed point math helpersglobals.h- Shared constants (screen size, FOV, map size, etc.)helpers.c- Queue, stack, set, fast math, and easing functionslocalization.c- Loads strings fromlocalization.csvsaveSystem.c- Saving and loading datasceneManager.c- Scene management with circular wipe transitions
title/areaMapScene.c- Area select map (shows between areas)classSelectScene.c- Class and difficulty select, with class unlockslanguageSelectScene.c- English/Japanese language select (on first game launch)gameOverScene.c- Run resultsloadingScene.c- Loading screenroomMapScene.c- Room select map between rooms (unused)titleScene.c- Title screen
main.c- Sets up the Playdate event handler and update callback
tools/release.ps1/release.sh- Bumps the build number, builds device + simulator, and zips a release intoreleaseBuilds/sfx-designer.html- Browser tool for faster Playdate synth SFX iteration
CMakeLists.txt/CMakePresets.json- Build configuration for simulator and device
- 3D Sage's raycasting tutorials
- Lode Vandevenne's raycasting tutorial
- KayKit Adventurers 3D models by Kay Lousberg
- 1-Bit Patterns and Tiles by PiiiXL
- Catacombs of the Damned on Arduboy
- Fonts: m5x7 and m6x11 by managore, Metamorphous (title), and KH-Dot fonts (Japanese)
First year of development (Feb 14th, 2025 to March 8th, 2026), no AI was used (3D rendering and base framework of the engine). If you would like to reference non-AI assisted code, please refer to commits on and before 6fa3085. Starting on March 13, 2026 (commit bd3468b), AI was used to assist with code to add content until release (~6 months).
No AI was used for any assets (art, music, localization, etc.)
All code is licensed under the terms of the MIT license.



