Pathfinding

Maze Generator

This snippet generates a 2D maze. It does this graphically in an image you can paste and also in a 2D Array. Each 'cell' in the array has a North, East, South and West wall which, during generation, may be "knocked down" to produce the maze.

The maze is generated by randomly picking a route by knocking down walls into cells which meet 2 criteria...

Prims Algorithm - Grid Map Generator

This is a basic example of how a slightly modified Prims Algorithm can be used to generate a grid or web of connections between points on a map.

A* Pathfinding

Project Homepage:http://jt0.org/projects/astar

What This is an A* Pathfinding algorithm implimented in native DarkBASIC Professional code as a simple set of functions.

How The basis of it include first initializing the 'Map' and other needed variables (1 function call), then setting up all the allowable area's on the map itself (1 function called many times), then from there, it's simply a matter of calling the Pathing function, which will return a memory block containing all the path information requested.

Notes


Theme & Icons by N.Design Studio