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

My map is lagging hard and I need help

Status
Not open for further replies.
Level 6
Joined
Jul 12, 2017
Messages
139
I feel like my map is lagging too much even when there's so little enemies. I think it may be cause of damage detection system but I'm not sure. I already did what Bribe (damage detection system creator) asked me to do but it seemed to not working out at all.

I think it comes from other triggers of mine as well but I don't know what to fix at all even though I tried checking my 1000+ triggers.

I wonder if anyone can help me with this. I really hit the dead end here and I wanna continue improving my map.

Here is my map.

I thank you in advance.
 

Attachments

  • Azeroth Heroes Survival 2.4h.w3x
    13.1 MB · Views: 69
Check your periodic triggers for leaks. If they are already leakless then check if you often reference objects that aren't in the map (not sure if this can cause lag like that but it's worth a try).

If all else fails then disable your triggers in chunks (around 10-20 at a time) until you find the faulty trigger.
 
Units, doodads, you name it. If you for example have a periodic trigger that orders a unit to move somewhere every 5 seconds, and that unit has been removed or not created yet then I believe that can cause some issues if you have a lot of it. I'm not sure if this is correct, but I have experienced my triggers going haywire when referencing units that aren't in the map.
 
Level 6
Joined
Jul 12, 2017
Messages
139
Units, doodads, you name it. If you for example have a periodic trigger that orders a unit to move somewhere every 5 seconds, and that unit has been removed or not created yet then I believe that can cause some issues if you have a lot of it. I'm not sure if this is correct, but I have experienced my triggers going haywire when referencing units that aren't in the map.

Those kind of triggers of mine have been turned off until it needs to do their jobs so not that one for sure. I'm out of idea sad life.
 
Level 20
Joined
May 16, 2012
Messages
635
I've learned i few thinks during my experiments with the editor and usually the most commom cause for lag is having too many units in the game at a given moment, specially if you have a lot of triggers that use the events "A Unit is Attack" or a damage engine. If thats your case, than i would recommend reviewing your triggers for better performance or enabling them only when necessary. Another cause for lag is having too many Destructables, like 30000. This is a problem because warcraft 3 do not hide Destructables that are out of your screen, unlike units, so if thats your case than i would recommend you importing [System] DestructableHider into your map. As @FeelsGoodMan and @BradPittlord said, check your trigger for leaks, specially your periodic ones and those that perform actions over an area or a group. If your map is lagging after a certain amount of time, than you can bet that it is probably caused by leaks, but if it lag right away than it most likely the first 2 situations. I would also recommend testing your map every time you add a new triggers/functionality so when stuff like this happen you will know straight away what is causing it.
 
Level 6
Joined
Mar 7, 2011
Messages
124
If your map is lagging after a certain amount of time, than you can bet that it is probably caused by leaks, but if it lag right away than it most likely the first 2 situations
This is going to be the most important point in this thread. It could, and often is, both of these things, so I'd start by identifying & fixing leaks. Does anyone know if there's a working tool that scans your map and identifies leaks? I know none of them were ever 100%, but they were always a good starting point

Performance testing, which is what you want, is one of the hardest things to do in the WC3 engine. There are two main reasons for this, but the end result is really what matters to you: there's no good clear and rigorous approach to this issue. Instead, you're left determining performance by experiment. You need to play your game and then observe the results to infer how your game is running. Here are some, maybe common sense, tactics to doing that:
  • Frame rate is currently your best indicator of performance, there are currently no in-game scripting tools which will give you reliable results. Make sure you uncap your framerate before using it this way!! I use WC's FPS feature, but I probably should use my GPU's
  • Trying to identify performance issues by reading through code is a lost cause. Besides leaks, most performance issues usually aren't bugs, its a lack of understanding of how something would scale, and then a code design that fails to compensate for that
  • Try to isolate the variables you're looking at in a single experiment. Don't just performance test your entire game, try to performance test specific aspects. I usually do this by testing stuff as I make it, so I have an idea of what performance was like before and after, but you can always do this later on by disabling scripts. I'd suggest starting with your most core functionality - the stuff whose performance does not depend on other stuff - and then work out from there
  • Don't jump to conclusions based on one experiments results. Often there are variables feeding into that result that you didn't anticipate, or your experiment forget to account for variables that'll exist in actual gameplay. Try to iterate on your important experiments, using each iterations findings to get you closer and more confident about your original goal
  • It's always best to understand the performance of your game as a whole and make decisions from there, but it's also okay/informative to tweak and check without full understanding. What you want to avoid is a runaway process of tweak-check-move on (no understanding), where it feels like things are magically working, and might also magically break, at any point
 
Status
Not open for further replies.
Top