Cryptic Descent

A fast, procedural 2D dungeon crawler game in Go + Raylib

Ongoing prototype
Game Designer & Developer
GoRaylibProcedural GenerationLightingPathfinding
Cryptic Descent - Image 1
Cryptic Descent - Image 2
Cryptic Descent - Image 3
Cryptic Descent - Image 4
Cryptic Descent - Image 5
Cryptic Descent - Image 6

Project Overview

In my first year of university, we were tasked to create a game using unity. Me being me, I couldn't bring myself to commit blasphemy (using unity). So I set out on rawdoging it with Go and Raylib. Funnily enough, it got the best mark in the class.

This is a 2D dungeon crawler prototype built in Go on top of the Raylib C library. It's a fully custom engine, my personal milestone to explore procedural generation, performance-first rendering, and low-level engine architecture without heavyweight engines.

⚠️ Not a polished or commercial game. This is a technical playground to learn, optimize, and push boundaries in engine programming and procedural design.

Core Gameplay Concept

You're dropped into a procedurally generated dungeon with one objective: collect all scattered keys to escape. If you take too long or fail, the map regenerates into a brand-new layout.

Each regeneration brings:

  • A fresh dungeon via BSP + randomized corridors
  • New enemy placements and loot
  • A different pathing challenge with zero map memory to rely on

Enemies include Spiders, Skeletons, Goblins, and more, each with its own AI state machine and behavior. Along the way you’ll pick up buffs, dodge traps, cure poisons, and scavenge for heals while the world keeps changing under your feet.

It’s not a puzzle. It’s not a shooter. It’s a dungeon that resets itself against you if you slack.

Key Technical Features

Modular Architecture

  • Multi-state screen manager (Title, Gameplay, Pause, Outro)
  • Smooth camera system with zoom and target tracking
  • Debug overlay and FPS monitor

Procedural World Generation

  • Binary Space Partitioning (BSP) for dungeon layout
  • Kruskal’s Algorithm + Union-Find for optimal pathing
  • Natural corridors via Bezier curves
  • Weighted room sizes & contextual prop placement

Advanced Lighting Engine

  • Dynamic lights: static, flicker, shimmer, pulsing
  • Shader-based ambient lighting & contextual falloff
  • Lights attached to particles (fire, explosions, etc.)
  • Context-aware lighting

Enemy & Combat

  • A* pathfinding with path smoothing
  • Collision-based melee combat with visual feedback
  • Power-ups, buffs, and pickup animations

Performance Optimizations

  • Texture batching and sprite sorting
  • Quadtree view-frustum culling
  • Dynamic asset loading & object pooling
  • Separate low-res texture minimap with dirty tracking

Build Notes

You’ll need Raylib C libraries installed and accessible in your build environment.

Lessons Learned

  • Implementing and tuning a real-time lighting system with performance in mind
  • Practical procedural dungeon generation using graph theory and geometry
  • Raylib’s potential when paired with modern Go
  • What engines abstract away and why that sometimes matters

Special Thanks To:

Toadzill Art for the assets!

Madness TN for the theme music!