DEV Community

Cover image for From 5,000-Parameter Failures to a 2.5D Dream: My Quest to Out-Simulate Dwarf Fortress
UnitBuilds for UnitBuilds CC

Posted on

From 5,000-Parameter Failures to a 2.5D Dream: My Quest to Out-Simulate Dwarf Fortress

For years, I’ve been utterly captivated by the concept of Dwarf Fortress. If I’m being completely honest, the actual execution of the original game felt a bit brutal to play, but the sheer, uncompromising depth of its simulation nature always fascinated me.

Naturally, as a developer with a penchant for optimization and procedural systems, I decided to build my own.

Spoiler alert: I was a bit too ambitious.


🪦 The Graveyard of Good Intentions

My journey to this point is paved with ambitious, half-finished prototypes that fell victim to scope creep and performance bottlenecks:

1. 🏢 The Over-Engineered Engine

A year ago, I tried my hand at a deep world sim. I gave every single entity over 5,000 parameters. The result? Managing anything beyond 10 on-screen elements at once was inconceivably slow. I scrapped it.

2. 👥 The Procedural Identity Crisis

Next, I tried to build a Sims-style game. That quickly evolved into adding Dwarf Fortress-style lore, complex relationship webs, and eventually procedural everything. As a solo developer with limited time, it was an impossible mountain to climb.

3. 🐜 The Weekend Hackathon Divergence

Just this past weekend, I joined a dev challenge. I started building an AI Ant Terrarium. The tech stack was wild: a Solana-seeded world state, Snowflake for storage, Gemini 1.5 Flash for generating real-time ant thoughts when clicked, and ElevenLabs for turning those thoughts into spoken inner monologues. It looked incredibly cool on paper, but I hit a wall: turns out generating convincing procedural foliage is significantly harder than generating procedural terrain.

So, I decided to scale back, strip away the noise, and return to the root of my passion: Dwarf Fortress.


⚔️ Enter "Dwarven Stronghold" (100% Non-IP-Infringing)

This is a mission of pure passion. I started the codebase in JavaScript, quickly realized I needed bare-metal performance, and rewrote the entire core in Rust.

Currently, the engine sits at over 200 robust unit and integration tests—passing clean and green on every build. It's still heavily a work in progress, but the vision is clear: Dwarf Fortress has a legendary ~750k lines of code benchmark. I want to match and surpass it in every single way.

📜 The Feature Manifesto

  • 📐 No ASCII: Ditching the retro text for a sleek, modern 2.5D isometric perspective.
  • 🌊 Unmatched Depth: High-fidelity 3D Navier-Stokes fluid velocity, NPK soil nutrient depletion, full stress psychology, and dynamic, procedural audio.
  • 🎙️ AI Integration: Real-time voice-over and dialogue powered by ElevenLabs, translating silent text into immersive voice-overs.
  • 👤 True First/Third-Person Mode: Eventually, you’ll be able to drop out of God-mode, choose a perspective, and play as an actual dwarf roaming your own fortress.
  • 🥽 VR Support: Long-term, I want full virtual reality integration.

👶 The Child Within the Machine

When I look at why I'm so obsessed with these systems, it goes back to my favorite childhood game: Black & White 2.

There was something magical about that game's natural progression—the deep trainability of your creature, and the ability to seamlessly zoom from the heavens all the way down until you could see the exact paths individual ants were walking.

I think that's exactly why I am where I am today. I have an absolute fascination with procedural generation, machine learning, extreme code optimization, and the philosophy that no depth is too deep.


🎨 Overcoming the "Asset Bottleneck"

Right now, Dwarven Stronghold runs strictly in the console. If I'm being vulnerable, part of me is terrified to build the visual layer. I'm scared that looking at it will doom it to the same fate as its predecessors—halted for eternity because I can't get the graphics to match the brilliance of the underlying simulation.

As a solo dev, hiring a massive design team to scale with a game this vast is an economic impossibility. If I can add over 1,000 new features or items to the simulation logic in a single day, how could a traditional asset pipeline ever keep up?

The solution is an automated pipeline.

By choosing a 2.5D isometric aesthetic, I can simplify asset generation. I'm building template prompts and using AI asset-generation pipelines to dynamically generate sprites. It’s not perfect yet, but it’s a scalable start—and it’s the shield that will keep this project out of the graveyard.


💖 Sustained by Passion

My goal is to open-source the project the moment the core loop is functional. Who knows? Maybe the community will find it interesting, catch the vision, and want to contribute to building this massive world.

Whenever I feel overwhelmed by the scope, I think about Tarn and Zach Adams. Dwarf Fortress was started by two brothers with a shared passion, and it became their life's work. In a bittersweet twist of fate, they eventually brought it to Steam to pay for skyrocketing cancer treatments. It’s a poignant reminder of what we do this for.

Let passion drive you, and passion will sustain you—even in your darkest of hours.


💬 Let's Discuss:

  • How do you handle scaling asset pipelines for deep simulation games?
  • What is the sweet spot between simulation realism and performance in modern engines?
  • Have you ever scrapped a massive project because you were too intimidated by the visual layer? Let me know in the comments!

Top comments (2)

Collapse
 
xulingfeng profile image
xulingfeng

Damn, mad respect. I've always had a thing for people who can actually build games — because I'm the guy who plays Switch before bed and calls it a productive day.
When you wrote "passing clean and green on every build", it hit me — that line shows up in every single one of my AI audit stories right before things go sideways. Might be worth poking at a few more edge cases. There's always something you haven't found yet.
Anyway, keep at it. May the KFC🍗 gods bless your journey.

Collapse
 
unitbuilds profile image
UnitBuilds UnitBuilds CC

That's actually why I switched the entire thing to Rust. JS, clean and green = death, vs in Rust, it's usually pretty solid. But yeah, that's exactly why I'm scared of starting it up, cuz the second I do, I know something will be broken and I just hope and pray it's something fixable.