I've been browsing around the internet looking for tutorials, tips and dungeon-building algorithms. I've tried about four different styles of dungeon generation, and the one that I've come up with which both looks nice and generates quickly is one that mostly connects a bunch of square rooms together, with occasional hallways in between.
But, in an effort to make the resulting maps more interesting, I've been looking for information on how to create rooms of different shapes, something besides squares, rectangles and hallways. Circles, octagons, plus-shaped rooms, diamonds, and some way to load in predesigned vaults that most Roguelikes have.
Since I have yet to find any information on creating rooms of different shapes elsewhere on the internet, I want to know if anyone here has any advice on this topic.
ID:153744
![]() Mar 9 2003, 9:50 am
|
|
Lummox JR, you know, putting spaces between the arguments in your procs ( <code>round( min( width / height ) * ( 1 - sqrt( 0.5 ) ) )</code> ) would help to make it easier to understand for someone who only cares to skim over things, because they just have to read everything on the forums, like me. Yay for whitespace!
|
Problem is, Lummox believes wholeheartedly in minimising the amount of used space as possible. I suppose it's a habit he picked up from optimising code. =)
|
Garthor wrote:
Lummox JR, you know, putting spaces between the arguments in your procs ( <code>round( min( width / height ) * ( 1 - sqrt( 0.5 ) ) )</code> ) would help to make it easier to understand for someone who only cares to skim over things, because they just have to read everything on the forums, like me. Yay for whitespace! That's a bit excessive on whitespaces for me. I just use whitespaces between binary operators and one after commas. |
That's a bit excessive on whitespaces for me. I just use whitespaces between binary operators and one after commas. Ditto -- however, in lines that use complex hierarchies of parentheses, I also add the occasional space between the parentheses to group them together and make things more legible. |
Just an idea, somebody could make a maze generation lib that could do predefined vaults and octagonal and diamond rooms and stuff like that. I think that that would be a grwat addition to BYOND. I don't really have the skills, I wouldn't know where to start. Maybe somebody else...
(looks at Lummox and Garthor) |
darke_MapMaker supports circular rooms, though you have little external control over when it uses circular rooms and it is distorted with node sizes greater than 1x1. I've been thinking about making it so that the actual nodes could have different shapes but I think to would work better in a system like Dan's Maze Library that plops rooms then draws corridors between them.
When I move more into the different dungeon types in Darke Dungeon, I intend to expand my map maker to include this style of mapping. It may a while though. ;) |
Shadowdarke wrote:
[snip]...system like Dan's Maze Library that plops rooms then draws corridors between them. You should probably look at the Maze library a little more closely. It finds random corridor turfs then draws rooms on them. ;-) |
Creating a room of a particular shape isn't really too difficult. Circles and octagons will be the easiest.
The things to know about an octagonal room are the width, height, and the size of the inset corners. (0 inset would be for a perfectly square room; round(min(width,height)/2) would be a diamond or hexagonal room. A good value to work with would be round(min(width/height)/4), or round(min(width/height)*(1-sqrt(0.5))) for a more regular octagon. To clear space for the octagon you might do this:
Lummox JR