- Joined
- Apr 16, 2025
- Messages
- 160
I am creating a custom universal cleave, suitable even for ranged units. The point is that the damage is done in a 300 area. What's the problem, you might ask? The problem is that my unit makes 30 attacks per second. The FPS drops a lot. How can I create area-of-effect (AoE) damage with minimal performance impact?
I'll say right away that I've done a lot of testing (I use the damage engine). I'll share them now, and if you know a better way, please tell me about it, it's interesting to listen to.
1) The worst option: use the area damage trigger. For some reason, it's wildly unoptimized. The FPS drops from 60 to 20. In addition, you can't attach the blood effect to a combat unit that has received damage.
2) create your own temporary group, add creatures to it within a 300 radius of the combat unit that received damage. Then select each combat unit in the group and deal damage to it. If she is dead or outside the 300 area, then remove her from the group. Result = so-so. FPS drops from 60 to 30.
3) create a regular group with the "set bj_wantDestroyGroup = true" trigger before creating the group. Result = so-so. FPS drops from 60 to 30.
4) create a temporary group and reset it with the "call DestroyGroup(udg_TempGroup)" and "set udg_TempGroup = null" triggers. The result is 1 FPS more than in the third case. Still nonsense.
5) Then I tried many spells, converting their damage to physical. Frostnova turned out to be the best, but it has an internal limit of 30-50 targets. FPS 30.
6) All aura spells, like Demonhunter's Immolation, work with a delay, alas. And in general, the result is the same as with Frostnova.
7) Created a dummy unit that deals damage like a catapult. This is a nightmare, how bad. It seems to even try to damage the dead. FPS 15. Besides, no matter how hard I try, the attacking dummy unit still attacks with a 0.1 sec delay.
8) Do you have your own version, the most effective one?
I'll say right away that I've done a lot of testing (I use the damage engine). I'll share them now, and if you know a better way, please tell me about it, it's interesting to listen to.
1) The worst option: use the area damage trigger. For some reason, it's wildly unoptimized. The FPS drops from 60 to 20. In addition, you can't attach the blood effect to a combat unit that has received damage.
2) create your own temporary group, add creatures to it within a 300 radius of the combat unit that received damage. Then select each combat unit in the group and deal damage to it. If she is dead or outside the 300 area, then remove her from the group. Result = so-so. FPS drops from 60 to 30.
3) create a regular group with the "set bj_wantDestroyGroup = true" trigger before creating the group. Result = so-so. FPS drops from 60 to 30.
4) create a temporary group and reset it with the "call DestroyGroup(udg_TempGroup)" and "set udg_TempGroup = null" triggers. The result is 1 FPS more than in the third case. Still nonsense.
5) Then I tried many spells, converting their damage to physical. Frostnova turned out to be the best, but it has an internal limit of 30-50 targets. FPS 30.
6) All aura spells, like Demonhunter's Immolation, work with a delay, alas. And in general, the result is the same as with Frostnova.
7) Created a dummy unit that deals damage like a catapult. This is a nightmare, how bad. It seems to even try to damage the dead. FPS 15. Besides, no matter how hard I try, the attacking dummy unit still attacks with a 0.1 sec delay.
8) Do you have your own version, the most effective one?
Last edited:












