ASHGRID - Procedural Map Generator

bauss jacobbauss at gmail.com
Fri Jul 11 16:01:37 UTC 2025


On Friday, 11 July 2025 at 14:54:39 UTC, H. S. Teoh wrote:
> [Moved to -d to avoid polluting announce forum]
>
> On Fri, Jul 11, 2025 at 12:06:16AM +0000, bauss via 
> Digitalmars-d-announce wrote:
>> ASHGRID is a procedural map generator written in D.
>> 
>> It's kind of basic now but it gets the job done.
>> 
>> It can generate various maps and also dungeons.
>> 
>> It has a lot of flexibility in terms of configurations and 
>> also types can be replaced such as enums for biomes, tiles etc.
>> 
>> https://code.dlang.org/packages/ashgrid
>> 
>> https://github.com/bauss-dev/ASHGRID
> [...]
>
> Very nice!  I also happen to be experimenting with proc gen 
> right now, so this is quite interesting to me.
>
> So far I haven't actually tried the code yet, just glanced over 
> it. Some questions:
>
> 1. It looks like the terrain gen is basically based on a noise 
> function, is that right?  Is there a way to configure the noise 
> function used?
>
> 2. For dungeon generation, it seems rather inefficient to 
> generate random rooms and then check for collisions.  I've had 
> much better luck with generating random (rectangular) BSP trees 
> over a grid and then creating rooms within the confines of its 
> leaf nodes. The structure of the BSP tree ensures that the 
> rooms will not collide, and the upper structure of the BSP tree 
> can be used to ensure that all rooms are reachable.  It will be 
> kinda boring since it will be a tree structure: only one path 
> between every pair of rooms.  But you can add cross-edges to 
> create more interesting topologies on top of this basic 
> structure. Or delete edges to make hidden rooms that you have 
> to dig to find.  Or merge non-sibling nodes that are 
> spatially-adjacent, to create non-rectangular regions to fit 
> things like caverns or underground lakes.
>
> //
>
> One idea that I'm currently bouncing around is scriptable proc 
> gen: instead of providing the user complete, canned generation 
> procedures with innumerable knobs and configuration options, 
> boil it down instead to a set of primitive composable 
> operations and let the caller specify a recipe that combines 
> these operations to create their own procgens. Essentially this 
> will be a procgen DSL for the user to create their own methods 
> of procgen.
>
>
> T

1. I just pushed an update where you can supply your own noise 
function to the map settings.

2. Yeah it might be inefficient, and might optimize it in the 
future. For now I focus on functionality rather than performance 
tbh.

3. That is an interesting idea

-----

Pushed some updates since that includes village generation, 
smoothing of tiles such as water edges, hill generation accounts 
for villages, smoothnoise function can now be replaced by a 
custom function.

For the new examples checkout the read me.



More information about the Digitalmars-d mailing list