Wednesday, September 26, 2012

Ladder Generation

I've hacked together a working ladder generation that produces some great results. It's not completely fair though, and I'm still working out the kinks. Right now when I generate all of the platforms I save their position in a list. When I get to ladder generation I iterate through the list to each platform. Then I drop a tracer down from each point on the platform. The longest distance is the position of the ladder for that platform. Ties for distance are chosen between randomly. 

This is what is missing currently from ladder generation that I want in:
  • Platforms with multiple / no ladders
  • Ladders that don't reach all the way to the bottom (I hacked this in to randomly truncate the ladder but want a better way to do it)
Time for some screen shots!

Current tileset (not final) applied to a map
Debug tileset applied to the same map

Here is an ascii print out of a map with ladder generation.
Key:
  • ' ' = empty space
  • 'X' = cave wall
  • '-' = platform
  • '+' = ladder / platform intersection
  • 'l' = ladder


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.




Wednesday, September 12, 2012

New Game Caves!

I haven't had much free time this past month due to school. I've put Blast Lords on hold for a while because it requires a lot more work before it could even see a beta release. The project itself was much too big for one person to work on alone so maybe I'll find some help in the future. Good news though, I started working on a much smaller game that I can toy around with in my free time. It's called "Caves!".

There have been some things I've always wanted to try out when making a game including:
  • Procedurally generated worlds
  • Destroyable terrain
  • Arcade style (High score system)
  • Ladders
I've already got cave interiors generating using Perlin's simplex noise. The edges of the caves will be filled in and I will use cellular automata to smooth out the connections. The map width and height are variable along with the density and skew of the cave. Now I'm working on generating platforms and ladders for the player to be able to move throughout the cave.

Here's a cave example printed in plain text.
'X' = collision tile
' ' = empty area
'-' = platform