by Rachael » Fri May 19, 2017 6:33 am
Yes - ThinkerIterator can be bad to use on maps with lots of actors - especially if the excessive number of actors use it themselves - this would cause each actor to individually loop over every other actor themselves - leading to an exponential amount of processing. In C2M5, for example - let's pretend every actor used it - that's 225 MILLION (potential) iterations PER TIC just for the actors alone! And while good beefy CPU's can handle that - that's right about the point where they start to buckle. That's nevermind the other stuff - like your programs running in the background, GZDoom's scene setup, and other things that must happen before the frame gets fully rendered.
You basically have few options at this point. The best option right now is to simplify your weather processing so that it is a single texture overlaid over the player's screen while the player can view them. Creating tons actors for your weather is a bad idea on multiple fronts - especially with the number of actors spawned here. A lot of what you want to do can be done simply with intense fog and at most 3 or 4 large sprites projected out in front of the player. Doing a whole entire actor for each individual snowflake or rain drop is what's causing your performance issues here - and that kind of thing will not go away with time because CPU's are not going to increase in clock speed in the coming years. Currently, GZDoom can only do single-core processing for its actors, or else it will break netgame and demo compatibility.
The only hope you have of continuing to use the system as it is now is if GZDoom goes fully C/S and, later, starts multi-threading its actor processing - then, any CPU-specific issues can be fixed over time with simply more CPU cores. But that's something that's still on the horizon, and the possibility of that happening should not be immediately developed for - and especially not for a mod with this kind of graphic fidelity.
For steam - you may consider using a few wallsprites and summoning a few puffs here and there, rather than a single actor for every single puff.