Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

FPS drop

Discussion in 'World Editor Help Zone' started by Otwrate, Jun 27, 2016.

  1. Otwrate

    Otwrate

    Joined:
    Jun 27, 2016
    Messages:
    13
    Resources:
    0
    Resources:
    0
    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.
     

    Attached Files:

  2. Alright

    Alright

    Joined:
    May 20, 2014
    Messages:
    230
    Resources:
    0
    Resources:
    0
  3. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,537
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    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.
     
  4. Otwrate

    Otwrate

    Joined:
    Jun 27, 2016
    Messages:
    13
    Resources:
    0
    Resources:
    0
    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.
     
  5. Alright

    Alright

    Joined:
    May 20, 2014
    Messages:
    230
    Resources:
    0
    Resources:
    0
    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.
     
  6. Otwrate

    Otwrate

    Joined:
    Jun 27, 2016
    Messages:
    13
    Resources:
    0
    Resources:
    0
    That's pretty retarded, but I will have to accept it and move on with my life. Thank you for help anyway.
     
  7. Alright

    Alright

    Joined:
    May 20, 2014
    Messages:
    230
    Resources:
    0
    Resources:
    0
    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.
     
  8. Otwrate

    Otwrate

    Joined:
    Jun 27, 2016
    Messages:
    13
    Resources:
    0
    Resources:
    0
    One more thing. Does removing unit from the game work the same as adding expiration time to it?
     
  9. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,537
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    Expiration timer does kill a unit when expired. -- RemoveUnit does remove a unit completly from the game.