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

Questions about 1.26 and Leaks

Status
Not open for further replies.
Level 9
Joined
Feb 17, 2009
Messages
291
Hi everyone, after reading that amazing "future of wc3" article, I had some questions regarding the latest version, and map leaks!

Let me start off by saying the map in question is an AoS, so over 1k triggers and nearly that many skills. Anyway, it's an enormous game and we're going to do some cleanup - once we know exactly what to do.

First I want to talk about versions. In 1.26 the map is unplayable because the pathing of good/bad faction troops totally goes nuts. They start walking through solid objects and blockers straight to the other end of the map. We've had to play 1.24 for years. We're excited to play the new update when it comes out but if this issue is not addressed we won't make it far. We would be in your debt if anyone knows what the cause or solution might be, or if the upcoming update might solve these issues for us.

---

Regarding leaks, I am not an expert on this topic and am learning as I go. Our game absolutely must be cleaned of them for continued multiplayer. I want to know about a few things if you guys are able to help:

1) Crashes seem very common when - seemingly unrelated to point and group leaks - multiple spells/graphics are cast/going on simultaneously around the map. We've observed this for years and it's no coincidence. Is this all part of our need to remove leaks, or something else entirely?

2) I understand how to use the custom script and create temp vars for removing common leaks. My question - Does this mean we need a different temp variable for each unique situation? Example - Hero A has a point leak, Hero B also has his own point leak. Should we make two temp vars so they do not overlap? This might sound obvious, but I ask that because if we make tons of new variables (and believe me it would be tons) I'm worried it might slow the map down more. It's a very old map and there are some now-unused variables we can't even delete because it screws up the script.

I'd also just like to disclaim that I could be wrong about that last part entirely, so feel free to correct me on any of this. More information is always better! If there is anything else that could cause these type of issues (especially in multiplayer) that would be good to know.


Thanks for reading,

-Shy
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
you have to destroy objects you aren't gonna use longer. points are most common to utilize since they barely useful in long run.
you have to null all non-persistant (players are persistant, global variables are persistatn) objects created as local.
simple ruless
 
Level 9
Joined
Feb 17, 2009
Messages
291
You don't need multiple "temp" variables of the same type when they are not related to each other. You can destroy the first location, and then use the variable for the second, etc.
A tutorial about leaks http://www.hiveworkshop.com/threads/memory-leaks.263410/#post2661133

I'm just being paranoid because I thought, what if two points/unit groups, etc. need to be referenced in quick succession and one of them doesn't get properly destroyed because of that or something? I've had this happen with two special effects using the same var and one of them not getting destroyed because the triggers fired close to the same time. I feared this might be the same. I just want to know before we go about removing hundreds of leaks only to find out we did it wrong.

So you're saying I don't have to worry about that and can use the same temppoint and tempgroup then? That'd be great ^.^
 
Last edited:
Level 9
Joined
Feb 17, 2009
Messages
291

Yeah I checked out that tutorial recently and that's handy for everything you're doing in a single trigger. I was worried the result of that "Bad Example" could happen across many triggers if they're firing in the same exact moment though, just because you're using only one temp variable to handle them all. I might be wrong I have no idea how fast the processing is for wc3.
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
Ah, I understand. But no, if there are no "Wait" actions included or so, so if there is no logical time interruption then it's no problem at all.
It's impossible that multiple triggers can run at the very same time, because multithreading is not allowed. So they will run one by one.
multithreading is STILL linear thing, the only diff is how calculations managed. there's nothing like "at the same time" in our world. physic's law
 
Level 13
Joined
Oct 16, 2010
Messages
731
The only problem I know about having clashing leaks would be "on-kill" abilities.

For example say your on-kill deals small AoE damage nearby targets from the dying target, say if you used a triggered AoE spell that uses TempPoint to get it's AoE, then it gets a kill. The same point might be used in the on-kill spell to find it's AoE, this could also be an issue with the unit groups of the AoE damage.
 
Status
Not open for further replies.
Top