Author Topic: Room Generator  (Read 2302 times)

Offline hells

  • Acquaintance
  • *
  • Posts: 11
    • View Profile
Room Generator
« on: May 21, 2012, 03:53:02 pm »
I put together a python script that will create a grid from an image. It uses a template xml file to create the rooms. This allows creating multiple room templates of a specific type and it will choose randomly from among them to populate a room. The room type selection is based on the pixel color which is defined in the xml as well.

The code and samples are available at:

This uses the grid system for virtual rooms but could be easily modified to create any type of generated room set. The only oddity is which direction the grid starts on and what the grid numbers are. There isn't an easy way to configure this quite yet so you might have to monkey with a couple variables to get the grid outputting in a positive or negative layout based on the room numbering and exit numbering you want to use.