Maximising Enjoyment of a StarCraft: Brood War Bug
By Angus Cheng
Midway through 2007 I was playing StarCraft and someone nuked my base from his base. This shouldn’t have been possible because StarCraft requires you use a ghost (an infantry unit) to target the nuke. The ghost can target the nuke a maximum of few inches in front of itself. The targeting phase lasts about 10 seconds and if the ghost is killed in this phase the nuke does not land.
Obviously this doesn’t make much sense in the real world, it was done by the game developers so that players have an opportunity to stop the nuke from landing. Maybe we should set up such a gentleman’s agreement for the real world.
Scenario 1
“Sorry about nuking you, but, you know, I did give you ten seconds to kill that guy who shon a laser pointer at your building”
“Yeah fair enough, I knew I should have killed that guy”
Scenario 2
“Wait a minute guys, we’re going to have to detonate that nuke we launched. It seems the Russians have shot the guy with the laser pointer within the ten seconds set out in the gentleman’s agreement.”
Anyway
Somehow this guy was able to target the nuke from the safety of his base. It turns out he was running a hack that bypassed the ghost targeting distance. I don’t know how this happened, but I suspect the distance check happens in StarCraft’s front-end code, and the hacker overwrote the value. Imagine the following code.
const MAXIMUM_NUKING_DISTANCE = 200;
function fire_nuke(ghost_position, nuke_target_position) {
var distance = euclidian_distance(ghost_position, nuke_target_position);
if (distance <= MAXIMUM_NUKING_DISTANCE) {
start_nuking_action()
return
}
// Walk to the position or whatever
}
The code looks pretty reasonable, and it is pretty reasonable. However the hacker could write a program that finds the memory location of the MAXIMUM_NUKING_DISTANCE variable and then overwrite it to a super big number. This would effectively allow you to nuke from anywhere in the map.
My Reaction
After getting nuked like this, I lost the game. Then read the teamliquid.net forums and learned that this nuke hack was available. Blizzard is pretty good at patching their games, so I knew this hack would be fixed in a few weeks.
I was in my second year of computer science at the time. I decided to skip all my classes, download this hack and spend all day and night nuking people from my base. My reasoning was, pretty soon this will be patched out and I will never get the opportunity to use this hack again.
I had so much fun. Often I would play 2v2v2v2 Big Game Hunters or 8 player free for all matches. Basically I would turtle, then build nukes, then start nuking everyone. The tricky part was getting enough space to build nuclear silos and comsat stations.
Patch 1.15.1
Release: 2007-08-21
Changes:
Made stability improvements to replay saving code.
Fixed a bug where the map download progress was not shown.
Pressing alt-f4 while in StarCraft and logged into a league now logs you out of the league.
Updated some of the localization for the league page.
Fixed an exploit that allowed nukes to fall anywhere on the map.[3]
When patch 1.15.1 rolled out the fun ended, and I had went back to my classes.