image

"Many times while developing games you probably wondered about the fastest way to implement pathfinding algorithms for the enemy AI system. You probably invented some of your own ways to seek out the fastest path or have implemented existing mathematical algorithms. This process was probably time consuming and you had to get through many obstacles in order to get the job done.

In this article we show you a quicker and safer way to implement a pathfinding algorithm to aid you in this task. We are showing the A* algorithm implementation for JavaScript and Tizen through the use of the EasyStar.js library. This library is very simple to use and can be connected to any custom or official game engine in order to aid you in pathfinding tasks inside your project.

Alongside this article we have attached two example applications – EasyStarJS and EasyStarPhaserIso. The first one shows in practice the basics of setting up EasyStar.js, while the second one is a complex example of using the EasyStar.js library with a Phaser.js tile game project, with an isometric world (fig.1). The pathfinding is utilized there to find the shortest way for the enemy AI to the player."

Read more here