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

TD - Map lag

Status
Not open for further replies.
Level 5
Joined
Jan 23, 2020
Messages
86
I have a TD map that has been in development for a while. As the game goes on the frames will gradually drop from 60+ to 12 FPS. I used GUI to create the map.

What I've done:
- Checked leaks (locations, units, effects)
- Reduced the number of units on the map
- Changed some towers that were using "when attacked" as an event with high attack speed.

I've been struggling with lag on this map for almost a year now, its almost done and the lag issue is the last remaining thing I need to resolve, any help will be greatly appreciated.
 

Attachments

  • City_TD_Team_v1.7c_BETA5.w3x
    2.6 MB · Views: 31
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
563
The error might be only for me but I cant download the attached map.

EDIT: I found version 3beta. Cant figure out why it would lag though.
 
Last edited:
Level 14
Joined
Sep 28, 2011
Messages
968
Some things are not necessarily talked about as leaks due to being unremovable such as terrain deformations(it stays here forever even when the terrain goes back to being flat and yes even the tauren chieftain terrain deformations causes leaks despite not being trigger made) , destructible groups and other stuff like that.
Also check if you have a damage detecting system that uses event creation on adding an unit: the events can stack up.
Finally if you really find no cause in the map check your own computer for applications that gradually takes more and more resources.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
destructible groups and other stuff like that.
What is a destructable group?
Could you explain a little more about what you mean here?
Every time an event is dynamically added to a trigger an event object is created. This object persists until the trigger is destroyed, even after the event itself no longer makes any sense as its context has been removed.

For example a legacy damage detection system might add a "specific unit takes damage" event to a GUI trigger for every unit on the map and every unit that gets created. This creates an event leak every time a unit dies since the associated event for that unit does not get removed. A better written legacy damage detection system would periodically destroy and recreate the triggers to clean all these event objects.

This should no longer be a problem for modern damage detection systems since they will use the any unit takes damage event that was added by recent patches. They will only create 1 event object a map initialization which is useable for all current and future units.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
@noob Could you explain a little more about what you mean here?
So I've been assisting Droof with his map from time to time and I'm fairly confident that it's leak free, at least for leaks that I'm aware of like Locations, Unit Groups, Player Groups, and Special Effects.

As far as I can tell the fps drop comes from the massive amount of units spawned in the map coupled with towers with ultra fast attack speed.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,182
Could you give me an example? This must be something new as destructable groups did not exist last time I checked.

It's not new, it has existed since pretty much forever.
It has identical functionality to a unit group but for destructibles, but it does not have a variable type like unit groups. So you can only use them like this:
  • Destructible - Pick every destructible in (Playable map area) and do (Actions)
    • Loop - Actions
However, I remember asking Maker back in the day and if I recall correctly he said they did not leak.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
It's not new, it has existed since pretty much forever.
It has identical functionality to a unit group but for destructibles, but it does not have a variable type like unit groups. So you can only use them like this:
  • dest.gif
    Destructible - Pick every destructible in (Playable map area) and do (Actions)
    • joinbottom.gif
      actions.gif
      Loop - Actions


However, I remember asking Maker back in the day and if I recall correctly he said they did not leak.
I suggest looking at the resulting script. You will see there is no such concept as "destructable group". Instead the enum function iterates based on the passed rect.
 
Status
Not open for further replies.
Top