Tilemap data vs node-per-tile

Godot Version

4.3

Question

Hey. In games where tilemaps are central to the games logic, I usually rely on writing values to tile positions within tilemap layers, and controlling access via some tilemap manager.

I have a new requirement, where each tile should display a UI component. I think it’s time to move to creating a node for every tile to accommodate for this.

I am keen to hear peoples thoughts with these approaches. One immediate unknown for me: is it possible to store node tree paths on tiles for constant time lookup (for easily updating UI elements reacting to events like mouse clicks).

1 Like

I tried to discuss this same topic back then and didn’t exactly know how to word my issue, but I see your post does so much better than mine and is a question I still need to have answered.

To add to this, I assume your question roots from the same worry I have that tilemaps may be too limiting for a game in which each tile has extensive functionality apart from pure visuals, which is what I think tilemaps are primarily made for. At the same time, I understand the constraint that comes from heavy use of nodes for things that are better handled (speaking from performance) with techniques like tilemaps or Godot servers.

1 Like