I have written a demonstration of a simple path-finding algorithm (in Python), for use in grid-based computer games. It used a breadth-first search to route a sprite from one part of a map to another, avoiding obstacles in between. The code is a listing taken from my forthcoming book, Beginning Game Development with Python and Pygame. There's no documentation I'm afraid. If you want to know how it works, you will have to buy the book. :-)

Download path finding demo

To run it, you will need PyGame, and of course Python. The code is completely public domain, use it for whatever purpose you want and you don't owe me a penny. Here be a screenshot...

This blog post was posted to It's All Geek to Me on Friday April 20th, 2007 at 6:07PM

5 Responses to "Swim Fugu, Swim"

  • Jay P
    April 20th, 2007, 7:17 p.m.

    Amazon is saying August for publishing. Any chance it'll be out earlier?

  • April 20th, 2007, 7:33 p.m.

    Sorry, it's unlikely to be out any earlier!

  • April 21st, 2007, 10:34 p.m.

    Excellent. I can't wait to get a hold of this book, although it will be little new to me, I want something to recommend to my friends and the newcomers to #python @ freenode who are always asking for good books. Good luck!

  • July 11th, 2007, 5:35 a.m.

    Looks like a neat book. I might be able to make my computer science teacher get a copy or two, and we can use them for our after-school programming stuff. I'm not too great on teaching this stuff.

  • July 27th, 2007, 11:29 a.m.

    I cant wait to buy the book! :D

Leave a Comment

You can use bbcode in the comment: e.g. [b]This is bold[/b], [url]http://www.willmcgugan.com[/url], [code python]import this[/code]
Preview Posting...
Previewing comment, please wait a moment...

My Tweets

Will McGugan

My name is Will McGugan. I am an unabashed geek, an author, a hacker and a Python expert – amongst other things!

Search for Posts
Possibly related posts
Popular Tags
Recent Comments
Great! All other image slideshow with kenburn effect use my processor(i5-2400) in firefox(and only in ff) on 100%. But with ...
Would be great to get this on GitHub. I could see using it in multiple places and you should get ...
Would be great to get this on GitHub. I could see using it in multiple places and you should get ...
Classic Roy
- Oriol on ChessPy
Hi how much money is the book and does it say how u publish it
© 2008 Will McGugan.

A technoblog blog, design by Will McGugan