• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Lag after 30 seconds (bug)

Status
Not open for further replies.
Level 21
Joined
Apr 8, 2017
Messages
1,530
There are MINs and not seconds, srry.

Well im making a MOBA -yes im another...-
The problem on my map is that, after 20-30 mins playing the map gets slower and slower with the time.
I need someone of you test it and tell me where is the problem.

Ps my main language is spanish.

---------------
More info.

I start and everything goes well but with the passage of time everything becomes lag and lagggg.
 

Attachments

  • BOL.w3x
    1.5 MB · Views: 103
Level 7
Joined
Mar 10, 2013
Messages
366
Most of the problem comes from leaks with 0 doubt. I'll take a look at your map later today and give you more detailed information about your map in specific.

Take a look at Complete list of things that leak and check if any event that occur often (mostly recurrent game time events) have any kind of these leaks and fix those.
 
Level 12
Joined
Dec 11, 2014
Messages
662
There are many things you can improve, first try removing leaks.
Things like:
  • Desslow
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Dummy (Minion)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
that occur often should be checked first. You should be able to fix these things by learning from the link Hotwer sent.

Also here and here and even here!
 
Level 7
Joined
Mar 10, 2013
Messages
366
Update: I took a look into your map and stepped in to this trigger.

  • Lumb 1 mover
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit - Move Lumb1a instantly to ((Position of Lumb1a) offset by 15.00 towards (Facing of Lumb1a) degrees)
      • Unit Group - Pick every unit in (Units within 200.00 of (Position of Lumb1a)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Lumb1a)) Equal to True
            • Then - Actions
              • Unit - Cause Lumb1a to damage (Picked unit), dealing 7.00 damage of attack type Spells and damage type Normal
            • Else - Actions
      • Destructible - Pick every destructible within 100.00 of (Position of Lumb1a) and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
And you have for Triggers like this. It does sure makes alot of sense of why your maps lag now.

To fix these you need to destroy those groups.

  • Lumb 1 mover
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit - Move Lumb1a instantly to ((Position of Lumb1a) offset by 15.00 towards (Facing of Lumb1a) degrees)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 200.00 of (Position of Lumb1a)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Lumb1a)) Equal to True
            • Then - Actions
              • Unit - Cause Lumb1a to damage (Picked unit), dealing 7.00 damage of attack type Spells and damage type Normal
            • Else - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Destructible - Pick every destructible within 100.00 of (Position of Lumb1a) and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
Or you could store the groups in a variable and destroy it afterwards. It's a matter of what you think is best.

You need to find all leaks of the sort, me and @DaneTheBeast gave you alot of links to know what leaks and what to do about it. There's nothing to do, you need to fix these, and your map probably will not lag after 30 min of gametime.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
Every location and group you create has to be destroyed/removed or it leaks when you loose reference to it. Be aware that some GUI functions such as units of player match and units of player of type also leak due to the "local declared local handle variable reference counter leak on return" bug.
 
Status
Not open for further replies.
Top