Thursday, May 14, 2015

Random Maze Generation Methodology

Some weeks with no chance to post anything around here, however they were really productive weeks for me in game development. I have been working in a couple projects that are not games, but are tools for game creation.

Inspired from BARKH, Lal0l and I worked in this "methodology" for maze generation that is supposed to work for a very specific kind of games. The idea is not just to create random mazes, but to create playable mazes with different difficulty levels.

How to make sure a maze is playable? Well, we need to define some basic game rules. The kind of games this methodology is intended for, have the following characteristics:

  1. The objective for each level is to move your avatar from point A to point B in the maze. This implies that the maze’s entrance and exit are not necessarily at the border of the maze but rather at any point inside of it.
  2. The player has a limited set of resources that are consumed as the maze gets discovered. Examples of resources can be: fuel, time, characters, health points.
  3. Along the maze the player can find beneficial zones or items and use them to recover or save resources. We called these 1ups.
  4. We called 1downs harmful areas or enemies which can reduce the player’s resources.
  5. The maze is generated automatically each time the game is played. Optionally, the player can have a limited number of chances to complete a given maze, this depends on game design decisions.

We called this kind of games Cost Based Maze games (CBM games).

Our methodology has 2 main parts, the first part generates the maze's topology, i.e. the corridors and walls. The second part, spreads 1ups and 1downs randomly over the maze, then it uses the difficulty level to find the correct positions for them. The amount of 1ups and 1downs depends on the difficulty level as well.


After implement this in Unity I realized it has good potential. I'm thinking some game ideas to use this, however I haven't decided yet, maybe I will post later about that.

For now here is a detailed (formal) document about this methodology. It is focused on the algorithms, not in Unity. I hope you find it interesting!

No comments:

Post a Comment