pygame is
Simple DirectMedia Layer is
Site Swing
A* Algorithm

A* Algorithm

Charlie Harrison (theratking)



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.


Home Page:


click to view original size account Comments

If you wish to leave a comment with your account, please sign in first.

September 20, 2011 10:50pm - Charlie Harrison - nickname: (theratking)
Feel free to use any part of the code as long as I'm credited. Thank you for your kind words!
January 25, 2011 11:58pm - Charlie Harrison - nickname: (theratking)
the Astar Maze program also uses a custom made binary heap module if you feel like checking it out (I'm new to data structures so it might be crude). There is a heap module standard in python now, but I kinda wanted to try my hand at making one myself.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Nov 17, 2015

Nov 12, 2015

Nov 11, 2015

Nov 8, 2015

Oct 16, 2015

Oct 9, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)