MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Tilemap Path

Create multi-point waypoint paths on tilemaps for sprites to follow with built-in obstacle avoidance.

create path

Problem it solves

You want an enemy guard, delivery drone, or NPC to walk through a specific sequence of checkpoints across your tilemap level.

What this block does

Creates a new path object from a list of tile locations. It automatically calculates the best route between each checkpoint using pathfinding so sprites avoid walls.

The block

create path $path block

Parameters

NameTypeDefaultMeaning
pathtiles.Location[]nullThe list of tile locations to visit in order.

Returns

TilemapPath — A new TilemapPath object containing the planned route.

Example

let loc1 = tiles.getTileLocation(2, 2)
let loc2 = tiles.getTileLocation(8, 2)
let myPath = TilemapPath.create_path([loc1, loc2])

Add the extension

Add github:UnsignedArduino/TilemapPath to your project, or open: Import TilemapPath.