Re: Pathfinding implementation?

Pathfinding... thats a rather comprehensive topic.
A star is a rather unintelligent, simple approach. It should work properly in 3D as well, if properly implemented that is. Due to it not being utterly intelligent, it is not the fastest approach of finding paths though. The implementation can and will make the difference though, even a more intelligent algorithm can be slower than A star if the implementation is worse. I can just recommend to implement your pathfinding in a more low-level language like C (with the help of Cython). The reason is simple:
I'm developing a grid-based 2D tactical turn-based game right now which works with like 30+ enemies on a 50 x 50 map and like 10 playable characters. All enemies have to find a path from their given location to all reachable players, calculating their path on certain unmovable tiles thus a way needs to be found that doesn't pass this certain tile, and a few more obstacles. I was using the path_finder class provided for BGT and even though I added in a caching mechanism to prevent me from re-calculating the very same paths over and over again, it still took a very long time to calculate the proper movements of the AI. I then took a step forward and re-implemented A star in C++, polishing the algorithm through multiple revisions, until you now can't feel the delay anymore, even with loads more enemies and playable units on a much larger map.
Due to several implementation problem in Python, really efficient algorithms in Python will run much slower than in low-level languages. Thus, if you're planning to reduce the calculation time to prevent exhaustive waiting times if many units have to be controlled, think about implementing the path finder separately and access it externally from Python.
Best Regards.
Hijacker

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector

Reply via email to