pygame is
pygame.org is
|
A* AlgorithmCharlie Harrison (theratking)Tags:Description
Controls for all programs: left click - set path right click - draw and erase walls s - save the map you've drawn (write a full path if you want it in any other folders but the folder with the main program in it) l - load a map (write the entire path + name if the file isn't in the folder with the main program) q - erase the entire map
Controls for ASTAR INDEPTH arrow keys - move the "guy" space - make the guy go along his path
Controls for ASTAR MAZE: m - toggles on and off whether the guy "knows" about his map. If m is on, your character has a "fog of war" and will try to get to the endpoint of the path even though he doesn't necessarily know how. It's fun watching the really low level AI try to get places. (note, you can't edit the map in this mode)
Astar Indepth: This program takes an indepth look at the algorithm for those interested (I was). Basically whenever the path needs to be updated, you get shown exactly what the program is doing. Feel free to take a look at the source code and see if you can understand it (I used some weird data structures that might not be very user friendly)
Astar Maze: this is a more fun approach to the algorithm. Simply clicking will move your "guy" to the point of interest using the fastest possible route. Links
ScreenshotCommentsIf you wish to leave a comment, please sign in first.
|
|