RealBasic Stuff
(How's that for an intriguing title?)

MapMaker v1.0.1
A
free module and property setup utility for RealBasic game developers

MapMaker is an extremely flexible module for RealBasic developers that will create a "dungeon" map of just about any width and height. It's pretty feature-packed, and generates some slick-looking dungeons. You are welcome to use this module for your own uses and projects.

MapMaker's only real job is to produce a 2-dimensional array called MapGrid(x,y). Each cell of MapGrid is filled with a descriptive string telling you what that cell is filled with. At first, the entire grid is filled with "wall". Then, based on the many properties you may set, MapMaker "excavates" corridors and rooms, carving out a complete "dungeon" - ready for you do with as you will. Of course, you don't have to use it just for dungeons - you can use MapMaker to create mazes or ruins or "space hulks" or city sprawls or whatever!

Features:

  • Generates a 2-dimensional array of grid descriptions. Once the module runs, each cell in the grid will be labeled with a floor type. Doors, archways, corridors, floors and even stairs are generated.
  • Complete demo program that helps set up the module properties, including writing the RealBasic code for you!
  • Creates a dungeon in a grid of any size, from 10x10 upward
  • "Level" setting allows you to maintain settings but create larger or smaller dungeons (deeper levels are more intricate)
  • Set frequency of corridors vs. rooms - all rooms, all corridors, mixed, whatever!
  • Set minimum and maximum corridor lengths, room widths, and room heights
  • Set frequency of doors
  • Control corridor and room excavation
  • Specify number of stairs up and down
  • Ideal for maze and "RogueLike" games - use it for top-down or isometric views!

MapMaker Hack

This down-and dirty example program shows what you can do with MapMaker. It features a top-down view of a character moving around a maze of corridors looking for the stairs. Use the arrow keys or keypad to move him around. When the character goes up or down stairs, a new maze is generated. It even features a "light source" and a full map view. Slick!

Download MapMakerHack.sit (528k)

Be sure to check out the Demo project. It shows off just about every aspect of the module. It's chock-full of controls, but all the interaction with the MapMaker module is happening in the demo's MakeAndDrawMap method (which is called each time you click the "Make" button). The slider interactions emphasize the importance of making sure your Min values are less than or equal to your Max values, and that everything stays within the map dimensions.

The Demo project is also a really good tool to use when figuring out how you want to set the module's properties. Since there are so many possibilities, play with the demo until you are generating maps that will work for you.

One of the best features of the demo is that it will generate the RealBasic code for you! Play wth the settings until the module is creating maps that you like, then select File: Write Properties (Command-W). A window will appear containing all the code needed to create maps using the properties you have set. Simply copy and paste into your own projects!

| Download MapMaker.sit (448k) | View Full Module ReadMe | Email Bryan |