[NOT Pygame, Maybe Pyglet] Recommendations for AI Detection

[NOT Pygame, Maybe Pyglet] Recommendations for AI Detection

Postby Auslander » Wed Apr 23, 2014 6:51 pm

I am working on creating a game ai player that will move around and fight with other ai.

I am currently wondering how the best way to allow the ai to check the area around itself for objects to collide with and enemies without the use of Pygame and rects. (I could use pyglet though, if that has a similar rect functionality). All I care about understanding is how I should go about getting what is in the area around the ai.

Any recommendations would be amazing.
Posts: 3
Joined: Tue Apr 22, 2014 9:41 pm

Re: [NOT Pygame, Maybe Pyglet] Recommendations for AI Detect

Postby Mekire » Thu Apr 24, 2014 4:37 am

If you are intereseted in pathfinding in general you should probably start by researching a* (a star) and perhaps Djikstra's algorithm. Basically you need to look into graph traversal. Whether or not you use Pygame or Pyglet when implementing these things is irrelevant. You could even use NetworkX which has some builtin shortest path methods.

Here is an a star example project I worked on a while back (it hasn't been refined very recently):
The interface uses pygame, but the actual implementation of the algorithm does not rely on pygame (interface seperated from implementation).

New Users, Read This
  • Use code tags when posting code.
  • Include any errors with your post (in code tags).
  • Describe your problem; not your chosen solution.
  • Make examples the minimum length to demonstrate your issue.
User avatar
Posts: 1627
Joined: Thu Feb 07, 2013 11:33 pm
Location: Tucson, Arizona

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest