APOCALYX is a...

free Game Engine based on OpenGL (MAIL) (SITE) (FORUM) (BLOG)

Thursday, June 19, 2008

Path finding

Yesterday I talked about eSpeak, the text to speech library included in APOCALYX. Today let's talk about MicroPather, that is a library devoted to path finding, a feature that most games require.

MicroPather provides an implementation of the A* algorithm and the engine includes a Lua interface to the original MicroPather functions written in C. In practice, the programmer must define arcs that connect several nodes, specifying the weights of each arc. For example, the room of a level are the nodes, the corridors are the arcs and the lengths of the corridors are the weights of the arcs. Specific functions of the library can compute the shortest path from one room to another along the room and corridors of the levels.
As its author says, the goals of MicroPather are easy integration into games and other software, easy to use and simple interface, fast enough for real time use. You can find samples of application at the MicroPather site and a simple (abstract) example applied to APOCALYX in the "PathFinding.lua" demo available in DemoPack1.

No comments: