The TilemapKit Roadmap is yours! All the ideas and discussions
7 votes Vote

TK: GameplayKit pathfinding integration

It should be easy to use GameplayKit pathfinding (GKGraph) with TilemapKit. For this the following features are needed:

- convert orthogonal tilemaps into GKGridGraph
-- remove blocked GIDs - this could be either a list of blocked GIDs or "blocked" properties on tileset tiles or non-free tiles on a "blocking information" tile layer
- convert iso/hex tilemaps into GKObstacleGraph
-- all blocked tiles are converted into GKPolygonObstacle objects (rhombus or hexagons)
-- blocking info obtained the same ways as above
- simple pathfinding demo (tap to calculate path to destination, object follows path)

Estimation: 3-5 days

Steffen Itterheim , 25.06.2015, 18:39
Response from the site administrator
sitterheim, 15.07.2015
Task complete
Idea status: completed

Comments

sitterheim, 02.07.2015, 21:04
Started preparations. Actual work to commence tomorrow. Will certainly benefit from having built the GKMinmaxStrategist sandbox app, I could use some kind of sandbox for pathfinding too.
sitterheim, 15.07.2015, 16:36
This task adds the following to TilemapKit:

Ways to get tile GIDs from tile properties:
http://tilemapkit.com/class-reference/html/Classes/TKMap.html#//api/name/tilesForPropertyNamed:value:
http://tilemapkit.com/class-reference/html/Classes/TKMap.html#//api/name/tileValuesForPropertyNamed:

Creating grid graph from tiles vs empty tiles:
http://tilemapkit.com/class-reference/html/Classes/TKMap.html#//api/name/gridGraphForTileLayersNamed:diagonalsAllowed:

Creating grid graph from walkable & blocked tile lists:
http://tilemapkit.com/class-reference/html/Classes/TKMap.html#//api/name/gridGraphForTileLayersNamed:walkableTiles:blockedTiles:diagonalsAllowed:

Creating grid graph from tile costs dictionary:
http://tilemapkit.com/class-reference/html/Classes/TKMap.html#//api/name/gridGraphForTileLayersNamed:costs:diagonalsAllowed:

Creating obstacle graphs from tiled objects:
http://tilemapkit.com/class-reference/html/Classes/TKMap.html#//api/name/obstacleGraphForObjectLayersNamed:bufferRadius:

Debug drawing of a graph on the tilemap:
http://tilemapkit.com/class-reference/html/Classes/TKMapNode.html#//api/name/drawGraph:

Leave a comment