StarCraft Power Saver

Note: StarCraft 1.16.0 includes a fix for StarCraft's power consumption problems. If you are using StarCraft 1.16.0 or newer, you do not need StarCraft Power Saver. If you are using a previous version of StarCraft, read on.

What you should know about StarCraft Power Saver:
  size (bytes) MD5 checksum
starcraft_power_saver.exe 13312 1aa47cdead32d818f717aaf00f0bb780
starcraft_power_saver-0.3.zip 29681 0ac7791a680151d3bfebe7f3d76426e3

Contact information

To contact the creator and maintainer of StarCraft Power Saver, please use the contact form. If you'd like to make your query public, you can add a comment to the blog post for this tool.

Performance results

StarCraft Power Saver reduces StarCraft's CPU usage from 100% to the following percentages (using StarCraft 1.15.2): Feel free to submit your own performance results using the contact information above.

Problem summary

StarCraft uses a game loop to handle all in-game processes, including re-drawing the screen, computing the AI, and handling network traffic. This is a fairly common technique among games of its era. Unfortunately, this technique causes the game to use all the CPU time available to it since StarCraft's creators chose not to limit the frame rate, instead opting to let StarCraft update the display as fast as it can.

While this works fine when you don't care how much CPU power you're wasting, it does not work so well when you're running a laptop on batteries or you want to share your CPU with other applications while playing StarCraft. Furthermore, the frame rate afforded by modern hardware is so insanely high that it makes no sense whatsoever to draw as many frames as the processor can. As an example, on my 1.3 GHz Pentium M, StarCraft draws about 100,000 frames per second.

The solution is to insert a Sleep into the game loop, which causes StarCraft to relinquish the CPU for a set period of time before it starts drawing frames again. For StarCraft Power Saver, I chose to use 1ms as the time to sleep between drawing frames. Because of the low granularity of timers in Windows XP and 2000, the sleep is effectively 10-15ms, but this has proved to be short enough to keep StarCraft responsive, even on a large map with 8 players.

I may post additional information on how to find the game loop and how to determine the speed at which StarCraft executes the loop if there is interest. Feel free to ask any questions you may have about any of this through the contact information listed above.

All versions

  size (bytes) MD5 checksum StarCraft version
starcraft_power_saver-0.3.zip 29681 0ac7791a680151d3bfebe7f3d76426e3 1.15.3
starcraft_power_saver-0.2.zip 29579 9a5e1bee14c491a62411661bb7b99caa 1.15.2
starcraft_power_saver-0.1.zip 28644 e7088c3f16b43f14cf345b23c96df12e 1.15.2*

* StarCraft Power Saver 0.1 does not recognize certain StarCraft 1.15.2 executables, particularly those for non-English versions of StarCraft. Please use StarCraft Power Saver 0.2 if you have StarCraft 1.15.2. The results of the patching are the same between 0.1 and 0.2.

Valid XHTML 1.0 Transitional