Maze Generator
Root / Submissions / [.]
MCGamer20000Created:
Download:D3EEF3LJVersion:Size:10201 bytes
Maze generator using the same technique as Maze Daze for PTC, but now it returns a start point and an end point. The program also includes two sample games where you run through a maze, one 2D and one 3D (using GAME2RPG's engine).
Replying to:UFO_Pilot
Just tried it out. Fun game. Do you know of any good tutorials for generating mazes in programs?
You can just use the MAZE instruction in the program. There's instructions on the top of this page. The way this code works:
It picks a random place on the grid to start from and adds it to the list of coordinates. It'll repeatedly pick a random direction to go, adding each point to the list. Once it has nowhere to go, it will delete the latest coordinates from the list, go back, and try the find a new point from there. The code ends once it backtraces to the starting point, meaning that all points on the grid will have been filled.