Info

Statistics

  • Download count219 total downloads
  • Latest download count 219 downloads of latest version
  • Average download count1 downloads per day average

Owners

From Magistross's first post:

Hi ! I recently stumbled upon this neat little API for pathfinding and thought it would be cool to wrap it up inside a plugin/behavior for C2. I thought a behavior extending the official tilemap made the most sense for this so here goes :

live example (Drag and drop the blue/green square, and right-click to add/remove obstacle.)

magistross.github.io/easystar2

The behavior is rather straightforward, just hook it up to a tilemap, define walkables tiles with the appropriate actions and you're set. It uses a tag system so you can make multiple find path calls simultaneously, and EasyStar.js allows for asynchronous calculation if need be. Just try it out !

An updated core (now using EasyStar.js 0.2.3, slightly modified to accommodate C2)

Key features are an optimized algorithm, possibility to add specific costs at tile coordinates, option to enable/disable corner cutting when moving diagonally

Yet another update to the core, now using EasyStar.js v0.4.1. Now featuring directional conditions and an even more optimized algorithm.

Small update to correct a bug with the "SetTileAt" override. Also added a condition to test if a tile is walkable and an expression to get the cost from a particular tile.

Added a new condition : "Is tile walkable from". Basically the same as "Is tile walkable" but this one take into consideration directional conditions and thus need another coordinates pair. It will always return false if the two pairs of coordinates aren't neighbors.