• 🏆 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!

Will this cause lag?

Status
Not open for further replies.
Level 6
Joined
Jul 2, 2013
Messages
153
Will having like 5-10 triggers at once running at 0.02 sec each cause some lag? Even minor?
 
Level 7
Joined
Nov 19, 2015
Messages
283
Every 0.01 seconds
Do nothing

This won't lag.:ogre_hurrhurr:

It depends what you are doing. If you have a lot of actions being carried out then yes it will lag. Most triggers don't need to be that fast and you can usually find a way to fix it. Make sure you clear all your leaks because if you leak that many times per second then you will defiantly lag.
 
Level 12
Joined
Jan 2, 2016
Messages
973
The triggers themselves aren't leaking.
What they are doing:
pick a random point from the playable map area, and drop a meteorite there. Wait 2,4 seconds (until the meteorite falls), and they pick all the player controlled units in range, and damage them.
 
Level 7
Joined
Nov 19, 2015
Messages
283
The triggers themselves aren't leaking.
What they are doing:
pick a random point from the playable map area, and drop a meteorite there. Wait 2,4 seconds (until the meteorite falls), and they pick all the player controlled units in range, and damage them.

Thats not really going to lag. What are you doing every 0.1 seconds anyway?
Only really small values such as 0.01 is going to cause extreme lag with heaps of actions. I don't understand why you guys are asking rather than just using it. If it lags then post the triggers here and people can help optimize it.
 
Level 15
Joined
Aug 14, 2007
Messages
936
Those kind of events will have insane amount of server stress (network) which lag THROUGH the network spam, having more than ONE of those 0.02 triggers is and will make the game Glitchy due to the game inability to process it (only applies in multiplayer) And makers often ask why the fuck does my spell lag and guess wut, create 1 thousand units.
 
Level 12
Joined
May 22, 2015
Messages
1,051
The triggers themselves aren't leaking.
What they are doing:
pick a random point from the playable map area, and drop a meteorite there. Wait 2,4 seconds (until the meteorite falls), and they pick all the player controlled units in range, and damage them.

Creating a wait 10 times per second can cause problems when you play online. It will create input delay for everyone if there are too many or if some other latency is happening it can make it worse to have a bunch of waits (even if they normally don't cause anything noticeable).

Every 0.1 seconds is not a problem at all, though. I would just update these to use timers. It is a really big boost to accuracy and map speed, and it's a very standard practice in JASS code (which you are learning about from what I've seen).
 
Level 12
Joined
Jan 2, 2016
Messages
973
Creating a wait 10 times per second can cause problems when you play online. It will create input delay for everyone if there are too many or if some other latency is happening it can make it worse to have a bunch of waits (even if they normally don't cause anything noticeable).

Every 0.1 seconds is not a problem at all, though. I would just update these to use timers. It is a really big boost to accuracy and map speed, and it's a very standard practice in JASS code (which you are learning about from what I've seen).
Yeah, I am planing to rewrite my triggers in JASS when I get the time.
I did these triggers when I still had no idea how to do them with timers.
Anyways... 0,1 seconds isn't a problem, even if it runs 4 times at once? (The 4 triggers essentially do the same thing. I just turn off/on some of them, depending on the game difficulty chosen)
 
Level 12
Joined
May 22, 2015
Messages
1,051
Yeah, I am planing to rewrite my triggers in JASS when I get the time.
I did these triggers when I still had no idea how to do them with timers.
Anyways... 0,1 seconds isn't a problem, even if it runs 4 times at once? (The 4 triggers essentially do the same thing. I just turn off/on some of them, depending on the game difficulty chosen)

It shouldn't be a problem if that's all they're doing. It will only be a problem over network (and even then, you may not notice it until there is some latency from a player outside things from inside the game or you add a bunch of other waits for a spell or something).

It's probably better to have them condensed into one trigger (perhaps even just timers with no triggers once you go full JASS), but it shouldn't be a problem. You'd notice it, most likely, if it were a problem. Just note that adding many things like this will eventually cause problems. It's just when it starts hitting the threshold of being too much that it becomes an obvious, big problem.
 
Status
Not open for further replies.
Top