In my map, the longer the games lasts, the framerate constantly goes down, a lot of players have been telling me that, and its the same for me.
Its not that in later stages of the game theres more units or something, no, its actually pretty much the same, actually even less... so this definetly must be some kind of leak.
When i search for memory leaks it seems like most ppl say in sc2 there are no more leaks, but then i wonder what this could be?
After a long game i did and all players left the framerate was still very low for me (i was the only one left ingame), even though there were no more units on the map (all units die when a player leaves). The framerate pretty much constantly slowly decreases during time.
I dont use any self coded stuff, just triggers.
I really wonder what this could be and really would be thankful if anybody could help me or maybe give any suggestions how or where maybe to look.
Not sure about triggers, but I know if you don't properly treat actors it can cause troubles (for example if you duplicate a lot of stuff some links may get messed up and cause severe fps drops). There is an actor cheat to display actor data, but I don't remember what it was, it's probably somewhere in blizz tutorial.
But if you're not using anything custom, just triggers.. unless you're running some twisted nested recursive loops, I have no idea without looking at map, hopefully others will know more, gl.
The first thing that comes in mind are actor leaks, meaning actors getting created and not properly destroyed, which will cause a slow fps drop over time.
Other reasons can reach from trigger threads building up over certain triggers running slower and slower (like loops that have to go through more and more entries) to high buff stack counts (10000+ buffs will cause fps drops) and the list is pretty much endless.
In the end you will have to find the issue by yourself by running endless tests, including monitoring script carefully by using the debug window, actor leak checks and also fully custom tests to monitor total buffcount, unitcount etc in the game.
Depending on the complexity of the game, finding issues like this can be very very difficult since it can get very hard to nail it down.
Not sure about triggers, but I know if you don't properly treat actors it can cause troubles (for example if you duplicate a lot of stuff some links may get messed up and cause severe fps drops). There is an actor cheat to display actor data, but I don't remember what it was, it's probably somewhere in blizz tutorial.
i thought about actor leaks, too. I added a trigger which kills all actors (send destroy message to all actors in the map), which i did run at the end of a very long game yesterday, where fps were very low at the end. So i run the trigger, after all other players left. All remaining models dissappeared, so i guess the thing worked, but still the fps did not raise, so i guess its not an actor leak.
I guess ill check stuff a little bit with the debug window... im using that for the first time now, seems a very mighty thing which tells a lot of stuff.... is there somewhere something like currently running triggers displayed?
Sending a destroy message to all actors on the map was a good start! :)
You should also monitor actor usage carefully by typing "actorinfodisplay" in the chat, which brings up the actor debugger. Sadly this just works in singleplayer though.
Since this didnt help its indeed pointing towards a problem with the script or with specific game data.
There are several tabs within the trigger debug window that you should check out.
- Make sure that in the "thread" tabs there are not more threads than in the beginning of the map, otherwise you (might) have threads building up over time.
- Check the "Triggers" tab and sort it by "Total time (ms)", this will show you how much time each trigger and its subfunctions have consumed in total during the entire game. This helps you to identify the most performance intensive triggers, so you can optimize those.
Since this is a fps drop over time you might also try to sort the triggers tab by "average runtime" and see if any trigger takes longer and longer to execute over time. If so it could be responsible for a decreasing game performance.
If all this doesnt bring any results, it could be a data problem. Certain data types like search effects (used for auras as an example), missles etc can get very performance intensive depending on their current instance count in the game.
In my map, the longer the games lasts, the framerate constantly goes down, a lot of players have been telling me that, and its the same for me. Its not that in later stages of the game theres more units or something, no, its actually pretty much the same, actually even less... so this definetly must be some kind of leak. When i search for memory leaks it seems like most ppl say in sc2 there are no more leaks, but then i wonder what this could be? After a long game i did and all players left the framerate was still very low for me (i was the only one left ingame), even though there were no more units on the map (all units die when a player leaves). The framerate pretty much constantly slowly decreases during time. I dont use any self coded stuff, just triggers. I really wonder what this could be and really would be thankful if anybody could help me or maybe give any suggestions how or where maybe to look.
Not sure about triggers, but I know if you don't properly treat actors it can cause troubles (for example if you duplicate a lot of stuff some links may get messed up and cause severe fps drops). There is an actor cheat to display actor data, but I don't remember what it was, it's probably somewhere in blizz tutorial.
But if you're not using anything custom, just triggers.. unless you're running some twisted nested recursive loops, I have no idea without looking at map, hopefully others will know more, gl.
This can have various reasons.
The first thing that comes in mind are actor leaks, meaning actors getting created and not properly destroyed, which will cause a slow fps drop over time. Other reasons can reach from trigger threads building up over certain triggers running slower and slower (like loops that have to go through more and more entries) to high buff stack counts (10000+ buffs will cause fps drops) and the list is pretty much endless.
In the end you will have to find the issue by yourself by running endless tests, including monitoring script carefully by using the debug window, actor leak checks and also fully custom tests to monitor total buffcount, unitcount etc in the game.
Depending on the complexity of the game, finding issues like this can be very very difficult since it can get very hard to nail it down.
"ActorInfoDisplay", but it's not in the actor cheats site by Blizzard.
That site is here and has some actor dump file creation commands which can help. http://us.battle.net/sc2/en/game/maps-and-mods/tutorials/actor/
i thought about actor leaks, too. I added a trigger which kills all actors (send destroy message to all actors in the map), which i did run at the end of a very long game yesterday, where fps were very low at the end. So i run the trigger, after all other players left. All remaining models dissappeared, so i guess the thing worked, but still the fps did not raise, so i guess its not an actor leak. I guess ill check stuff a little bit with the debug window... im using that for the first time now, seems a very mighty thing which tells a lot of stuff.... is there somewhere something like currently running triggers displayed?
@JimyStyles
Sending a destroy message to all actors on the map was a good start! :)
You should also monitor actor usage carefully by typing "actorinfodisplay" in the chat, which brings up the actor debugger. Sadly this just works in singleplayer though.
Since this didnt help its indeed pointing towards a problem with the script or with specific game data.
There are several tabs within the trigger debug window that you should check out.
- Make sure that in the "thread" tabs there are not more threads than in the beginning of the map, otherwise you (might) have threads building up over time.
- Check the "Triggers" tab and sort it by "Total time (ms)", this will show you how much time each trigger and its subfunctions have consumed in total during the entire game. This helps you to identify the most performance intensive triggers, so you can optimize those.
Since this is a fps drop over time you might also try to sort the triggers tab by "average runtime" and see if any trigger takes longer and longer to execute over time. If so it could be responsible for a decreasing game performance.
If all this doesnt bring any results, it could be a data problem. Certain data types like search effects (used for auras as an example), missles etc can get very performance intensive depending on their current instance count in the game.
aight, thx, i think this should help me a lot
@JimyStyles: Go
get the trigger debugger running and play a game online.
Inspect the trigger debugger info to find where your taking performance hits.
Chances are that you have poorly written code causing a problem as the game continues.