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

Lag problem

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
Hi

In the map I'm making I have a big lag situation that only seems to occur in certain situations but i've looked over it multiple times and can't see any leaks or anything that would cause the lag that I get from it. Anyone able to help?

(If you want me to post triggers I will but it's probably easier to just look at the map itself as it's a part of a big system in the map)
 
Level 13
Joined
Oct 16, 2010
Messages
731
See i thought it may be something to do with lots of units being created but one of the situations is that rather than being a stationary object spawning dummy units it's a moving projectile. And the main other one is only noticeable on certain occasions but still there's not as many dummies being created in those situations as made by the stationary object, yet they all use the same system.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You also get a lagg spike when you create an ability with... lets say... 400 levels.
If you add that ability to a unit or create a unit with that ability, then you have a lagg spike.

It is hard to determine where your lagg spike occurs because we haven't got our sight in your map.
 
Level 13
Joined
Oct 16, 2010
Messages
731
Yeah I'm aware of adding abilities causes lag spikes but these don't actually have abilities as they are missile dummies (if you know what i mean by that?)



EDIT: Attached the map. The lag occurs when using the "Conference Call" item and when using the "Attack of the Drones" ability (found on the AAT Hero).

In terms of triggers both abilities use my Grenade system where there are different movement and detonation types. "Blister - Bullet" is the main one in question as that is for missiles that just hit any unit or wall they come into contact with (will be found in "Grenade Loop").
The Conference Call triggering uses the grenade system and just has it's own Movement type which can also be found in Grenade Loop.
 

Attachments

  • Bordercraft.w3x
    3.8 MB · Views: 52
Level 29
Joined
Oct 24, 2012
Messages
6,543
You have a lot of unit group leaks.

Your map triggers can be condensed and made more efficient. You boss trigger for example can be made into one small ITE.

Anything used twice or more should be stored into a variable. You should then use the variable to make the triggers more efficient and faster.

You should condense your triggers to make them more efficient.

Never use Casting Unit use triggering unit instead.

I only looked through a few triggers.

To better find the trigger that is the cause you can use a debug message and display the trigger name. When it starts to lag you will be able to see that trigger name. Then look over the trigger.

It may also be as said above you are running to many things at once. (condensing your triggers will help to avoid this.) For instance you can use a item recipe system and also an Item drop system. This will be much more efficient than your current recipe checks that you do. (I have one in the spell section. There are others in the spell section as well)

I did not have a look at everything only a quick glance.
 
Level 13
Joined
Oct 16, 2010
Messages
731
Can you give an example as to how to condense the boss trigger? Given they have different boolean variables and round limits I still don't see where to condense it.

This is quite a big project I have going on so I'd love to learn how to make it the best I can :)
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Can you give an example as to how to condense the boss trigger? Given they have different boolean variables and round limits I still don't see where to condense it.

This is quite a big project I have going on so I'd love to learn how to make it the best I can :)

You can take a look at my tutorial things you should know when using triggers / gui. That can help you a bit on making things more efficient.

On your trigger I may be able to show you an example on how to condense it soon.
 
Status
Not open for further replies.
Top