Using a TileMapLayer to create a strategy game grid

Godot Version

4.5.1

Question

From reading the documentation, it seems TileMapLayers and TileMaps are intended more for things such as 2d plataformers or rpgs than 2d strategy games. Is this an acurate perception?

In specific, their pathfinding is designed arround things that move in a continuous motion, and their optimization arround the creation o large, unique levels, rather than the discreet numer of posible positions and relatively small grid of something like chess, X-com, or Heroes of Might and Magic 3.

They could still be useful in order to add visual components, especially modular ones for more varied arenas, but it seems the logic arround moving pieces should be handled by a custom node.

Yes. You could use AStar2D or AStarGrid2D for your movement logic instead.

2 Likes

Excelent suggestion. Coding breath first paths by hand is a bit of a chore

I also use TileMapLayers to show overlays like how far a unit can move or the movement path. The can be more that just the static level.

1 Like