Random "Cave" Generator - Cellular Automata

This forum is currently in read-only mode.
  • Here is a .cap for random cave generation, using the Rougelike method of Cellular Automata.

    Use it, abuse it, modify it if you like.

    It works with any sized tile as long as your layout is exactly divisible by the tiles width and height. Works great in standard layout size with tiles that are 32x32 and 64x64.

    It's not perfect but does the trick. It is commented with groups to make it as easy as possible to understand. If you can't figure it out let me know.

    Thanks to Lucid and Shviller for input and general help.

    Download here: http://dl.dropbox.com/u/604141/Public%2 ... tomata.cap

    Or as EXE: http://dl.dropbox.com/u/604141/Public%2 ... tomata.rar

    NOTE: The exe file is now more advanced and has new features. If I abandon working on it I will post the .cap with the updated features.

    Keys to note:

    G - Throws a Glowstick

    B - Places a bomb

    D - Detonates the bomb

    ~Sol

  • Nice to see someone else playing with Cellular Automata.

    I made a map generator using CA HERE and also a platform game with CA platforms

    Subscribe to Construct videos now

    Unfortunately your example doesn't work when I run it.

    I get a error about the "For" loop reaching 1million iterations in event 3.

    I have had this error before on downloaded caps that have loops but when I create my own loop it runs fine.

  • Strange, Lucid got the same error but it works fine here :/

    This was made in Construct 99.91 and he is using .92 so maybe that's the problem somewhere? I'll make it into an .exe file as well for anyone who wants to just see how it works.

    I'll also be sure to check out your examples as well. I would like to refine it a little bit but not really sure where to go from this point. Thanks Minor

    ~Sol

  • Wow, dungeon generators are popular lately.

    It doesn't run for me, either. Same error as Minor, and I'm using 0.99.92.

    It had some looping that I didn't understand at the beginning of the event sheet. Such as in the very first event:

    + System: Start of layout

    -> System: Stop loop "filly"

    -> Wand: Set X to Tile.width/2

    -> Wand: Set Y to Tile.height/2

    -> System: Start loop "fillx" and run 1 times

    I'll have to look into the start and stop loop thingies there, as I've never really noticed those before.

    I've recently been using groups in a very similar way that you did, for flow control in tick-based loops and such. It works really nicely.

  • I keep on getting a .cap error too.

    an now I am getting an error for the .exe also.

    I really want to see this.

  • Pretty cool. The only problem I can see is that some areas have no access.

    To get it to work for 0.99.92 change the condition in event 3 from

    + System: For "filly" from 1 to layoutheight/Tile.height

    to

    + System: On loop "filly"

    as a workaround for now...

  • Pretty cool. The only problem I can see is that some areas have no access.

    To get it to work for 0.99.92 change the condition in event 3 from

    + System: For "filly" from 1 to layoutheight/Tile.height

    to

    + System: On loop "filly"

    as a workaround for now...

    Hmm problem with that, is that it will keep filling beyond the end of the layout I think.

    Maybe I should download .92 and get it working in that. I just don't usually go the the latest latest build a I have learnt my lesson in the past from doing that.

    I also noticed that some areas were not accessible, I hope to make a fix for that, however I thought they could act as a secret area or something should the player have a digging tool or explosives etc.

    May work on this later tonight and see what other things I can add, but for now I will download .92 and see if I can get it working correctly there.

    ~Sol

    *EDIT*

    Rojo, that actually fixes it. It still stops the loop fill once it hits the end of the layout as it should. Nice one, probably saved me an hour of messing about there.

    Will update the .cap and .exe now to be compatible with v99.92 users.

    ~Sol

    *EDIT AGAIN*

    Ok, so the .exe is totally broken now, it gets an error "ERROR LOADING APPBLOCK (1813)". Not sure why, but the cap should now work.

    ~Sol

  • I'm on 0.9.92 here so looks like it could be the problem.

    Also for cut off rooms. This guy has a method that seems to work but I never got round implementing it.

    http://pixelenvy.ca/wa/ca_cave.html

  • I'm on 0.9.92 here so looks like it could be the problem.

    Also for cut off rooms. This guy has a method that seems to work but I never got round implementing it.

    http://pixelenvy.ca/wa/ca_cave.html

    Problem is now fixed for 99.92 so you should be able to download and check it out if you wish.

    Will check that link now also

    ~Sol

  • I've checked it SoldjahBoy and now it works perfectly.

    Also when I've played with CA before running 2 passes can get rid of most of the cut off areas.

    I also read somewhere, can't find the link at the minute, that running a pass of CA checking for neighbours 2 tiles away can remove cut off areas.

  • I've checked it SoldjahBoy and now it works perfectly.

    Also when I've played with CA before running 2 passes can get rid of most of the cut off areas.

    I also read somewhere, can't find the link at the minute, that running a pass of CA checking for neighbours 2 tiles away can remove cut off areas.

    Yes I have tested it with 2 and 3 passes... but it kind of opens the areas up more. I was attempting to go for something a little more closed in feeling, but I noticed with a much larger layout (3200x3200) a second pass makes it really nice.

    Also, I got an EXE to export properly now so the download link for that should now work as expected.

    Now... to make it more betterer.

    ~Sol

  • Exe tells me:

    Runtime error

    Error loading "APPBLOCK" (1813)

    OK

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Exe tells me:

    Runtime error

    Error loading "APPBLOCK" (1813)

    OK

    I think DropBox is breaking it... added to RAR file. Hopefully it's ok now? :/

    Otherwise you will have to download the .cap I guess until I figure out what's causing that.

    ~Sol

  • RAR'ing the file seems to fix the downloadable EXE.

    Now with extra features... turns out a game is being made from this so far.

    The original .cap file is still there for download as the basic building blocks, though I have added a bunch of extra stuff now and the additions are being kept private for the time being.

    If you would like to know how any of the new results have been achieved I am more than happy to answer questions.

    ~Sol

  • Unfortunatly I can't figure out how to jump.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)