Game Devigner

Archive for December, 2008

Recursive Maze Generation

by Paolo on Dec.14, 2008, under Experiments

Recursion is probably one of the most powerful logic tools that a programmer can use.  It solves many problems that are simply too complex for humans to be able to solve on their own.  From quickly sorting millions or records of information to swift path-finding techniques.  In the example above, I created a recursive map generator to create a maze, which can be used for random map generation in many games.

The logic is as follows:

  1. Pick a direction to travel.
  2. Check if the direction to travel is legal (not out of bounds and if it has not been visited.)
  3. If true, then go that direction.
  4. If false, then pick another direction.
  5. If all directions are invalid moves, backtrack a step.
  6. Check to see if we have not backtracked to the beginning.
  7. If true, then do step 2.
  8. If false, then there are no more legal moves.  End recursion.
Leave a Comment :, more...

Pirates = Bad

by Paolo on Dec.11, 2008, under Piracy

Sinfest 12/11/2008: Piracy

Sinfest 12/11/2008: Piracy

1 Comment : more...

Knytt Stories

by Paolo on Dec.10, 2008, under Reviews

One of my favorite indie platformers gets a design review.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll