Hi again everyone, hope you are all fine.
I am still working on my TD, and as I have fixed the last bugs, removed my weather effects that refused to work (was just a fancy feature anyways), I started working on optimizing my map performance.
Don't get me wrong, I am overall quite pleased with how far I managed to improve the performance so far, but this is a mazing-like Tower Defense, and as you well know, it can become really demanding after a while.
I think I tracked and fixed 99% of potential leaks, there are probably a very few left that are difficult to identify, and also the typical "unfixable leaks".
This said the game performance does not seem to degrade much, except probably with the last level where targets take quite a while to be killed and the number of towers can become consistent.
I have already improved things by slowing towers attacks by a factor of 2, that was compensated with doubling their damage, and increased their range a bit as slow attacks have a much higher chance not to hit targets (yes the targets don't move slower).
I also have a couple of triggers that are quite demanding :
1) The trigger that animates the text printed on the game floor for each player.
- I can't get rid of this feature, this is a total exclusive feature never seen in any other map - ever - so removing it would be sad. The timer between each text scrolling runs every 0.30 second but it only changes models animations so I believe it is OK.
2) The one I am really wondering about is the feature that resizes targets on damage. As the targets are Balls , and these balls looking identical in the same wave, adding some kind of visual pimp actually helps.
I know - especially in a TD map - that even optimized, that event is probably the most demanding in the whole map I still consider removing it for extreme performance - or maybe allowing the map host to disable it with a dialog.
- I don't have any other trigger firing at a high rate.
So I start lacking directions to search for performance gains.
This was until I read old posts on these forums and some others, where people who seemed quite proficient in Jass or at least game mechanics knowledge started discussing the idea of removing trigger ACTIONS and putting all trigger fired code in the CONDITIONS, returning false in the end.
I just wanted to know if this is true.
And if it is (that seems to make sense at first sight), is the performance gain relevant and worth the change ?
Has anyone ever done that in his map and seen a decent performance gain ?
EDIT : in the same optimization process, is it worth pushing my Jass2 even further into vJass and start using structs ? Is there any relevant potential performance gain ?
I really want to make playing the map to become a pleasant experience, so every performance gain will be a bonus for the players.
I am still working on my TD, and as I have fixed the last bugs, removed my weather effects that refused to work (was just a fancy feature anyways), I started working on optimizing my map performance.
Don't get me wrong, I am overall quite pleased with how far I managed to improve the performance so far, but this is a mazing-like Tower Defense, and as you well know, it can become really demanding after a while.
I think I tracked and fixed 99% of potential leaks, there are probably a very few left that are difficult to identify, and also the typical "unfixable leaks".
This said the game performance does not seem to degrade much, except probably with the last level where targets take quite a while to be killed and the number of towers can become consistent.
I have already improved things by slowing towers attacks by a factor of 2, that was compensated with doubling their damage, and increased their range a bit as slow attacks have a much higher chance not to hit targets (yes the targets don't move slower).
I also have a couple of triggers that are quite demanding :
1) The trigger that animates the text printed on the game floor for each player.
- I can't get rid of this feature, this is a total exclusive feature never seen in any other map - ever - so removing it would be sad. The timer between each text scrolling runs every 0.30 second but it only changes models animations so I believe it is OK.
2) The one I am really wondering about is the feature that resizes targets on damage. As the targets are Balls , and these balls looking identical in the same wave, adding some kind of visual pimp actually helps.
I know - especially in a TD map - that even optimized, that event is probably the most demanding in the whole map I still consider removing it for extreme performance - or maybe allowing the map host to disable it with a dialog.
- I don't have any other trigger firing at a high rate.
So I start lacking directions to search for performance gains.
This was until I read old posts on these forums and some others, where people who seemed quite proficient in Jass or at least game mechanics knowledge started discussing the idea of removing trigger ACTIONS and putting all trigger fired code in the CONDITIONS, returning false in the end.
I just wanted to know if this is true.
And if it is (that seems to make sense at first sight), is the performance gain relevant and worth the change ?
Has anyone ever done that in his map and seen a decent performance gain ?
EDIT : in the same optimization process, is it worth pushing my Jass2 even further into vJass and start using structs ? Is there any relevant potential performance gain ?
I really want to make playing the map to become a pleasant experience, so every performance gain will be a bonus for the players.
Last edited: