• ig.Map

ig.

PathfindingMap

new PathfindingMap()

Map for pathfinding, drawn in the editor on a separate layer (just like the collision map).
- set a layer's name to "pathfinding" to have the game automatically set it as the pathfinding map.
- use the "media/pathfindingtiles_plusplus_*.png" as the layer tileset, or define your own custom one. Tip: base pathfinding works best when entity size is <= 3x the tilesize. For larger entities, add a ig.PathfindingMap with green tiles around the middle of your entity's path of travel for best results! IMPORTANT: if using a ig.PathfindingMap, the tilesize must match the ig.CollisionMap's tilesize!

Author:
  • Collin Hover - collinhover.com
Source:

tiledef :Object

Tile definition mapping tiles to settings such as weight.

Source:
See:

init(tilesize, data, tiledef)

Initializes pathfinding map.

Parameters:
Name Type Argument Default Description
tilesize Number size of tiles
data Array tile data in a 2D array of rows x columns
tiledef Object <optional>
ig.PathfindingMap.defaultTileDef tile definition mapping tiles to settings such as weight.
Source: