[PLUGIN] Dungeon/maze generator

Completed plugins, behaviors and effects.

Post » Sun Aug 29, 2010 8:09 am

This plugin can easily build a maze or a "dungeon" (called so for RPG traditions, you do not actually have to imprison dudes there). Based on Jamis Buck's dnd-dungeon. We used this system in a game called Kolumbo a long time ago, but I did not release the plugin as it was quite messy. I have now after a week's of work recreated the plugin, but better.

Download zip (990 KB). Contains plugin, example .cap and exe.
Source code


This is a basic maze. Yum, I picked a chocolatey color scheme.


This is a maze with rooms, aka dungeon. It's built "expanded" to get thicker walls and better door placement.

The normal workflow is as follows:
- Set object mapping
- Set parameters
- Generate
- Build to layer

If you want more control over the process, you need to build to layer yourself using events or Python.

Parameters--
Size: dungeon width/height in tiles. Actual size can be +-1 tile to accommodate walls.
Tile size: Width/height of one tile in pixels
Seed: Number to base the randomization on. Same number = always same result.
Randomness: 0 - very straight corridors, 100 - lots of twists
Sparseness: 0 - very tight density, 100 - very sparse density
Dead end removal: percentage of dead ends the generator does its best to remove.
Room count: max/min.
Room dimensions: max/min height/width in tiles.

Expressions available for all of the above. In addition you can fetch tile type (rock, tunnel, room) at pos x/y, room top left x/y, bottom right x/y and a thin wall type between two tiles (none, wall, door).

For mazes (and other game purposes too) you can se the starting point and goal point of a maze.

Build to layout:
The dungeon is built to the layer of your choosing.

Build to layout (expanded):
To ensure all walls are at least one tile in size and to allow better door placement, the map size is epanded to x2 + 1 tiles. All corridors stay one tile wide.

Set object mapping:
Set (sprite) objects to use with the "build to layer" action. There's only rock, tunnel, room, (thin) wall and door tiles.

That should be all, see the example .cap and experiment!
B
2
S
1
G
3
Posts: 71
Reputation: 1,142

Post » Sun Aug 29, 2010 9:21 am

Wow that's awesome i'll try this plugin for sure! I'll post the results here soon
B
2
S
1
G
2
Posts: 32
Reputation: 864

Post » Sun Aug 29, 2010 9:48 am

Thanks for sharing this Luomu.

Not poked around with the cap yet but have run the exe.

Looks like a great plugin.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Sun Aug 29, 2010 10:54 am

You may have my first born child.

What's the license on this baby?
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sun Aug 29, 2010 12:33 pm

[quote="Arsonide":50ygna5g]What's the license on this baby?[/quote:50ygna5g]I'm a big fan of the "do whatever you want" license. Jamis Buck's dnd generator is public domain so I would feel guilty for being more restrictive.
B
2
S
1
G
3
Posts: 71
Reputation: 1,142

Post » Sun Aug 29, 2010 6:55 pm

You may have my second born child.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sun Aug 29, 2010 11:00 pm

Please take my wife. ba dum bum ching
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Aug 30, 2010 6:17 am

HI :D


Is there any way to set an entrance to these dungeons? or get the entrance from the generated map or something like that?
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Aug 30, 2010 6:34 am

[quote="madster":q38p9bb1]HI :D


Is there any way to set an entrance to these dungeons? or get the entrance from the generated map or something like that?[/quote:q38p9bb1]Use actions "Set starting point" for entrance and "Set ending point" for exit. I'll add it to the example today...
B
2
S
1
G
3
Posts: 71
Reputation: 1,142

Post » Tue Aug 31, 2010 7:30 am

Well. There seems to be some problem with the entrance/exit coordinates. It's because of this internal calculation in JBDungeon that the initial size you enter is multiplied by 2 plus 1 tile. I didn't want to confuse users with this so if you set size 10 the plugin sees it as 5 and the generator in turn multiplies it again... but the end result is that the start/exit coordinates are unreliable.
B
2
S
1
G
3
Posts: 71
Reputation: 1,142

Next

Return to Completed addons

Who is online

Users browsing this forum: No registered users and 0 guests