Open xezon opened 3 weeks ago
Might be related to Demo_BombTruck explosions as Demo_BombTruckDefaultExplosionTrail
and Demo_BombTruckDefaultExplosionTrailSmoke
have SystemLifetime = 0
.
It degrades the most when you hit a multiple units & structures with something big, like MOAB. BombTrucks are usually at Demo's base.
Also, I've noticed that most of the structures have multiple SmolderingSmoke
& SmolderingFire
effects which also have SystemLifetime = 0
and become more flaky as effects accumulate. They should be tied to ConditionState
changes, but they could be leaking...
Overall, I suspect that there are lots of minor leaks that accumulate and degrade the performance. As the game goes, the number of units/buildings can reduce, but the memory usage of the game only continues to raise with each killed/destroyed object.
It is a good lead. Can you download test map https://github.com/TheSuperHackers/GeneralsGameData/tree/main/Maps/Any/!TestAllFactions and build many units, kill them, and confirm the findings? If we narrow it to the specific unit(s), then we can go from there.
Bomb Truck did have a number of particle changes yes.
I've run a number of tests and wasn't able to reproduce this on a test map. I guess this was due to overall laggy nature of original Twilight Flame (although I haven't seen it previously eat into effects) and maybe the matchup of Demo vs SW producing lots of effects.
This is what it looks like:
Memory wise both testing and the game above looked the same. Maybe you have any idea what this could be? I've also uncovered an actual issue with structures' damage effects, I'll create a new issue for that later.
I've seen this before on large FFA games, tends to happen when there's too many particle effects on the screen, i suspect it gets highlighted with demo due to the fact that all the units of demogen generate extra effects due to the demo upgrade detonation effect
The evidence from the video implies that the particle pool is exhausted. It is possible that there are lingering particle instances that are never deleted. We need to isolate which they are and then look at their setup.
I'd say that this probably goes beyond the title of this issue and doesn't relate solely to https://github.com/TheSuperHackers/GeneralsGamePatch/pull/2311 -- the added effects are copies of existing ones and differ in size and colors mostly. Replacing them with original effect produces the same outcome.
If I understand correctly, the SystemLifetime
is the minimum number of frames the particleSystem should be executed, so that if it is less then Lifetime
- it can be stopped & overridden by other effects. While if Lifetime
< SystemLifetime
- it is how many times the effect should be repeated (for example - TankFire). Correct?
I think SystemLifetime
means life time of the ParticleSystem
in frames, with 0=forever or bound to its owner. Lifetime
means the lifetime of the effect(s) that the ParticleSystem
creates.
In #1519 I have noted:
In my understanding,
SystemLifetime = 0
is only ok if the parent object is short lived. If lifetime is uncapped, then particle will spawn every frame and live forever.On quick inspection, there are at least 2 suspicious effects:
JetBurning WaterSpraySplash
I do not know if this is relevant for this issue. But my suspicion is that a ParticleSystem
with SystemLifetime=0
is at fault.
@xezon I've actually noted another thing I'm suspicious of - BurstDelay
:
Quite a lot of effects have 99999
with a large number of BurstCount
. I've played with numbers and it doesn't seem to affect anything. It would imply that it is a delay between firing each burst, but it doesn't seem to.
Here is the test with two demo rebels, both using only RedDonuteCloudLite
with BurstCount = 75.00 75.00
, but one on the right (that is being killed) has BurstDelay = 0.00 0.00
, while the left one suicides with BurstDelay = 99999.00 99999.00
I can't tell any difference (apart from Suicide hit effect). I then went to game and played vs Demo and haven't noticed any effect degradation!
In some of your changes, I think for tanks muzzle effects, you've changed it from 99999 to 0 quoting BurstDelay = 0.00 0.00 ; Patch104p @tweak from infinite to spawn more than one puff
-- have you observed any actual change?
BurstDelay
is min..max frame delay until next particle burst.
BurstCount
is min..max number of particle spawns on this frame burst.
BurstDelay=99999
means that we have an initial particle spawn, and then wait 99999 frames (3333 minutes) until the next spawn - if the particle system remains alive.
BurstDelay=99999
means that we have an initial particle spawn, and then wait 99999 frames (3333 minutes) until the next spawn - if the particle system remains alive.
So basically 99999 is meaningless, effectively 0, correct?
BurstDelay = 99999
means that effect will effectively spawn once. I think it is synonymous for SystemLifetime = 1
Thanks for explanations. Well, then that's out of the way... Must be something else.
I think the game skips particle effects by taking into account all of them on the map no matter if they are in player's view or not. That's what could be causing it, especially if the particle cap is set to a low number.
I have now tested Demo General, building very many Bomb Trucks, Scud Launchers, Quads, Scorpions, Bikes, Busses, RPG, Mobs, Terrorist, etc, then shooting, suiciding them. I have observed no performance degradation or particle issues.
@Float1ngFree Please upload a replay where the issue occured and note the commit hash you used for it.
Originally posted by @Float1ngFree in https://github.com/TheSuperHackers/GeneralsGamePatch/issues/2311#issuecomment-2168126512