Friday, October 28, 2011

Randomized metroidvania 01: map rooms

So I've decided to make a randomized metroidvania game; sort of a cross between a roguelike and one of the greatest games ever, Castlevania: Symphony Of The Night. Since I want this to be a flash game, I'll use Eclipse and Flixel.

I spent a few hours getting Eclipse to work with Actionscript and playing with Flixel a bit. For my game I decided to start with generating a random world map.

Here's the basic algorithm, which took less time than setting up Eclipse and Actionscript:

to start:
    add a 1x1 "frontier" space
    add a room

to add a room:
    randomly pick a frontier space
    start a room there
    randomly grow it for a while
    remove frontiers under it
    add its empty neighboring cells to the list of frontiers


  1. I have just recently discovered your blog, and am still in shock about the amount of invaluable information you are sharing. Having just recently stumbled upon the roguelike genre, this blog is now my first read every morning.

    Really excited to see you start a new series =)

    While I'm still stuggling with some programming, and learning all these procedural generation algorithms etc, your way of explaining all these subjects keeps me motivated. Hope in the future I can produce a small game as a big thank you!

  2. @KC, Thanks! I'm glad I can help. And when you do start a game, no matter how small, be sure to let everyone know about it!

  3. I know I'm a few months late here, but I'm with KC. This is a fantastic wealth of information. Thank you.

  4. @Dhinanta, Thanks! I've been playing around with events and messaging lately and it has changed the way I organize some things. I think someday I'll do a tutorial about how it can really clean up a lot of the messiness of roguelike code.