[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] SDL_gfxPrimitives



On 9 Jul 2001, bob {3.0} wrote:

>On 09 Jul 2001 08:56:43 +0300, Jan Ekholm wrote:
>> On Sun, 8 Jul 2001, Pete Shinners wrote:
>> 
>> >>   I'm putting the finsihing touches now on a c-based a-* pathfinder
>> >> that I'd love to submit sometime soon.
>> >
>> >ooh, very neat. how does it work? i'm guessing you provide it a
>> >callback function which can return the "weight" for any given
>> >node? hmm, i guess it would also need a list of all the
>> >neighboring nodes as well?
>> 
>> Now this would be nice to have! But I think it can be quite hard to make
>> it general enough to work with various data structures. If it works it's
>> something we could use quite directly in our game. :-)
>> 
>
>
>I think if he put in all the support for pure python callbacks and data
>structures it wouldn't be any faster than doing it in 100% python..
>Hell, I wrote one in Lingo once and it was fast..  maybe I'll port that
>to python if I can dig up a good version of it.

:-) The algorithm is quite simple once you understand it. When I did one
in C++ in the pre-STL era most time was spent building the data structures
needed (list and a priority queue). Python has good data structures
already, so I think the main algorithm in Python would be quite short.

-----------------------------------------------------------------------------
      Real children don't go hoppity-skip unless they are on drugs.
           -- Susan Sto Helit, in Hogfather (Terry Pratchett)

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org