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

preventing attacking units from returning

Status
Not open for further replies.
Level 6
Joined
Jun 16, 2007
Messages
235
And how do you make units attack again after they have been stunned and confused?
(rhetorical question)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Define what you mean by heavy lag?

The movement system can support anywhere between 50 large conjested units and 400 small free units (collision size) moving at once per player. The result of reaching the limit is units nolonger are able to travel at full speed for a certain player and can suffer from responsiveness problems. Massivly exceeding this limit will literally bring all unit movement to a very slow crawl for a certain player during which it is possible to see units moving 1 at a time.

Performance wise, inactive units (like buildings) can reach into the thousands per player without any problem. Active combat units can reach a hundred per player without problems. Units with extreemly large aquisition range in numbers can cause problems when in combat. Units which are triggering script events can cause problems in large numbers (as script events are very slow).

Network traffic wise there is no real way to cause lag unless a client in a multiplayer session has extreemly low speed (dialup) or an illegal thirdparty bot is being used to generate bogus instructions and thus cause network conjestion (lag). Having scripts call too many network syncronized natives will cause lag as well.
 
Level 8
Joined
Apr 26, 2011
Messages
403
Hi leviathan221,

My map have 400-500 unit fighting at same time with 8 players, and lag seen fine (host by Hostbot or good player).

Just avoid massive trigger/script during massive fight. eg
- don't order all unit at same time, put them into difference group base on difference phase (eg, before fight, after fight, difference region region etc.)
- then use period event to order them with condiction(eg, unit is not attacking, or unit is in region A)
 
Level 6
Joined
Jun 16, 2007
Messages
235
You forgot to mention that you have 4 different computer players.
400-500 / 4 comps = 100-125 units per computer player which is just fine.
Half-truth is the same as lying btw.
 
Level 8
Joined
Apr 26, 2011
Messages
403
You forgot to mention that you have 4 different computer players.
400-500 / 4 comps = 100-125 units per computer player which is just fine.
Half-truth is the same as lying btw.

What wrong with you ?

I told him the situation, and the possible solution to reduce lag for this situation.

It is truth that i have 400-500 units fighting at same time, all of those 400-500 units are belong to Player 11 & 12 (fighting require minimum 2 players).
 
Level 6
Joined
Jun 16, 2007
Messages
235
I read only the first line and thought that you were trying to imply that having 400-500 units does not lag. (I also briefly checked your map picture and saw 4 computer players)

My bad, sorry.

===========================
PS: "unit is not attacking" condition is proven to fail with too many units.
The best general solution I found for this problem is to SetUnitUserData to random number 1-10
And then periodically order unit only if it's user data number matches with current period counter.
 
Status
Not open for further replies.
Top