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

Re: [pygame] car game AI



Note: Learn how to use vectors. You will need this for steering, and movement. (You technically don't, but it's much simpler)

The *very best* tutorial to A* pathfinding : http://theory.stanford.edu/~amitp/GameProgramming/ ( Great diagrams )

These are relevant for your racing, and terrain.

Making sure you saw these specifically
http://www.red3d.com/cwr/steer/PathFollow.html
http://www.red3d.com/cwr/steer/Unaligned.html
http://www.red3d.com/cwr/steer/CrowdPath.html
http://www.red3d.com/cwr/papers/1999/gdc99steer.html
http://www.red3d.com/cwr/steer/Obstacle.html
http://www.red3d.com/cwr/steer/Containment.html

Now you could implement physics with pymunk, but that could be overkill at this point. If you write your own physics, make sure you keep a constant-time-step for stability. If a crash happens, apply a force. And continue steer behavior as normal.