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

Unit Stutter Step & Triggers

Status
Not open for further replies.
Level 5
Joined
Aug 8, 2019
Messages
113
I believe that running more trigger does induce more lag, but it also depends on the version of warcraft you are running as well as your computer.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Does having more running triggers cause unit movement lagg to happen earlier?
Triggers are not directly related. Triggers may be indirectly related in that triggers causing a player to have more units moving will have an effect.

The path finder issues movement updates at a fixed rate. This is done at a rate like 50 times per second per player in a staggered way. Each movement update lasts for a finite time, depending on the pathing complexity of the local area and if the unit collides with anything. Unit collisions will instantly discard the last movement update causing the unit to come to a stop and wait until another movement update is issued to it. Like wise issuing a new order that requires a unit move will also discard the current movement update for the unit. Movement updates can be replaced with newer ones issued to the unit, and a unit without a movement update will not move. If too many units are moving or colliding at once the rate at which movement updates are issued to the units is not sufficient to keep the units from running out of movement updates and hence the units will appear to periodically stop or "stutter step".

This means that the maximum number of fluidly moving units a player can have is based on how complex the pathing is that the units are moving through as well as how often unit on unit collisions occur. This is why TD maps often disable unit collision and rely on very simple lane designs.

Game speed, frame rate, network latency and CPU performance have nothing to do with this. A work around can be to divide the units over more players as the limit is on a per-player basis. Additionally avoid triggers that issue of a lot of orders requiring units move as each time such an order is issued the unit will require another movement update before it can begin to move.

This issue is completely different and unrelated to the retarded unit movement bug. If too many map cells are mapped to regions then the path finder breaks in rather absolute way and will no longer move units around in a way that makes sense. For example it will fail to find paths between two points that are obviously connected and will think nothing of marching units repeatedly against a dead end in an almost cartoon like fashion. This is why one should only use a single "a unit enters (playable map area)" event.
 
Status
Not open for further replies.
Top