- Joined
- Nov 24, 2012
- Messages
- 218
Hello, I recently started coding for this map: Fortress Survival Alpha
I received it in a mess, I didn't expect the map to be 98% leaking GUI,
1% Pro vJass, and 1% Noob Jass, and when I copy the code in text it added up to over 60,000 lines. I reduced it to 40,000 recently, but still a lot.
I thought I had removed most of the leaks, but Handle Counter says otherwise.
I placed a Handle Counter and it starts game with 10,000.
By the end of game (50 minutes) the count is at 100,000 with 3 players.
If the map was leakless, would it be right to assume the end count should be 10,000 as well?
I notice an increase of approximate 150 per 5 seconds of handle counter checking.
Here are some periodic triggers that seem to be pretty heavy, do they leak or is any coding really inefficient?
Also, can converting it to Jass remove more leaks? Such as, nulling triggers?
This trigger here runs every 5 seconds and picks every enemy unit in map (sometimes 100+), and I have 4 copies of it since certain areas with elevations need more AI.
I also have about 100 triggers with event: A unit is attacked.
Some towers attack as fast as 0.20 seconds, can this lag? Or will trigger leak everytime everytime it runs?
Also, dozens of bosses have their own "A unit is attacked" event which in response they cast certain spells.
Should these be turned on only when boss is in map, and turned off when boss dies, or does it not really matter?
Anything really bad in this? There are literally like 100 triggers of this kind.
So, any leaks, will easily stack up. I thought there were no leaks but the leaks are pretty bad.
Also, will the code be faster if I made "A unit by player 12 is attacked" rather than "A unit is attacked"?
Here's the 3rd and final trigger of concern.
This trigger probably runs like 1000 times in a minute.
It upgrades the enemy's attack power as they attack more.
============================================
Map also has desync issues, maybe 1 in 5 games.
I have gone insane searching for the cause(s).
Absolutely no getlocalplayer() except beginning, which has never desync'd (desyncs tend to happen mid/late game).
No deformations, no pan camera thingie, limited use of custom models so something being corrupt should be unlikely, unless a model can be corrupt but seemingly working fine?
I've gone absolutely crazy from this. Testing with myself on 3 wc3s, and stuff.
Now I'm starting to think the attack damage auras (99,999 range) are causing it.
The auras blink like crazy on the buff screen, on and off.
Say a unit has 100-100 damage, with 2X crit, and 100% dmg aura (global, blinking on and off)
When it crits, I see 200 damage sometimes, and 400 damage others.
Also, can training like 200 units per second in a map desync? The income system (lumber) is by automatic training of lumber "units" which are then removed when complete and you get +1 lumber.
As for dice damage, since FS does use large numbers, majority of the dice goes like this : damage number of dice: 1, sides per die: 11, basically 10 damage range. some bosses/towers have dice up to damage # 22: sides per die, 26. Is this too much? These attack roughly once every second.
Oh yes, I have experienced desyncs myself. I usually am not doing anything while desync occurs. Usually it instant drops me, sometimes I enter a different game state. How could this be possible with no getlocalplayer?
If anyone picks something up that could potentially lower handle counter from spamming its way up to 100,000, please tell.
That, or desync as well. I'd be so happy if I could get desync out of the way. Still doing various tests on that myself with kLoader.
Kinda hard to test since I desync maybe every 3-5 hours of playing with 3 wc3s. I can't really handle more instances.
I received it in a mess, I didn't expect the map to be 98% leaking GUI,
1% Pro vJass, and 1% Noob Jass, and when I copy the code in text it added up to over 60,000 lines. I reduced it to 40,000 recently, but still a lot.
I thought I had removed most of the leaks, but Handle Counter says otherwise.
I placed a Handle Counter and it starts game with 10,000.
By the end of game (50 minutes) the count is at 100,000 with 3 players.
If the map was leakless, would it be right to assume the end count should be 10,000 as well?
I notice an increase of approximate 150 per 5 seconds of handle counter checking.
Here are some periodic triggers that seem to be pretty heavy, do they leak or is any coding really inefficient?
Also, can converting it to Jass remove more leaks? Such as, nulling triggers?
This trigger here runs every 5 seconds and picks every enemy unit in map (sometimes 100+), and I have 4 copies of it since certain areas with elevations need more AI.
-
Wall Attacks
-
Events
- Time - Every 5.00 seconds of game time
- Conditions
-
Actions
- Set Temp_Group = (Units owned by Player 12 (Brown) matching (((Unit-type of (Matching unit)) Not equal to Euxo) or (((Unit-type of (Matching unit)) Not equal to Nightstriker) or (((Unit-type of (Matching unit)) Equal to Sniper [2]) or (((Unit-type of (Matching unit)) Not equal...ETC
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Set TempPoint = (Position of (Picked unit))
- Set TempGroup = (Units within 128.00 of TempPoint matching (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempGroup) Greater than or equal to 1
-
Then - Actions
- Unit - Order (Picked unit) to Attack TempUnit
-
Else - Actions
- Custom script: call DestroyGroup (udg_TempGroup)
- Set TempGroup = (Units within 400.00 of TempPoint matching ((((Unit-type of (Matching unit)) Equal to Large Fortification) or ((Unit-type of (Matching unit)) Equal to Light Wall)) or (((Unit-type of (Matching unit)) Equal to Medium Fortification) or (((Unit-type of (Matching...+30 more unit types)))
- If ((Number of units in TempGroup) Greater than or equal to 1) then do (Unit - Order (Picked unit) to Attack (Random unit from TempGroup)) else do (Do nothing)
-
If - Conditions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call DestroyGroup (udg_TempGroup)
- Custom script: set udg_TempPoint = null
- Custom script: set udg_TempGroup = null
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: set udg_Temp_Group = null
-
Events
I also have about 100 triggers with event: A unit is attacked.
Some towers attack as fast as 0.20 seconds, can this lag? Or will trigger leak everytime everytime it runs?
Also, dozens of bosses have their own "A unit is attacked" event which in response they cast certain spells.
Should these be turned on only when boss is in map, and turned off when boss dies, or does it not really matter?
-
Assassin Ultimate
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Unit-type of (Attacking unit)) Equal to Shadow Assassin
- (Random integer number between 1 and 125) Equal to 125
-
Actions
- Trigger - Turn off (This trigger)
- Set TempPoint = (Position of (Attacking unit))
- Unit - Create 1 Dummy for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
- Unit - Add a 1.30 second Generic expiration timer to (Last created unit)
- Unit - Add Red Assassination Lightning [Assassin Tower Ult] to (Last created unit)
- Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Attacked unit)
- Custom script: call RemoveLocation (udg_TempPoint)
- Wait (Random real number between 0.50 and 3.25) seconds
- Trigger - Turn on (This trigger)
-
Events
Anything really bad in this? There are literally like 100 triggers of this kind.
So, any leaks, will easily stack up. I thought there were no leaks but the leaks are pretty bad.
Also, will the code be faster if I made "A unit by player 12 is attacked" rather than "A unit is attacked"?
Here's the 3rd and final trigger of concern.
This trigger probably runs like 1000 times in a minute.
It upgrades the enemy's attack power as they attack more.
-
Fury Mad
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Owner of (Attacking unit)) Equal to Player 12 (Brown)
-
Actions
- Unit - Set the custom value of (Attacking unit) to ((Custom value of (Attacking unit)) + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Boss Marker for (Attacking unit)) Not equal to 1
-
Or - Any (Conditions) are true
-
Conditions
- (Custom value of (Attacking unit)) Equal to 30
- (Custom value of (Attacking unit)) Equal to 60
- (Custom value of (Attacking unit)) Equal to 90
- (Custom value of (Attacking unit)) Equal to 120
- (Custom value of (Attacking unit)) Equal to 150
- (Custom value of (Attacking unit)) Equal to 180
-
Conditions
-
Then - Actions
- Unit - Increase level of Fury [Mad] for (Attacking unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Boss Marker for (Attacking unit)) Equal to 1
-
Or - Any (Conditions) are true
-
Conditions
- (Custom value of (Attacking unit)) Equal to 60
- (Custom value of (Attacking unit)) Equal to 120
-
Conditions
-
Then - Actions
- Unit - Increase level of Fury [Mad] for (Attacking unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
============================================
Map also has desync issues, maybe 1 in 5 games.
I have gone insane searching for the cause(s).
Absolutely no getlocalplayer() except beginning, which has never desync'd (desyncs tend to happen mid/late game).
No deformations, no pan camera thingie, limited use of custom models so something being corrupt should be unlikely, unless a model can be corrupt but seemingly working fine?
I've gone absolutely crazy from this. Testing with myself on 3 wc3s, and stuff.
Now I'm starting to think the attack damage auras (99,999 range) are causing it.
The auras blink like crazy on the buff screen, on and off.
Say a unit has 100-100 damage, with 2X crit, and 100% dmg aura (global, blinking on and off)
When it crits, I see 200 damage sometimes, and 400 damage others.
Also, can training like 200 units per second in a map desync? The income system (lumber) is by automatic training of lumber "units" which are then removed when complete and you get +1 lumber.
As for dice damage, since FS does use large numbers, majority of the dice goes like this : damage number of dice: 1, sides per die: 11, basically 10 damage range. some bosses/towers have dice up to damage # 22: sides per die, 26. Is this too much? These attack roughly once every second.
Oh yes, I have experienced desyncs myself. I usually am not doing anything while desync occurs. Usually it instant drops me, sometimes I enter a different game state. How could this be possible with no getlocalplayer?
If anyone picks something up that could potentially lower handle counter from spamming its way up to 100,000, please tell.
That, or desync as well. I'd be so happy if I could get desync out of the way. Still doing various tests on that myself with kLoader.
Kinda hard to test since I desync maybe every 3-5 hours of playing with 3 wc3s. I can't really handle more instances.