TileMap Highlights
Closed this issue · 2 comments
Byteron commented
Using TileMaps for all the highlighting will improve performance a lot because 1. add_child() / remove_child() is more costly than set_cell() and rendering hundreds, if not thousands of separate sprite nodes also has a much higher impact than rendering a single tilemap with hundreds or thousands of tiles set.
- buildables
- tile selector
T4g1 commented
- We are talking about 64x64 nodes
- On what do you base that assumption? Can you make a benchmark of what would be the difference?
I believe the engine is using quadtree/octree (or some other space management algorithm) to handle scene so amount of nodes at the screen is really all that matters here
Still, it would surely make a difference but is it a big enough difference to be noticeable?
Byteron commented
There are severy FPS drops when
- placing a unit - probably the buildable tiles
- when removing a building active + moving the mouse. Probably inside an input(event) function