Difference between revisions of "Irregular Shaped Rooms"

From RogueBasin
Jump to navigation Jump to search
(No difference)

Revision as of 22:07, 19 May 2008

Rectangular or any type of regularly shaped room in roguelike games has always bothered me, so instead of working I came up with a simple way to generate irregular, more "natural" looking caves, such as the ones featured below.

rooms2.JPG

How it works

The basic concept is simple enough: enclose an area in 4 rectangles, randomly choose at least 1 point in each of the rectangles, join each of those points together using a Bresenham's Line algorhithm, and then fill in the enclosed area, as illustrated below.

rooms1.JPG