• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Will This Lag?

Status
Not open for further replies.
  • Fog
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fog_State Less than 1.00
        • Then - Actions
          • -------- Decrease fog --------
          • Set Fog_State = (Fog_State + 0.05)
          • Set Fog_Min = (Fog_Min + 15.00)
          • Set Fog_Max = (Fog_Max + 15.00)
        • Else - Actions
          • -------- Increase fog --------
          • Set Fog_State = (Fog_State - 0.05)
          • Set Fog_Min = (Fog_Min - 15.00)
          • Set Fog_Max = (Fog_Max - 15.00)
      • Environment - Set fog to style Linear, z-start Fog_Min, z-end Fog_Max, density 0.01 and color (80.00%, 90.00%, 100.00%)
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
I use a test run to find out if it would lagg. "Stress Test" in common language.

Make a trigger that runs every ... seconds of game time. (easy)
Make another trigger that adds the action to the first trigger every second. (The first second it will be called once, the second second it will be called twice, etc, etc, etc.)
Also increase an integer variable by 1 every second so you know how much actions it has and let the game display the integer.

Then just wait and see...

(you can ofcourse add more per second.)
I have added 250 per second and they will be called 10 times per second. Increasing the action by 2500 per second.

I've made an example (attached file) and you can see that after 100 seconds, the game will look a bit weird and after 350 seconds the lagg appears.
100 seconds = calling that trigger 250.000 times a second!
350 seconds = calling that trigger 875.000 times a second!

With your 0.1 seconds of game time, you will call it 10 times. so you need 874.990 more to get your so much desired lagg ;)

have fun with the next one \o/

(It has to be in JASS though, but you wouldn't care about it.)
 

Attachments

  • StressTestFog.w3m
    16.7 KB · Views: 34
Level 24
Joined
Aug 1, 2013
Messages
4,658
Lagg is delay. Both delay in fps (computer) and in ping (internet)

Latency is internet lagg in specifics though.
We were talking about fps lagg (frame rate drop as you call it) the whole time because this trigger runs on every pc and not on one and then transferring to the others.

The /fps is new for me though. Seems usefull.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
if action is performance heavy, it will drop your frame rate too, because you have less time to render stuff to screen, hence you can render it fewer times per second.

As Maker said, /fps ingame will show you, if you see the number decrease below 60, it is heavier than usually. If it however doesnt go below like 50-55, I wouldnt be conserned
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
if action is performance heavy, it will drop your frame rate too

That is not necessarily true.
When you have an action that is performance heavy but just not heavy enough to drop the frame rate.
All other actions together will drop it anyway.

Lets say, you have a massive map and you have millions of actions running all the time. You have to recognize performance heavy actions. Even though they dont drop the frame rate themself.

Like in my example. The action on the first second is not very performance heavy. The one on the 350th second is actually dropping frame rate.
But the one on 200 is not.
Then you have another one that is equal as heavy as the first, your frame rate will drop massively, but according to you, there are no performance heavy actions so I don't know what I should do in that case.

I hope this clarified it and I think that this difference is what Mythic meant.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
well obviously LoadInteger... is heavier than array access, but wont cause any lag. Im talking about really heavy operations.

Also frame rates are not all that great, because if you place 400 units into your screen(within camera bounds), you will have lag with no triggers involved.
 
Status
Not open for further replies.
Top