• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Some spells make map lagg

Status
Not open for further replies.
Level 12
Joined
Apr 16, 2010
Messages
584
Ok so when mine map was like 10%-15% Done spells didn't cause lags, but now when it's 60% Done and has 9000 doodads in it spells that use terrain deformation cause lags, even the simplest like Thunder Clap or Shokwave, is that suppose to happen or i did something wrong, and indeed my computer is too damn powerful too lag.
Anyone knows what could be the cause of these lags??
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Are you sure you have cleaned its leaks, carefully ?
I'm sure you might have missed it (even single leak, can produce a large effect in a Huge map)

Is Terrain Deformation causes leaks ?
I didn't know much of it, but still, a point of view
 
Level 12
Joined
Apr 16, 2010
Messages
584
I mean even the simplest like; gonna show i peace of trigger spell in which it causes lag:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Spells_BO_Range Less than or equal to 0.00
    • Then - Actions
      • Unit - Create 1 Dummy for (Owner of Spells_BO_Caster) at Spells_BO_EndPoint facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Burning Oil Dummy to (Last created unit)
      • Unit - Set level of Burning Oil Dummy for (Last created unit) to (Level of Boulde|c00ff8000r|r Strike for Spells_BO_Caster)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
      • Unit - Explode Spells_BO_Dummy
      • Custom script: call RemoveLocation(udg_Spells_BO_EndPoint)
      • Custom script: call RemoveLocation(udg_Spells_BO_Point)
      • Custom script: call RemoveLocation(udg_Spells_BO_Point2)
      • Trigger - Turn off (This trigger)
    • Else - Actions
See here dummy should War Stomp, he is, but it causes lag...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I mean even the simplest like; gonna show i peace of trigger spell in which it causes lag:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Spells_BO_Range Less than or equal to 0.00
    • Then - Actions
      • Unit - Create 1 Dummy for (Owner of Spells_BO_Caster) at Spells_BO_EndPoint facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Burning Oil Dummy to (Last created unit)
      • Unit - Set level of Burning Oil Dummy for (Last created unit) to (Level of Boulde|c00ff8000r|r Strike for Spells_BO_Caster)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
      • Unit - Explode Spells_BO_Dummy
      • Custom script: call RemoveLocation(udg_Spells_BO_EndPoint)
      • Custom script: call RemoveLocation(udg_Spells_BO_Point)
      • Custom script: call RemoveLocation(udg_Spells_BO_Point2)
      • Trigger - Turn off (This trigger)
    • Else - Actions
See here dummy should War Stomp, he is, but it causes lag...

Have you tried casting the spells, twice, or even more than that ?
Maybe it has to do with preloading the triggers or something
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Yes, terrain deformations are a lot more expensive with many doodads on the map. Also when doing permanent deformations, do not use a duration of zero, it will try to update it/execute something in intervals. This problem is not visible with a duration of 1ms but maybe only weaker.

To test whether it's because of the doodads just delete them all. There are hardly functions that are influenced by doodads, so it's unprobable that in case the lag stops then it wouldn't be because of doodads.
 
Level 12
Joined
Apr 16, 2010
Messages
584
Oh, just noticed one thing. When i cast this earthquake (modified) it doesn't lags, although AoE if this spell is epic: 2700. And this doesn't cause a lag even a bit... I even noticed that this spell leaks locations.

Edit: don't want to create another thread so i'll add some other problem here. This:
  • A Shokwaves
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Shokwave
    • Actions
      • Unit - Remove (Sold unit) from the game
      • Set R_Point2 = (Center of (Playable map area))
      • For each (Integer A) from 1 to 60, do (Actions)
        • Loop - Actions
          • Wait 0.50 seconds
          • Set R_Shokwave[(Integer A)] = (R_Shokwave[(Integer A)] + 6.00)
          • Set R_Point[(Integer A)] = (R_Point2 offset by 2700.00 towards R_Shokwave[(Integer A)] degrees)
          • Cinematic - Ping minimap for (All players) at R_Point[(Integer A)] for 1.00 seconds
          • Unit - Create 1 Dummy for Player 5 (Yellow) at R_Point[(Integer A)] facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Shokwave to (Last created unit)
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave R_Point2
          • Custom script: call RemoveLocation(udg_R_Point[GetForLoopIndexA()])
      • Custom script: call RemoveLocation(udg_R_Point2)
should cast 60 shokwaves in 360 degrees over some time but it's only casts 2, what is the problem?

Edit 3: +rep to defskull and WaterKnight
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Don't use waits in For Each Integer A Loops, Integer A is a global variable and could be overwritten anywhere meanwhile. Well, even if there weren't waits, some actions like ordering an unit may run another event that might use and reset Integer A. So instead try local variables.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Wait, is your Terrain Deformation, based on either Crater , Wave , Ripple , Random:
  • Environment - Create a 0.50 second Temporary crater deformation at (Center of (Playable map area)) with radius 512.00 and depth 64.00
Wait, that A Shokwaves trigger lags or not ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So, spells like Shockwave and Thunder Clap, effects the lag of the game, is it?
Not trigger-made lag ?
Also, please use this for dummy unit lifespan:
  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
0.50 is already sufficient for the time of that unit to cast a spell
Or even, 0.2~0.3
But I always use 0.5
 
Level 12
Joined
Apr 16, 2010
Messages
584
Yes, only they
Edit:
This:
  • Environment - Create a 10.00 second wave deformation from (Center of Base 1 <gen>) to (Center of Base 2 <gen>) with radius 256.00, depth 96.00, and a 0.00 second trailing delay
works like a charm. Distance between Base 1 <gen> and Base 2 <gen> is 12557.981 range. But when i cast Shokwave to the same distance it lags like hell!!!

Also, please use this for dummy unit lifespan:
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
0.50 is already sufficient for the time of that unit to cast a spell
Or even, 0.2~0.3
But I always use 0.5
thanks i'll always use this time.
 
Status
Not open for further replies.
Top