Dev Blog #1 – Announcing “Project: Dungeon Delve”

Dezengarth from the original Mogensen Planet Generator

For the past two years I’ve had an idea to make the game I wanted to play. Something that would allow me to play how “I” wanted. Quests, survival mechanics, exploration, city building, and small-scale multi-player so I could hang with my friends. So many games come close but none come close to the experience I’m looking for.

I could make a mod for an existing game but I wouldn’t exactly have full control over the game engine to make it do EVERYTHING I wanted. I would be hard-pressed to sell it if I wanted to on top of that. So I decided to attempt it, from scratch. It’s ambitious and I’ll probably fail, but it’s awoken a spark in me.

From Maps to Code

That said, it hasn’t been all wishful thinking, though there’s plenty of that. What started this path was when I randomly came across Torben Mogensen’s terrain generation software, the same software I used to create the map of Dezengarth. I thought to myself I could modify that to create a 3D model of the planet.

I succeeded at making a 3D print of the planet so I could make a globe by generating a height map texture and applying it to a sphere in Blender. The result wasn’t perfect but it simmered in my brain. I had access to the source code and even had Mr. Mogensen’s permission to do with as I saw fit.

Torben Mogensen’s Planet Map Generator https://topps.diku.dk/torbenm/maps.msp

Learning C/C++

I don’t remember exactly when I started but I took up learning C/C++ and worked on adapting the code to generate height values for each vertex of an ico-sphere directly. I was still fresh with understanding C/C++ so I attempted to use ChatGPT to help me analyze the Mogensen code but failed miserably. I can see the potential of generative AI, especially as a training aid, but it has not left me with much confidence in producing anything that matters. The ethics of having it generate “art” and passing yourself off as the artist is disgusting to me and I would and will never use it for “creative” work, let alone for anything I would sell. Now I only use it for debugging and suggestions but I won’t let it touch my code. It’s too dumb. Giving up on ChatGPT adapting the code for me, I set on the path of manually studying and parsing the original Mogensen code from a stand-alone program to a header file that I can link in any future project.

A couple of months ago, I succeeded! I generated Dezengarth by calculating the height values for each vertex. This was a huge milestone.

My GitHub – Mogensen Header file: https://github.com/ravennst/Mogensen-Planet-Generator-Header

Dezengarth using the new library

Hitting a Snag

But then came a problem. My prototype for subdividing an icosahedron was wildly inefficient. I’d written it to repeatedly split every edge in half, keeping track of which vertices had already been processed. By the 8th or 9th loop, the vertex pair array had grown so massive that checking each pair took forever. On the 10th loop, it ran for a day and a half and was still only halfway done.

Clearly, I needed a better approach.

Subdivided icosahedron

Where I’m at Now.

I’m currently working on a more efficient subdivision algorithm that will sub-divide the icosahdron-sphere at the desired level in a single pass. The methodology document is nearly done as I work out the math. Once I have that figured out, the second version of the prototype can be started.

The new Mogensen header file can generate height values (tested) and should be able to generate color values and biomes, but I haven’t tested those features yet. Testing those features are my next steps.

What Comes Next

Once the prototype is complete and proves the new header, the next step is to start working on the voxel engine plugin for Godot. I’ll need to develop that and be able to control a character to move around the world to serve as my proof of concept.

While Hello Games will have beaten me to the punch with the exciting and upcoming “Light No Fires” with having an Earth-sized planet that you can play on, but Dezengarth is mine and I can’t wait to see it come to life.

Published by Rav

Husband, Father, Designer, Artist, Writer, and Gamer.

Leave a comment