[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] AI Module (was: Perlin Noise Function)



On Wed, 30 Jul 2008 12:35:50 +0200, Knapp <magick.crow@xxxxxxxxx> wrote:
> I also agree that we could make a whole section of code like this. There
> are
> other types of noise, a lot of vector math toys like unit vector and
> perpendicular vector etc that get used a lot in game making. I am sure
> there
> are more that could be rounded up for a nice set of functions. Then there
> are even really big ones like AI functions that could be written (I keep
> thinking that a Prolog lib for python would be great for making games!)
> but
> then that is in the same class as a gui or 3d etc.


I was playing recently with the A* pathfinding algorithm and made a
workable version of it:
http://kschnee.xepher.net/code/080721a_star_pathfinding.zip
http://kschnee.xepher.net/pics/080720a_star.jpg

Other things that I could see as useful for a modest AI library (not Pygame
itself) would be a flocking algorithm, and an NPC dialog system comparable
to the one used in "Morrowind." As for the first and A* itself, it's tricky
to make those generic for everyone because each coder will likely use their
own coordinate/movement system. The dialog system would be relatively easy
to make widely usable, as the only input and output would be strings plus
the NPC having access to world-state variables like "dragon_slain = True."
What else might be interesting?