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

[vJASS] How sure are we that terrain deformations and destructables leak?

Status
Not open for further replies.
Level 7
Joined
Dec 3, 2006
Messages
339
I've run a few tests with destructables being created and terrain deformations(the permanent works a lot better). Basically what i've seen is yes the fps drop rapidly for during creation usually for certain reasons-- creating a large amount of destructables especially with pathing or walkable types, or creating a large amount of deformations.

After i've tested both terrain deformations or destructables being created though sure fps dropped like 20 fps for an 128 by 128 map being generated all at once but afterwards the fps went straight back up to the 60fps (i originally had) or 64 fps (my friend had originally). So I'm beginning to think that terrain deformations and destructables more than anything are like a temporary leak in that it kills fps with large amounts, but it will do less damage if it's done in smaller amounts over time.

So I'm wondering how conclusive the tests that were made for terrain deformations and destructables are from other people. Do the fps eventually return to normal after a while?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I guess it just lags because the map has to recalculate pathing and stuff... Not necessarely a "leak"... Good question though
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Terrain deformations are avoided not because they leak but more because they are very prone to causing a game split durring a multiplayer session with both mac and windows versions of WC3 in it.

Destructables are widgets. Since units leak (as far as a short term test showed) it is possible they might also leak and so is it possilbe items may also leak. Never tested though so I only know that units cause a leak that lasts atleast a few minutes.

Leaks do not cause poor performance directly as allocated memory requires no maintenence and has no influence on access times. The problem with leaks is it bogs down some of the internal systems in WC3 clients causing certain opperations to perform slower. An example is enough string leaks make creating new strings take a long time. Obviously when you are not using these systems leaks have no performance penalty. An example is that it might take a good part of a second to allocate a few strings but the game will perform perfectly as long as no strings get allocated.
 
Level 7
Joined
Dec 3, 2006
Messages
339
Yes, but I think terrain deformations if created over time in smaller areas rather than all at once shouldn't desync pretty much anyone. I guess i'll do a few more tests to see how much lag this can really generate with a bigger group of people to see how many people get desync'd etc.

So am I correct in saying that leaks potentially are "time related" in that eventually the game can return to normal fps and speed even if you leaked by creating some destructables or something?

As far as strings go yeah they are some nasty leaks I bet because they especially are very slow when passing data.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Yes, but I think terrain deformations if created over time in smaller areas rather than all at once shouldn't desync pretty much anyone.
The problem is that mac and windows versions of the client generate different results for terrain deformations (probably a rounding error due to differences in standards). Any deformation has a potential to cause a split, especially if GetLocationZ is heavilly used. Also any client running at submaximum settings can split from them as the lower visual settings also produce different results but luckilly vertiaully any system can max WC3 nowdays.

So am I correct in saying that leaks potentially are "time related" in that eventually the game can return to normal fps and speed even if you leaked by creating some destructables or something?
You need to learn what a leaks is. The definiton of a leak is some allocated computer resources that have been allocated but are never deallocated after their use has been fufilled. This if WC3 had a well made garbage collector, then there would be no leaks.

What you are calling "lag" is the result of poor performance. Leaks only induce poor performance with certain opperations which have a complexity that depeonds on the leaked object. An example is leaking huge numbers of locations degrades the performance of various script opperations but will not cause any performance issues as long as no such script opperations are run.

As far as strings go yeah they are some nasty leaks I bet because they especially are very slow when passing data.
Strings are not inherently that slow, just JASS script is because of how it is interpreted. All strings with the same value are given a common unique reference using a hashtable and I believe the hashtable does not expand when conjested which is why string leaks degrade string opperation performance.
 
Level 7
Joined
Dec 3, 2006
Messages
339
I know what leaks are and how to fix them. Just it's been a while since i've looked at the terminology as far as what they really are defined as.

The time you show me a mac user who plays wc3 will be a first in forever especially since i haven't seen a mac user online in years. You can also SetRandomSeed() so all players are generated the same terrain deformations.

And as far as strings go yeah they are slow though since they generally require more bytes than other variables. But regardless it's rather off-topic.

As far as I can tell from some quick tests i've done online with a few random people there is no "leak" involved in terrain deforms. Just instead an performance lag and it's not a performance lag to do with the script mostly. It's more of a performance lag of wc3 being horribly laggy at setting terrain heights in-game.

Also not every system can virtually max out wc3. As long as you use the scripts you create right and not all at once then you won't max everything out.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
You can also SetRandomSeed() so all players are generated the same terrain deformations.
Not if the user is a mac (where deformations produce different results from windows) or if the client is not set at the same visual settings (where terrain deformation complexity is different).

Mac users may not be the most common, but that does not mean they do not play.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
I don't know about terrain deformations, but creating/removing destructables makes some leak, last time i checked at least (i've checked the memory used by the process wc3)

About the OS issue (mac/windows/linux, ...) maybe it was fixed a while ago, or not.

But on the same OS (windows xp), with a friend i've already tested the lowest and highest configuration sevarl years ago, we had both the same result (comparing screenshots of data displayed).
I used an edited spell, like earthquake.
 
Status
Not open for further replies.
Top