@Brainblox said:
Thanks, but the question was directed to anyone, anyways.
I gotcha. :+1:
My concern is that I want to have demolishable structures like Zombies being able to tear down walls etc., but I fear that it will lead to a massive FPS drop with a bigger map when all the structures are also MeshInstances.
For the main structures, I think you could still use GridMaps for things like walls, floors, ceilings, and stuff like that. It would be a little more difficult if these objects each have their own health, but it should be doable. What you may need to do is have something like a Dictionary or Array where the index can be the individual tile (maybe the tile position as the key/index?) and then access the per-tile data that way. Then you can have the advantage of being able to store per-tile data without having to manage each individual tile.
For things like ovens, doors, and interactive objects, the reason I'd suggest using a MeshInstance is so you can animate it, have per-instance properties (rather than having the Gridmap node store and process the data), and the ability to have more complex node setups (audio, collision shapes, etc). From a performance perspective, I think it's mostly a GPU difference when compared to the GridMap, as the GridMap can take advantage of GPU instancing to render the entire Grid in a single draw call, while MeshInstances do this per material if I recall correctly.
That said, with MeshInstances you get the benefit of occlusion culling with the Camera, which you do not get with GridMaps. When the camera looks at a GridMap AABB, it will draw the entire GridMap quadrant even if the camera only sees the edge. Because it uses GPU instancing, it generally doesn't massively effect performance, but it can mean that the GPU renders meshes that wouldn't be seen (like ovens inside a house even if the wall is in front of it). So, depending on how many objects you have in a house/building, it may be slightly more performant to use MeshInstances.
Another benefit with MeshInstances is you can hide them by changing their visibility when the player gets too far away, saving rendering time. You can do this with GridMap nodes too, if you have each "chunk" of the world be all in a single GridMap.
That said, I haven't made a game that uses demonlishable structures myself, so please take what I have written with a grain of salt. I remember seeing on the Godot Reddit someone who was making a Fortnite-like building system, so I think it's totally possible to have demonlishable structures in Godot, though I'm not sure if they used GridMaps or not.