Wednesday, September 23, 2015

Rendering Dungeons

Been working on rendering the randomly generated dungeons in a more game-friendly format.  The 24-pixel tiling is looking pretty good.  I've got basic doors placed and rendered.  A next step will be adding some variety to the doors, to get secret doors, locked doors, iron-bound doors, bricked-up doorways, etc.  I want to also start keying these to a "difficulty level" input parameter.  The difficulty will also eventually drive things like trap placement and monsters.

Monday, September 21, 2015

Procedural Dungeons

Taking a small break from wilderness generation, on to the dungeons that will eventually be populating that wilderness.  Here's a sample 20 room dungeon layout based on a new algorithm that I just completed.

The dungeon generation library features a modular architecture based on room and passage "carvers".  The "carvers" create room and passage shapes in a variety of styles.  Since the system is modular, it will be easy to create specific environments, like caverns, mines, etc.

The next task here is to scan for door placement and render this in a format that's more usable for gaming.  Ultimately I see this as the basis for a DMMuse themed dungeon generator.

Saturday, September 19, 2015

A Slicker Presentation

With the bulk of the terrain generation under my belt, I spent some time working on the visual presentation of the hex map.  I feel that the maps were looking too clunky and cluttered, with too many terrain icons.  Since I had a fully detailed elevation map at my disposal, why not use that to create nice looking gradient terrain hexes, rather than relying on terrain icons to represent everything?  I kept terrain icons for areas of high mountains and heavy forests, but the nice gradient of hex colors now presents a pleasing aesthetic to the map.

Oh, I also cleaned up river generation a bit more.  My prior algo was producing some truly crazy and maze like rivers.  While they looked interesting, they were decidedly not natural looking.  This algo uses the previous one to determine an ultimate destination for the river, but then lets the river move naturally toward that destination, while introducing some subtle, meandering variations.

I'm starting to collect my thoughts on the next steps, which will involve placing cultures and their artifacts (settlements, dungeons, ruins, etc) on the map!

Friday, September 18, 2015

Better Rivers

I cranked up the World Generator after a long hiatus, and promptly improved the river generation.  I had to first re-factor the generator to understand that it was creating a hex map instead of a 2D grid.  I then changed the river generation to render rivers along the center of hexes, rather than along hex-sides.

The rivers start at a high-elevation point on the map, then use a very simple algorithm to determine their flow.  I just pick the next hex of the river to be the neighbor hex with the lowest elevation, excluding any hexes already used for the particular river being generated.  The result are rivers that meander nicely, mimicking the winding rivers we find in nature.