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

FPS drop

Status
Not open for further replies.
Level 2
Joined
Jun 27, 2016
Messages
13
Hi!
So I've decided to make custom race. I've imported some models and made spells involving tones of dummy units. Everything seems to be completly fine until something like 10 minutes, when game starts to drop fps and it's barely playable. The longer game last, the worst it seems to be. I've read here, that dummy units create leaks despite of being removed from the game. I observe presence of them as workers, so that is not the case, neither is hardware. I think models might be, but I've tried to pick the ones with relatively small sizes. I think it might be a problem as I was going to create 2 more races. I uploaded map if anyone would be so kind to look at it and tell me what is wrong. Unfortunately names of triggers and abilities won't tell you much as I'm not native English speaker and most of names are Polish.
 

Attachments

  • GnollWoodv2.w3x
    2.4 MB · Views: 67
Definitly read tutorial about memory leakage. A worse coming gameplay is likely that you are massivly leaking.
Next to above mentioned location leaks, it is also very important to clean group leaks. They also are pretty heavy.
When executing mass "Pick All Units In Map" actions too often, it may also result in jerky and unclean gameplay. You also might want check for those.
 
Level 2
Joined
Jun 27, 2016
Messages
13
You should define the location before creating the dummy, and then destroy it after.

So do I have to set variables to locations before creating dummies? Does it leak if I use for example Create 1 dummy for (Owner of (triggering unit)) at (Position of (triggering unit))? How is that so if I'm not asking editor to allocate memory? I thought it should be handled by WE to prevent this kind of leaks and remove variables that Editor created by it's own. The part with removing variables is clear to me and I will fix it.
 
Level 6
Joined
May 20, 2014
Messages
228
How is that so if I'm not asking editor to allocate memory?

I won't try and pretend I know how it works but I assume it's not designed to do that way - it just creates upon a point that isn't deleted or set to null and thus still uses memory that way but can't be referenced anymore (hence memory leak, no reference, etc.), which is why it's super important to declare it to a variable so you can delete it immediately. This also includes offsets and such.

Same with unit groups, etc., once you don't use them anymore, you don't have their reference but they still exist so they use up the memory and thus leaks.
 
Level 6
Joined
May 20, 2014
Messages
228
Let's not forget this game is ancient.

Anyway, it's better to get into habit of declaring values before they're used, positioning, etc. and such, it makes your triggers more clean and easier to modify/utilize, helps a lot.
 
Level 2
Joined
Jun 27, 2016
Messages
13
One more thing. Does removing unit from the game work the same as adding expiration time to it?
 
Status
Not open for further replies.
Top