![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Tar_Get() |
My question involves future plans of how the tilemap navigation will be implemented.
I’m pretty far into developing a sandbox colony simulation. GDscript and C# are performing much better than I thought for so much code! Godot’s pretty dope.
Currently, to simulate mining, I remove a wall (as an automapped terrain set) then add a nav tile on a separate tilemap for the NavServer/NavAgent to use. The nav tile has a nav mesh defined to the outer edges of the tile (making the nav mesh smaller makes the system even slower). When I have a group of 100 agents mining tiles, the framerate drops to 1 FPS (probably lower). The map is 200x200, but even with a 50x50 tilemap, it slows down to around 50 FPS. The larger the map, the more tiles the tilemap has to update to rebuild the nav mesh.
It’s definitely the nav tilemap.set_cell function that’s slowing everything down.
I switched to astar with a basic custom nav array and I don’t lose a frame (165hz monitor) with the same procedures. I like astar, but it’s a little too precise (robotic) to simulate human movement without a lot of tweaking. It also lacks built in avoidance.
Does anyone know if the tilemap update will become more localized in the future? It seems like rebuilding the entire nav mesh is incredibly inefficient.
Or maybe I’m just using it wrong?