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

Animations makes me lag

Status
Not open for further replies.
Level 5
Joined
Jan 13, 2008
Messages
96
hi...my probl is...i did a skil like crystal maiden in dota...ultimate skil...when i did the dummy, with frost nova buff....let down some ``animations`` that causes lag. what can i do for remove these ``animation``? download the screenshot to see what i want to say:)
 

Attachments

  • WC3ScrnShot_052011_002715_01.tga
    3 MB · Views: 63

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Ok please define the lag you get.

Is it...
Poor responsiveness (orders take a long time to respond to) caused by net traffic or excessivly low performance (update period exceedes network traffic delay).
Poor performance (low frame rate). This is not technically lag but people mistakenly call it so.

I am assuming poor performance as that is generally what people mean although technically wrong.

Your graphic card could be computationally weak so can not cope with all the special effects generated or you are using too many billboards when gamma correct anti-aliasing is enabled.
You could be running programs in the background which are resource intensive leaving little time to run the game (such as encoding a movie and trying to play WC3). This can be helped by eithor closing the programs or requesting WC3 be run with higher thread piority (so the kernal assigns more time to it).
An object used in the spell (like an ability or dummy unit) could be set to a computationally expensive value (such as shadow strike with a casting delay of 0) which consumes a lot of time.
The trigger coding controling the ability could have a flow control error such as an infinite loop which will waste time until the op limit is reached.
You may be creating units with collision at the same point on the map as other units which is computationally expensive to perform (works but the WC3 algorthim used to displace the unit needs a lot of time).
The artwork used by the ability may not have been preloaded and as such the game engine is forced to pause while it is retreived from disc. The frame dropping should occur at most once per session as artwork that is loaded is never unloaded during a session.
You could just be doing something that is computationally infesible. Algorthims with O(n!) or high powers of n are not usable outside of the smallest data sets. Even if the algorthims are not that expensive, you still can only run a finite number per second without causing frame skipping.

Those are about the most common causes of performance degradation (reduction in frame rate) that I know of.
 
Level 5
Joined
Jan 13, 2008
Messages
96
if use it a lots of times...it make a lag like ``low rate frames``:p...i`m not using remove Dummy from game...i`m using that action with Apply life time... and i can`t use remove units becouse i did the skil like dummy`s cast spells...not my thunder clap do damage...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
And how exactly do you place that dummy?
Do you use a location variable to place it and then remove that variable? Because if you don't: you're creating memory leaks, eventually these memory leaks lower the performance of your game engine, thus skipping a few frames.
It would be easier if you show the trigger in which you create them.

DSG said:
Poor performance (low frame rate). This is not technically lag but people mistakenly call it so.
Not mistakenly, I call it "lag" to simplify things. Wouldn't know how else I could call it.
 
Level 5
Joined
Jan 13, 2008
Messages
96
i have it like this
Event - A unit Start the effect of an ability
Condition - Ability being cast Equal to Thunder Clap
Actions - Unit - Creates a Dummy for (Owner of (Casting Unit)) at ((Position of (Casting Unit)) offset by 256 towards 0.00 degrees) facing Default building facing degrees
-Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
-Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
and actions are repetable for 4 times.... 0.00 degrees, 90.00 degrees, 180.00 degrees and 270.00 degrees
 
Level 6
Joined
Jul 22, 2009
Messages
214
You have a location leak every time you cast the spell. If you repeat it 4 time it's also mean you have 4 location leak every time you cast. Post the trigger in a trigger tag like this. [trigger=Option]value[/trigger] If you want to know more about leaks and how to solve them read this.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You have a location leak every time you cast the spell. If you repeat it 4 time it's also mean you have 4 location leak every time you cast. Post the trigger in a trigger tag like this. [trigger=Option]value[/trigger] If you want to know more about leaks and how to solve them read this.

2 location leaks per unit* (The location of the casting unit + the offset-location).

You'll need to use 2 location variables for that.
Set one location variable to "Position of (Casting Unit)"
The other to "LocationVariable1 offset by 256.00" (or something)
Then use "Create unit at LocationVariable2"

Now you'll need two custom scripts:

call RemoveLocation(udg_VariableName)
Where you must change "VariableName" with the names you've given to the variables (do not change the "udg_").
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Not mistakenly, I call it "lag" to simplify things. Wouldn't know how else I could call it.
There are 2 parts to it actually.
There is frame skipping where nothing more than the render process for frames gets skipped (which removes GPU bottlekneck and also is CPU expensive).
Finally the game speed slows down.

The game firstly frame skips to try and keep the game running at the desired speed.
It can only skip so many frames though before it is foreced to render 1 (to stop 0 FPS) but at that point the game speed itself will have to be slowed down (as your computer can not do all the calculations fast enough for play at that speed).

I think frame skipping is done on a catch up baisis. If it is running behind it will skip frames until it is ahead of schedual or the maximum skip number is reached.

What can happen though is the frame skip hits a very high value (I think 30 or 60 frames get skipped) which results in lag (as you only can issue orders every frame so you can work out the minimum period between orders).

It is good to separate them with their correct meanings as it allows easier problem diagnostic. For example lag can be caused by calling the damage point native excessivly every second (as it creates net traffic apparently) which is signified by orders taking up to 15 seconds to respond to in muliplayer games. On the other hand creating 1000 special effects per second in the view of a player will likly cause frame skipping to occur, however no latency in issuing orders will occur if the frame skipping is not extreem enough.
 
Status
Not open for further replies.
Top