
SwiftyDungeon
github.com/dimillian/swiftydungeon- Category
- Entertainment
- Rank
- No. 2201Tools index
Previous survey · No. 2166 ·
- Pricing
- Open Source
- Type
- GAME
- Builder
- dimillian
- GitHub
- 42 stars
- Date
About
Dimillian's experimental dungeon crawler written in Swift — sandbox for game dev patterns on Apple platforms.
What it does
A playable native macOS application that combines first-person raycasting with turn-based dungeon exploration. It generates labyrinth floors, places monsters and items, and tracks combat, equipment, potions, experience, gold, and progression. Players navigate by keyboard or onscreen controls while sidebars expose the map, inventory, equipment, status, and activity log.
Why it's ranked here
Its strongest case is breadth within a compact prototype. Rendering, procedural floors, combat, progression, native interface work, generated art, asset preparation, and runtime telemetry form a coherent playable loop. The repository also labels the project unfinished, and several visible controls and quest elements have no demonstrated behavior.
What's good
The project teaches how native SwiftUI can host a custom raycast-style renderer without abandoning standard macOS interface patterns. Game state cleanly covers movement, combat, inventory, leveling, stairs, and defeat. Input locking coordinates short camera animations with turn processing. Unified logging records lifecycle, generation, movement, combat, inventory, leveling, and floor transitions.
Tradeoffs
It requires macOS 26 and Xcode 26 or newer, sharply limiting who can build or run it. The repository describes a playable prototype rather than a finished game. Some interface elements are decorative: toolbar, navigation, quest, and menu buttons visibly use empty actions. The supplied material shows no testing setup, release packaging, save system, or completed quest behavior.
How to use it well
Use it as a study project for SwiftUI game interfaces, procedural turn loops, simple raycasting, sprite preparation, and Apple logging. It suits engineers exploring how generated bitmap assets can move from concept art into atlases and animation sheets. Treat it as a source of patterns and experiments, not as a finished game, reusable engine, or cross-platform distribution solution.
Technical notes+
Package.swift declares Swift tools 6.2, macOS 26, one executable product, and copies Sources/SwiftyDungeon/Assets as target resources. Sources/SwiftyDungeon/Stores/GameStore.swift uses @MainActor and @Observable for mutable run state, SystemRandomNumberGenerator for combat outcomes, Task-based input unlocking, and OSLog telemetry. Sources/SwiftyDungeon/Views/DungeonViewportView.swift renders through SwiftUI Canvas, casts rays in small distance increments, projects floor and ceiling textures, checks monster line of sight, and animates camera events. Sources/SwiftyDungeon/Support/ResourceBundle.swift switches between Bundle.module and Bundle.main. script/prepare_enemy_spritesheet.py uses Pillow for chroma-key cleanup, cell detection, scaling, and atlas repacking; script/generate_enemy_idle_spritesheet.swift and script/regenerate_floor_ceiling_textures.swift use AppKit and CoreGraphics for asset generation.
Observed
- Primary language
- Swift, with a Python asset-preparation script
- Package surface
- Swift Package Manager executable product named SwiftyDungeon
- Platform support
- macOS 26 or newer
- User interface
- Native SwiftUI macOS GUI with keyboard commands and onscreen controls
- Bundled resources
- The executable target copies an Assets directory into package resources
- Telemetry
- Apple unified logging with app, generation, movement, combat, and inventory categories
- Asset tooling
- Repository includes Swift asset generators and a Pillow-based Python spritesheet processor
Read from README.md, Package.swift, script/prepare_enemy_spritesheet.py, script/generate_enemy_idle_spritesheet.swift, script/regenerate_floor_ceiling_textures.swift, Sources/SwiftyDungeon/Stores/GameStore.swift, Sources/SwiftyDungeon/Support/Telemetry.swift, Sources/SwiftyDungeon/Views/ContentView.swift, Sources/SwiftyDungeon/App/SwiftyDungeonApp.swift, Sources/SwiftyDungeon/Models/DungeonModels.swift, Sources/SwiftyDungeon/Views/ControlDeckView.swift, Sources/SwiftyDungeon/Support/ResourceBundle.swift, Sources/SwiftyDungeon/Views/StatusSidebarView.swift, Sources/SwiftyDungeon/Views/DungeonSidebarView.swift, Sources/SwiftyDungeon/Views/DungeonViewportView.swift.
What it can do
Generate dungeon levels
Game parameters and level requirements → Procedurally created dungeon maps
Control player character movement
User input commands or touch gestures → Character position updates in dungeon
Spawn enemies and NPCs
Dungeon level data and spawn rules → Enemy entities placed in game world
Process combat interactions
Player actions and enemy encounters → Damage calculations and battle results
Manage inventory system
Item pickup and usage commands → Updated player inventory state
Demonstrate game development patterns
Swift code implementation requests → Example code patterns for Apple platforms
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.