MapGenerator

by Foomer
[Share] [Zip]
To download this demo for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Foomer.MapGenerator##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Foomer.MapGenerator##version=1

121 downloads
Version 1
Date added: May 16 2007
Last updated: Jul 29 2009
0 fans
MapGenerator
A map generator for generating roguelike-style dungeon maps. [More]

When you download the project, you'll immediately be taken to an executed version of the map generator. Just use 'Map' to view what the generated map looks like in the browser, and 'Ctrl+R' to reboot and get a new map. If you want to see the source, you'll have to visit your BYOND /users/YOU/MyHub/Foomer directory.

This is a simple random map generater intended for use in Roguelike genre games. It generates random maps using rooms and hallways, along with vaults.

How it works:

The map generator follows a simple routine until it is no longer able to continue:

  1. Check to see if there are any vaults that can be built, and if there are, build one randomly somewhere on the map (wherever it fits) then go to step 3.
  2. If no vaults are available, build a new room at the center of the map.
  3. From each node (created around the walls of each room), choose to build either a new room or a hallway, then check to see if there is room for it. If there is, build it, then delete the node.
  4. Repeat step 3 until all nodes are gone.

This way, the entire map will be filled with rooms, hallways, and one randomly chosen vault if any are available to build. (For examples of vaults, check out the /vaults directory)

In order to activate the map generator, just run the GenerateLevel(zlevel) proc, where zlevel is the z level that you want the map generated on. There are also some global variables that can be tweaked for map generator customization.


Currently, the map generator does not have a lot of error-checking or fancy features. It just generates rooms, hallways and vaults.

Terms of Use:

Its pretty simple. I left a lot of frills out of this editor on purpose. Its not even object oriented. However, if anyone wants to add features or rebuild this generator or do anything to improve it, feel free to release it under your own name. The only rule is that, if you add to this program and re-release it, you have to make mention of what you based it on, and what improvements you've made!

The goal:

Hopefully, someone who's interested in map generators will add a feature or two and re-release it, then someone else will do the same thing, and eventually we'll end up with a good roguelike map generator with lots of clean functionality.

Advertisement