Godot Version
4.4
Question
I am trying to build a system in which the stuff shown depends on the player’s position, as in any proper rouguelike.
The theory is fine (somehow).
However, if my screen is say 1600x1000 and my items are 16x16, I have 6250 of them (at least!) in the screen, plus the player. And the game slows down a lot, it is untolerable. We’re talking 9-10 FPS on the profiler. Yuck.
If I reduce the screen size by 1/4 i.e. 800x500 (and the objects count become 1/4 as well) everything gets back to smooth.
6000 items should not be a problem. Of course, each “item” has something inside: it is not 6000 nodes therefore, the scene has about 30k nodes since each “item” has a shape, an area2D or two with its colliders, maybe animation players (doing nothing for now)… That said, only 6k of them are “_processing” (not physics processing).
For some reason, on the profiler I see about same time (50-60 ms) for both process AND physics_process, but the only guy doing physics_process is the “player” node, all the others are _process.
Whatever. Any suggestion on how to speed up this thing? is it normal that 6000 items processing and essentially doing some checks makes up for such a slowdown?
Unrelated question. Once upon a time the test window was a normal window with its nice standard buttons such as the close “X” button on the top right. Now it is filled with a lot of interesting stuff but no standard button. How to restore them?
Thank you very much