Pages

Sunday, October 29, 2017

Path Finding



Testing my new improved algorithm for path finding. It is much faster than before and maybe I will be using it for some of my future projects. Collision detection is optimized by merging multiple background objects into one border object and only borders are used for collision checks. Background objects and borders are saved to separated JSON files with map editor tool so that way collision detection can be up to 10 times faster. The path area is saved after it gets done with searching for the first time. The numbers indicate path steps from player to the destination point. Computer players can follow the path to find and attack the player. There are still many ways to optimize path finding but I don't think that is what I am gonna need right now because game maps will not be that huge. This is a cross-platform game demo and it needs a few more tests on Android devices.

No comments:

Post a Comment