3 ms·
It looks like this script uses the image it's writing to as part of the algorithm(extending pixels until they hit rooms, etc.) For more complex maps, it might
by MichaelBurge 10y ago
It looks like this script uses the image it's writing to as part of the algorithm(extending pixels until they hit rooms, etc.)
For more complex maps, it might be worth using something like DOT to define the abstract graph, and use any image generator tools to layout the dungeon. As a bonus, it would generate curved hallways to link the rooms.
https://en.wikipedia.org/wiki/DOT_(graph_description_language) https://en.wikipedia.org/wiki/DOT_(graph_description_languag...
You seem to have specific requirements for the image to be easily loadable into a Voxel engine, so it may be that this method wouldn't be useful.
- nergal 10y agoIt does not use the image itself. The whole map is an 2d array. The image just represents that 2d array. I've added a more detailed description how to use the array and its values to the README file.