ASHGRID - Procedural Map Generator
H. S. Teoh
hsteoh at qfbox.info
Fri Jul 11 14:54:39 UTC 2025
[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
--
People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG
More information about the Digitalmars-d
mailing list