Fang Talks

silent but deadly

I love it when games do this.

A great way to keep the replayability value of a game high, and make it fun to keep on adventuring, is to use randomly generated worlds. In example most of you will know is Minecraft. Beautiful landscapes, interesting caverns, and it’s all there for you to explore! Who knows what’s behind that mountain! A huge forest, a deep crevice, or just an ocean, maybe? Randomly generated worlds have so many applications, and if you’re willing to put some time into it, there’s so much you can do with your basically endless world.

I’ve been toying with some game ideas involving this concept for a while now, and I think I’ll probably end up executing them. One day, one day. For now, I’ll keep on dreaming… and practicing! Today I used Prim’s algorithm to create a random maze of any size I desire. For example, 50 by 20 blocks!

maze generation

The green block’s the entrance, and you have to get to the red block, since that’s the exit. I made it so that the “wall” tiles are placed higher than the others, so if you put a character in it, you can actually walk through your maze in first person! (I actually did that. Great fun, but the thing’s a bit narrow. Needs some work.)

Prim’s algorithm isn’t the most efficient, and it doesn’t provide the best mazes possible (at least not for the context I plan on using it in), but it’s an easy one, and it’s great fun to see your maze being generated. I could watch that stuff for hours, a different maze each time.

So yeah, there’s my progress. Weekend starts now!
~ Fang

Comments

  • 11/03/2013 (8:37 PM)

    A while ago I played around with paint-drawn pixel-mazes. The engine would load a bunch of prefab block models, bitmaps and based on pixel colors and block exits (from neighbouring pixels), it would stitch together a maze of these models.

    It was pretty cool to play with it, though, modelling all those combinations of block exits was a real pain. Also, physics engine often went crazy on block borders (pushing and tossing objects at the borders made them act weird).

  • 09/03/2013 (7:36 AM)

    The Binding of Issac is another great example of this. Loved that game.

  • 08/03/2013 (11:10 PM)

    That’s something pretty nifty you have there, and it’s always good to have signs of actual progress. You’ve got random mazes, and now you can work on random worlds.

Post a comment

Your email will stay hidden, required field are marked with a *.

Experimental anti-spam. You only have to do this once. (Hint: it's "Fang")