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.
Wednesday, September 23, 2015
Rendering Dungeons
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!
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.
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.
Monday, January 12, 2015
Hex Terrain Mapping Complete
Wetlands Added
The terrain mapping for my fractal world generation is now complete, with the addition of swamps and an occasional fungal forest. I decided to take the simple approach to swamps, and set a terrain hex to swamp if its moisture level was close to the high end, and the ground was level. Fungal forests can appear in these same conditions, but can quickly grow to cover over much of the surrounding terrain, so they add somewhat of a wildcard to the mix.
Sample World
Here's the randomly seeded world #1482326029 (yes, you can regenerate the same world by supplying the seed value) in snapshot. I went with 40% land and a size of 768x300 hexes. This world happened to have a good range of terrains, from ultra-lush jungles and swamps to arid deserts. I'll highlight a couple area of note.
Fertile Delta
Here a river flows between two mountain ranges, creating a fertile area of lush forests and jungles amidst a generally arid desert environment.
Fungal Forest
There happened to be only one fungal forest generated on this world, in the red box below. This bizarre terrain could form the basis of quests to retrieve rare spell components.
Campaign Start?
I've often used islands as a starting point for campaigns. Their limited geographic area established handy constraints for low level parties. Once the potential adventures on the island are resolved, its time to board a ship and head for new shores. The generator produces worlds with many realistic islands and archipelagos to pick from.
What's Next
Next steps will be laying the groundwork for introducing cultures/races into the world, the birth of settlements, conflicts, expansion, etc.
The terrain mapping for my fractal world generation is now complete, with the addition of swamps and an occasional fungal forest. I decided to take the simple approach to swamps, and set a terrain hex to swamp if its moisture level was close to the high end, and the ground was level. Fungal forests can appear in these same conditions, but can quickly grow to cover over much of the surrounding terrain, so they add somewhat of a wildcard to the mix.
Sample World
Here's the randomly seeded world #1482326029 (yes, you can regenerate the same world by supplying the seed value) in snapshot. I went with 40% land and a size of 768x300 hexes. This world happened to have a good range of terrains, from ultra-lush jungles and swamps to arid deserts. I'll highlight a couple area of note.
Fertile Delta
Here a river flows between two mountain ranges, creating a fertile area of lush forests and jungles amidst a generally arid desert environment.
Fungal Forest
There happened to be only one fungal forest generated on this world, in the red box below. This bizarre terrain could form the basis of quests to retrieve rare spell components.
Campaign Start?
I've often used islands as a starting point for campaigns. Their limited geographic area established handy constraints for low level parties. Once the potential adventures on the island are resolved, its time to board a ship and head for new shores. The generator produces worlds with many realistic islands and archipelagos to pick from.
What's Next
Next steps will be laying the groundwork for introducing cultures/races into the world, the birth of settlements, conflicts, expansion, etc.
Thursday, January 8, 2015
River Generation
Recap
With the terrain hexes of my fractal world generator mapped out, I have the basis of a campaign world in the form of a hex map. The next important feature to add is rivers.
Rivers
Rivers should begin from the higher points on the map, and snake their way down until they hit a water hex. I first randomly determine how many rivers to place on the map, and then build a list of candidate origin spaces which are the highest points in the elevation map. I then take random candidates from the list, and ensure that they are not too close to the origins of previously formed rivers.
With the origin set, I look at the origin point's neighbor hexes, and move the river down into the one with the lowest elevation. I repeat the process, winding the river down, until it's deposited into a water hex.
Moisture
For each of the hexes that contains a river, I bump up the moisture level. The intention here is to potentially yield something like the Nile river, which cuts through a desert, but is flanked by lush vegetation.
Example
Here's a river originating in a colder region of the world, beginning in the mountain range to the west. It snakes to the right, then up, and again to the right, to finally run off into the ocean. Cutting through an area of cold desert, the moisture from the river causes evergreen forests and shrubland to grow along its banks.
With the terrain hexes of my fractal world generator mapped out, I have the basis of a campaign world in the form of a hex map. The next important feature to add is rivers.
Rivers
Rivers should begin from the higher points on the map, and snake their way down until they hit a water hex. I first randomly determine how many rivers to place on the map, and then build a list of candidate origin spaces which are the highest points in the elevation map. I then take random candidates from the list, and ensure that they are not too close to the origins of previously formed rivers.
With the origin set, I look at the origin point's neighbor hexes, and move the river down into the one with the lowest elevation. I repeat the process, winding the river down, until it's deposited into a water hex.
Moisture
For each of the hexes that contains a river, I bump up the moisture level. The intention here is to potentially yield something like the Nile river, which cuts through a desert, but is flanked by lush vegetation.
Example
Here's a river originating in a colder region of the world, beginning in the mountain range to the west. It snakes to the right, then up, and again to the right, to finally run off into the ocean. Cutting through an area of cold desert, the moisture from the river causes evergreen forests and shrubland to grow along its banks.
Wednesday, January 7, 2015
Mapping Terrain Hexes
Recap
After completing the elevation map, temperature map, and moisture map, I'm ready to try and put these pieces together and determine terrain types for each hex on my dynamically generated fractal world.
Blur
Before tackling the terrain mapping, one aspect of the generated maps was bothering me. They were too noisy. Too many tiny island and lakes, more so than in natural world terrain. I decided to apply two passes of a simple blur filter to the elevation map before the subsequent processing steps. The results are more pleasing, but it's possible I might increase the number of blurs even more if the worlds still look too noisy.
Terrain Mapping
I used the diagram below as a reference for mapping a point on the elevation map to a terrain. First, I determine by the elevation if the hex is a flatland, hills, or mountain. Then, I cross reference the temperature by the moisture to determine the appropriate terrain type. For example, if it's a mountain hex, possible terrain types might be mountain, evergreen mountain, forested mountain, or jungle mountain. I then made the tallest mountains on the maps into snow peaks, and threw in a minute chance of one or more volcanos popping up.
Terrain Mapping Results
Here's the example world above mapped to hexes. The world is 768x300 hexes, or 230,400 total hexes. I had to shrink the image quite a bit in order for blogger to accept it. I like the shapes of the land masses, and the look of the mountain ranges. If there's one thing I would tune, it would probably be to decrease the overall moisture level so more plains and shrub lands manifest. But I think that the moisture control will be a tweakable dial in the final product, so you can create lush jungle worlds or barren desert worlds, as desired.
Since it's difficult to make out the individual hexes in this image, here's a section zoomed in.
What's Next?
I'm starting to consider how to populate the world with various fantasy races. I'm leaning toward trying to model a simulated history. Start by putting some primitive tribes on the map, let them advance and expand, and eventually come into contact and either ally or conflict, depending on their alignments. As civilizations grow, settlements will spring into existence organically, and grow from villages to towns to cities, or might get razed by war and wind up as ruins.
But that's not immediately next in the development queue. Next I'm going to integrate the other terrain types that haven't made an appearance yet, namely swamps and fungal forests. Oh, and I almost forgot ... rivers. And I might just start building those terrain hooks I talked about earlier, and throw some elemental portals into the mix to see how they mess up the climate and the resulting terrains.
After completing the elevation map, temperature map, and moisture map, I'm ready to try and put these pieces together and determine terrain types for each hex on my dynamically generated fractal world.
Blur
Before tackling the terrain mapping, one aspect of the generated maps was bothering me. They were too noisy. Too many tiny island and lakes, more so than in natural world terrain. I decided to apply two passes of a simple blur filter to the elevation map before the subsequent processing steps. The results are more pleasing, but it's possible I might increase the number of blurs even more if the worlds still look too noisy.
![]() |
| Elevation Map with 2 Blur Passes |
I used the diagram below as a reference for mapping a point on the elevation map to a terrain. First, I determine by the elevation if the hex is a flatland, hills, or mountain. Then, I cross reference the temperature by the moisture to determine the appropriate terrain type. For example, if it's a mountain hex, possible terrain types might be mountain, evergreen mountain, forested mountain, or jungle mountain. I then made the tallest mountains on the maps into snow peaks, and threw in a minute chance of one or more volcanos popping up.
Here's the example world above mapped to hexes. The world is 768x300 hexes, or 230,400 total hexes. I had to shrink the image quite a bit in order for blogger to accept it. I like the shapes of the land masses, and the look of the mountain ranges. If there's one thing I would tune, it would probably be to decrease the overall moisture level so more plains and shrub lands manifest. But I think that the moisture control will be a tweakable dial in the final product, so you can create lush jungle worlds or barren desert worlds, as desired.
Since it's difficult to make out the individual hexes in this image, here's a section zoomed in.
What's Next?
I'm starting to consider how to populate the world with various fantasy races. I'm leaning toward trying to model a simulated history. Start by putting some primitive tribes on the map, let them advance and expand, and eventually come into contact and either ally or conflict, depending on their alignments. As civilizations grow, settlements will spring into existence organically, and grow from villages to towns to cities, or might get razed by war and wind up as ruins.
But that's not immediately next in the development queue. Next I'm going to integrate the other terrain types that haven't made an appearance yet, namely swamps and fungal forests. Oh, and I almost forgot ... rivers. And I might just start building those terrain hooks I talked about earlier, and throw some elemental portals into the mix to see how they mess up the climate and the resulting terrains.
Subscribe to:
Posts (Atom)










