Roughly about 6 months ago we had massive stutter-step lag in Tofu, it was very noticable and detrimental to the game-play experience. Since then, I have been optimizing the code in every way possible to reduce the amount of Dialog Item updates (specifically - imaging swapping and fading). Changing dialogitem sizes does not appear to be effected by this problem.

I have a single command that turns off UI updating (but keeps the rest of the game loop running), that removed the stutter-step. As it is right now, there is no difference between the two options. This problem was finally resolved when all possible image swapping was disabled and only done when required.

One thing I have noticed; Image Swapping still occurs when the existing image is the same as the new image. I have implemented IF statements and keep a track of which items have been swapped, but IMO it should be default that if the image swap is the same image then it should not update the image.

This is different from a 'slow-down' which occured roughly a year ago when our original entire game-loop was in one thread and we simply exceeded the execution time before the loop would try and run again. Our game-loop now runs between 2-13 threads [[ original loop + (player specific stuff)*amountofplayers ]] and this has resolved that issue.

The DialogItem problem though creates a 'stutterstep' when units move, where it is almost like a low choppy FPS whilst maintaining full FPS, compared to the slow-down which is like slow motion.

The reason I have posted this now is because we just introduced a fury system into the game, which means I needed to update the way in which the UI status bars (down the bottom) work. This gave me an excuse to 'rewrite' the code (just adding some basic checks), which removed the final stutter-step problem (that was nearly un-noticable unless it had been pointed out to you). The code in question was original code from over 2 years ago (as the Tofu UI part is largely the same as it was in the custom map competition of 2010, just with custom background images - the update code is the same).

Noticable stutter-step was also introduced with the Bounty Hunters game-mode (before I fixed the status-bar issue) as it faded 4 dialog items every game-loop (10 loops per second), over a period of a half a second. However, since reducing the amount of image swapping, this has been resolved.

Whilst we are no longer affected by this problem, we are right at the cliff's edge. A few lines of code could throw us back over into having noticable stutter-step. I thought this is something that perhaps Blizzard was not aware of, thanks for reading.