Zwiebelchen
Hosted Project GR
- Joined
- Sep 17, 2009
- Messages
- 7,234
We all know that the amount of units and destructables on the map have a drastical impact on the game FPS.
On my 480x256 sized map, after the need of placing almost 1000 invisible plattforms (thanks to the alpha tile screwing up when under the effect of fog of war), I experienced an FPS drop to like 30 fps now. If I remove all plattforms, the FPS goes back to the normal 55-60 fps.
I did some tests and noticed, that only the amount of actually shown destructables matters - regardless of wether they are within the camera view or not. The same should apply to units.
So I had this idea to use the ShowDestructable() or ShowUnit() native to increase the performance of my map and simply hide all units and destructables, that are currently not viewed by the camera locally.
My question is: Has someone experience with this? Or does a system like that already exist? If not, I wonder why nobody thought about this yet.
Maybe someone is interested to code a system like that?
Just something to consider: getting a unit's or location's Z globally will probably desync on hidden destructables, as hidden destructables are not walkable, so there should be a function to get those values safe.
On my 480x256 sized map, after the need of placing almost 1000 invisible plattforms (thanks to the alpha tile screwing up when under the effect of fog of war), I experienced an FPS drop to like 30 fps now. If I remove all plattforms, the FPS goes back to the normal 55-60 fps.
I did some tests and noticed, that only the amount of actually shown destructables matters - regardless of wether they are within the camera view or not. The same should apply to units.
So I had this idea to use the ShowDestructable() or ShowUnit() native to increase the performance of my map and simply hide all units and destructables, that are currently not viewed by the camera locally.
My question is: Has someone experience with this? Or does a system like that already exist? If not, I wonder why nobody thought about this yet.
Maybe someone is interested to code a system like that?
Just something to consider: getting a unit's or location's Z globally will probably desync on hidden destructables, as hidden destructables are not walkable, so there should be a function to get those values safe.