Plugin jQuery: EasyStar.js : Javascript A* Pathfinding library for HTML5 games

EasyStar.js : Javascript A* Pathfinding library for HTML5 games
http://www.jqueryrain.com/?http://prettymuchbryce.com/easystarjs/example/example.html
https://github.com/prettymuchbryce/easystarjs
04/10/2012

Nội dung

EasyStar.js : Javascript A* Pathfinding library for HTML5 games

A* is an algorithm for finding the shortest path between two points. It is very useful in game development. Any tile-based game that requires this kind of movement will probably utilize some form of A*. Tower Defense games, City Building games, Rogue-Likes, the list goes on.Thus EasyStar.js is a simple A* API written in Javascript.

Features:

  • The ability to spread out your calculations over multiple calls. EasyStar.js lets you specify how many calculations should be performed each call.
  • The ability to add separate points to avoid, outside of those that are avoided based on tile type.
  • The ability to specify which tile types are walkable, and which are unwalkable.
  • EasyStar calls a callback if it finds your path, or if there is no possible path.

Nguồn: www.jqueryrain.com/2012/10/easystar-js-javascript-a-pathfinding-library-for-html5-games/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận