Map Generation

by ACWraith
A datum for abstract procedural map generation.
ID:110565
 
My own Prim Grid library offers an implementation of the methods provided here and includes additional features.

This library provides a datum for abstract map generation with:
  • No need for atoms until the map is applied.
  • No need to spend entire cells on walls. Each cell knows whether it's connected to its neighbors or not.
  • Procs for pathfinding without applying the map first.
At the time of this writing, the only actual generation provided is for a rectangular maze using Prim's algorithm.


LICENSE: You may use this library in both commercial and non-commercial projects. Credit would be appreciated, but it is optional.
I have some design concerns about this library, regarding the algorithms themselves. Is there a particular reason the algorithm(s) for map generation are not a separate datum from the map generator datum you provide?

In the Prims implementation, it seems you'd benefit from breaking it up into small procs and having some internal state. This also means the API of your map generator itself doesn't balloon when you add more algorithms.
Running the demo caused my computer to crash. I don't know if it's a computer resource thing, but it ran for a second... screen froze up, and the BSOD.
@SqueakyReaper: I have not experienced that problem, but you should really be using Prim Grid instead. This library only remains for legacy purposes. Perhaps I should take it down.

If you have resource problems, you might want to try making the demo map smaller. I set it to manage 4900 turfs. That's a lot.
Aye, it is. This isn't even a full gig worth of RAM, so that definitely could have something to do with it.

Sorry, I was crawling through the resources, didn't realize there was a more updated version. I have a bad habit of drive-by downloading, running to see if I'm impressed, and then using said library. I guess I could add "check for updates" to that.