• 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.

Preload Abilities

Status
Not open for further replies.
Level 6
Joined
Feb 5, 2012
Messages
1,685
So i am confuse what do you preload from the abilities?..


Dummy's used?.. like SFX Dummies?..

Variables?.. (How do i preload a variable in your ability! what the heck)
Like how do you preload TempPoint?.. or do i need to preload variables?..

What type of variables do you need to preload..

Also about the FPS again..

I played my map when everyone cast a spell it drops up to 10 fps. But after it, it will rise up to 30 fps or even 40 fps. So do you think my map leaks or its just Special Effects lag?.. cause if it leaks it will cause a Fatal Error but instead it goes back to normal, I am right?..
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
You preload abilities that you will add to a unit (for example a +armor ability). Because there is always an inevitable lag upon first time an ability is added to a unit, we preload it to avoid it ruining the map's gameplay.

The framerate drop in your map may be caused by the spell being coded ineffectively or too many effects are used or the loop interval is too small etc. That is why it only lags when that flawed code is executed.

Leaks won't cause a fatal error unless the computer is too weak that it can't handle that much memory leaks (which is unlikely these days).
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
So if my spell is not MUI or MPI but all the leaks are cleaned is that INEFFECIENT CODING?..

Efficient coding is more than just being leakfree. Efficient coding is about choosing what is the best approach for an issue. For example, GUI is inefficient comparing to JASS so coding in GUI is itself being inefficient. Or like a certain guy here always mention, repeated function calls (Thou shalt store anything you used twice or more into a variable) are inefficient. Indexing non-dynamically is also inefficient, etc.

But don't mind it too much though. It is your map after all :)
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
@Doomlord
i guess u were quoting me ? lol

Well yes indeed I do ^^

Just a thing.

I see you post this a lot. I might not be completely true. I'd rather say "thrice or more" if a clear limit would have to be set.

For example in jass, you would have to declare a local variable and then possibly null it, so the speed difference decreases.

In GUI that could result in using more variables than needed to give one example.
 
Status
Not open for further replies.
Top