Showing posts with label Caves. Show all posts
Showing posts with label Caves. Show all posts

Saturday, September 22, 2012

Platform Generation

I've been toying with different ideas for platform generation between homework assignments this weekend, and I came up with one I really like. My first few tries of just randomly placing platforms or placing one per height value looked either too random or you could easily see the pattern. What I came up with loops from the top of the map downward and at each step generates platforms left to right and right to left. It looks for a change from cave wall to empty space, then has a ~75% chance to place down a platform. That platform has a randomly generated size which terminates early if it hits another wall or the edge of the map.

Enough talk, here are some pictures.
'X' = cave wall
' ' = empty space
'-' = platform


Thursday, September 20, 2012

Caves! Generation

I've been messing around with input to the simplex noise generator and the game now generates some really cool caves. The pictures come out of the debug text and tend to get cut off but I just wanted to get some out for viewing. I'm tweaking the platform and ladder generation currently so they aren't visible. As before the blank space is the traversable area and the 'X's are the cave walls.