GLBasic forum

Main forum => GLBasic - en => Topic started by: djtoon on 2011-Sep-08

Title: cave generation
Post by: djtoon on 2011-Sep-08
any one have a way to generate a cave from tiles?
im looking to make a random cave generator
Title: Re: cave generation
Post by: Crivens on 2011-Sep-08
Personally I would look into voxels. Best cave demo I ever saw was with C code with voxels. Even allowed you to shoot tunnels through it and bits would fall down etc. Very nice. On the other hand I think Dark Basic had an old cave demo that would probably easily be converted.

Cheers
Title: Re: cave generation
Post by: djtoon on 2011-Sep-08
i mean a 2d map of a cave a side view of tiles :)
Title: Re: cave generation
Post by: matchy on 2011-Sep-08
Hmm...I'm actually working on a random 2d tiled cavern game at the moment. ;)

Got any examples of what you mean of a cave?  :doubt:
Title: Re: cave generation
Post by: Kitty Hello on 2011-Sep-08
YES!! http://www.glbasic.com/forum/index.php?topic=1335.msg9559#msg9559 (http://www.glbasic.com/forum/index.php?topic=1335.msg9559#msg9559) PeeJay's version worked fine for me. There's another one in the code snippets ,which I haven't tested.
Title: Re: cave generation
Post by: Ian Price on 2011-Sep-08
I did a cave based game a couple of years ago for the Wiz - see HERE (http://www.glbasic.com/forum/index.php?topic=3172.msg23202#msg23202)

Not sure if this is anything like what you are after, but it worked for my game and the scene is made up of tiles.
Title: Re: cave generation
Post by: Slydog on 2011-Sep-13
You may find some ideas on the 'Procedural Content Generation Wiki':
http://pcg.wikidot.com/ (http://pcg.wikidot.com/)

They have a page dedicated to caves:
http://pcg.wikidot.com/pcg-algorithm:caves (http://pcg.wikidot.com/pcg-algorithm:caves)


You may be able to adapt a Perlin Noise algo to your needs.
Here's an algo I found in my bookmarks:
http://www.gutgames.com/post/Perlin-Noise.aspx (http://www.gutgames.com/post/Perlin-Noise.aspx)

And this page generates decent looking caves, with caverns etc, a bit advanced tho:
http://accidentalnoise.sourceforge.net/minecraftworlds.html (http://accidentalnoise.sourceforge.net/minecraftworlds.html)
Title: Re: cave generation
Post by: Hatonastick on 2011-Sep-14
Quote from: Slydog on 2011-Sep-13
You may find some ideas on the 'Procedural Content Generation Wiki':
http://pcg.wikidot.com/ (http://pcg.wikidot.com/)

They have a page dedicated to caves:
http://pcg.wikidot.com/pcg-algorithm:caves (http://pcg.wikidot.com/pcg-algorithm:caves)


You may be able to adapt a Perlin Noise algo to your needs.
Here's an algo I found in my bookmarks:
http://www.gutgames.com/post/Perlin-Noise.aspx (http://www.gutgames.com/post/Perlin-Noise.aspx)

And this page generates decent looking caves, with caverns etc, a bit advanced tho:
http://accidentalnoise.sourceforge.net/minecraftworlds.html (http://accidentalnoise.sourceforge.net/minecraftworlds.html)

Some very interesting links there!
Title: Re: cave generation
Post by: matchy on 2011-Sep-15
Minecraft 18 beta (Adventure update) has some interesting examples of generated 3D caverns as well as villages.