Author Topic: FlxCaveGenerator improvement?  (Read 1131 times)


  • Active Member
  • ***
  • Posts: 210
  • Karma: +0/-0
  • Hack Hack Hack!!
    • View Profile
FlxCaveGenerator improvement?
« on: Mon, Jul 23, 2012 »
Hi guys, i'm making a platformer with a random generated map and i found FlxCaveGenerator pretty useful for this.

The problem is that it generates sometimes a map with too much open spaces (so the player once he get at the bottom of the map he can't go back at ttghe start): as you can see there there's a way to improve the level generation, so, as i haven't understood very well that part, can someone tell me how to do that in as3 or tell me another way to obtain cool results?



  • Member
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: FlxCaveGenerator improvement?
« Reply #1 on: Mon, Jul 30, 2012 »
Can you offer a link to FlxCaveGenerator? I've not heard of it so can't comment much.

What sort of game are you trying to design? You want the player to be able to get to the bottom of the level and reach the top again?

Doing this purely procedurally (placing each tile individually) might be difficult computatioanlly, as you'd need to check reachability in the level to make sure the player can get to where you expect them to get to.

An alternative might be to try a Spelunky-style approach which uses chunks the size of screens that are composed together to ensure the level is playable. Spelunky doesn't ensure the player can backtrack, but you can do that yourself by designing screen-sized chunk templates that you know are traversable in both directions.


  • Contributor
  • ****
  • Posts: 378
  • Karma: +0/-0
  • Initials
    • View Profile
    • Initials Blog. Code and other things.
Re: FlxCaveGenerator improvement?
« Reply #2 on: Tue, Jul 31, 2012 »
Playing with the parameter that is set to 0.5 by default will give you more or less open spaces. I don't remember what it's called, but it's there.
Initials: Super Lemonade Factory, Super Lemonade Factory Part Two, Above The Clouds, Revvolvver, Four Chambers of the Human Heart