Hi,
what is the best way if I want create open world game (like 2d minecraft) - one huge Tilemap or grid of Tilemaps ? I want to load and unload tiles dinamicaly near player (and near his buildings) using threads.
1) In case Tilemap grid it will be easy to code but I'm worred about optimisation. At one time I need about 30 tilemap's chunk in this case. And I'm new in Godot and don't know if I will have problems with connecting nearest Tilemaps from grid
2) And if one huge map - I'm worred about perfomance. What is max size of Tilemap? And abouth theads (I read that Tilemap is not thread safe).

Both would probably work fine. TileMap size limit is not really important here because you always have about the same number of live cells in it. Godot's tilemaps also don't really care about physical size, only about number of live cells. The storage is not some pre-allocated 2d array. If you for example have just two active cells, one at [0, 0] and other at [999999, 999999], it'd pretty much be the same as having one at [0,0] and other at [0,1].

Things are also relatively easy to test out using dummy tiles.

As for thread safety, you don't really need to access TileMap objects from threads. Do the actual loading from threads and then populate with loaded data from the main thread or from coroutines if there happens to be a lot of data at once. It's even less important if you use multiple TileMap objects. A TileMap that's in the process of loading/setup will not yet be in the scene tree. In that state it's likely safe to access it from a thread.