Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: cavern generator

  1. #1

    Wip cavern generator

    i thought i'd post a first look at what i'm currently working on,
    adding caverns to my random dungeon generator.

    i'm using the cellular automata algorithm from roguebasin for the rough layout,
    and making repeated passes at increasingly finer resolution to achieve the final cavern.

    the next step is improving performance. 13 seconds for a small dungeon at screen
    resolution is a bit much, and generating a print resolution map is crazy.
    after that, parsing the rough layout for rooms.

    Click image for larger version. 

Name:	4c89c55a0a000066.gif 
Views:	256 
Size:	12.9 KB 
ID:	29085 Click image for larger version. 

Name:	4c89c7e10a000066.gif 
Views:	222 
Size:	12.9 KB 
ID:	29086
    Last edited by drow; 09-10-2010 at 01:54 AM.
    >>< drow ><<

  2. #2
    Guild Journeyer Marken4's Avatar
    Join Date
    Mar 2010
    Trondheim, Norway


    Looks like a seahorse on the second pic... ^^ I think it looks nice, whats the white border around the edges tho? Sometimes the boxpattern(?) disseapears..

  3. #3


    Quote Originally Posted by Marken4 View Post
    whats the white border around the edges tho? Sometimes the boxpattern(?) disseapears..
    that's just the difference between the rough layout and the final cavern outline.
    at some point, i'll have to update the imaging code.
    >>< drow ><<

  4. #4
    Software Dev/Rep Redrobes's Avatar
    Join Date
    Dec 2007
    Blog Entries


    Looks good. I could wait 13 seconds for it tho - thats no biggie. I think quality is more important than a few seconds wait.

  5. #5

  6. #6

    Wip update, fire and ice

    found a way to improve performance, and i've updated or created all the style routines.
    (although the style routines pretty well wipe out my performance gains)

    Click image for larger version. 

Name:	4c8aff2d0a000066.jpg 
Views:	162 
Size:	187.4 KB 
ID:	29114 Click image for larger version. 

Name:	4c8affd90a000066.jpg 
Views:	135 
Size:	185.6 KB 
ID:	29115
    Last edited by drow; 09-11-2010 at 12:54 AM.
    >>< drow ><<

  7. #7

    Wip getting closer...

    my algorithm for identifying chambers within the caverns mostly works,
    though it's pretty complicated and could probably be improved.

    the second map is a desert caverns scaled for print.
    about 3.5 minutes to generate, the majority of which is creating and dealing with image masks.

    Click image for larger version. 

Name:	4c8decd20a000066.jpg 
Views:	223 
Size:	254.7 KB 
ID:	29206 Click image for larger version. 

Name:	4c8ed07e0a000066.jpg 
Views:	190 
Size:	1.68 MB 
ID:	29228
    Last edited by drow; 09-14-2010 at 05:46 PM.
    >>< drow ><<

  8. #8

    Default final

    i'm down to about 4 seconds for a standard medium size cavern map,
    10 seconds with style, and 2 minutes with style at print scale.

    i think i'm done with optimization, unless anyone knows some deep magic
    for dealing with cellular automata across 9 million cell arrays.
    Last edited by drow; 09-17-2010 at 01:07 AM.
    >>< drow ><<

  9. #9

    Default more final

    my brain won't stop working on this.
    now down to 2 seconds, 5 seconds, and 1 minute.

    a colossal cavern only takes 15 seconds, 26 seconds with style.
    at print resolution should take about 8 minutes, but the process
    consumes all the memory on my machine and grinds to a halt.
    >>< drow ><<

  10. #10


    I dont know what you are talking about but I like the results ; )

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts