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...

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

6 Responses to "Swim Fugu, Swim"

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 name is Will McGugan. I am an unabashed geek, an author, a hacker and a Python expert – amongst other things!

My Blogs
Search for Posts
Possibly related posts
Tags
Popular Tags
 
Archives
2009
 
Recent Comments
Dear Sir, I recently purchased your book, as part of my decision to quit science and retrain as a computer ...
- Malcolm Sutherland on Table of Contents for Pygame Book
red hair is common in north western Europe. Why dosn't it get more common in a gradient towords the north ...
In a software developer, the ego factor might be called for in the sense that a developer needs to be ...
Atree, I'm afraid there is no documentation as yet. You were on the right lines, here is how to do ...
- Will McGugan on Django Techblog markup system
i have try: {..summary} {..} and: but it take no effect :-(
 
© 2008 Will McGugan.

A technoblog blog, design by Will McGugan