These are not the codes that you’re looking for

So I was playing Doom3, an old favourite. And I came upon this screen:

The “encrypted” data is:

4697 BNDWQ ERGAZS GHQAZ 1029GG3 VBNY77
KDMH LGSLDG SDLGKSE SDTK YU90G 576457 DDKLFG 67
EO5IY DKFJ -386 FDGL 3465 FG34 36FDG FGL DFGJDF
DFKGJ 6 KDFG DFJ DFGDFJG DFGJLSD APQAZ 100Y
SDFM Z LM TIYOU KDMH LGSLDG SDLGKSE SDTK 576457
DDKLFG AVFTYU8P FKGKYR FJFGJH RETKJER DFKJA

It didn’t look random enough to me, meaning it was possibly encoded, so I started poking at it.

The first thing I tried was ROT13, but that wasn’t it.

I then tried mapping the alphabet to the reverse alphabet (my sister’s idea), but that wasn’t it either.

Then I ran this PHP program:

function main() {

  $text = file_get_contents( 'doom3-notes.txt' );

  freqhist( $text );

}

function freqhist( $text ) {

  $map = [];
  $len = strlen( $text );

  for ( $i = 0; $i < $len; $i++ ) {

    $char = $text[ $i ];

    if ( $char === "\n" || $char === ' ' ) { continue; }

    inc( $map, $char );

  }

  asort( $map );

  report( $map );

}

function inc( &$map, $char ) {

  if ( ! array_key_exists( $char, $map ) ) { $map[ $char ] = 0; }

  $map[ $char ]++;

}

function report( $map ) {

  echo "size: " . count( $map ) . "\n";

  foreach ( $map as $char => $count ) {

    echo "$char: $count\n";

  }
}

And the output was:

size: 35
-: 1
W: 1
2: 1
P: 2
1: 2
8: 2
B: 2
N: 2
I: 2
O: 2
V: 2
9: 3
Q: 3
U: 3
M: 4
0: 4
H: 4
Z: 4
R: 4
T: 5
4: 5
3: 5
A: 6
5: 6
E: 6
Y: 7
6: 8
7: 8
J: 10
S: 11
L: 12
K: 15
F: 21
G: 25
D: 27

And this report was enough for me to deduce what had happened. This was obviously the work of a busy designer entering “random” data from their QWERTY keyboard.

You can tell because all the frequently occurring letters D, G, F, K, L, etc. are all on the home row on a QWERTY keyboard. Someone sat there pressing “random” keys. It’s not an encoded message.

Puzzle solved. But a little disappointing.

StarCraft 2 Lost Viking Strategy Guide

I just spent a few days trying to get over 500,000 points in The Lost Viking game in StarCraft 2 so that I could earn the Gold Level achievement and round out my profile as 100% complete. I’m pathological. It’s a curse. I played and played and played. For days! (It actually took me a few years to get around to it. For a long time I had decided that for me it was too hard. I couldn’t even get Bronze Level. But when I was sitting on 99% completion I simply had to find a way…)

Eventually I took stock of the situation and realised that the reason I was having so much trouble getting the high score was that my strategy was flawed. The major problem I was having was that I was using the Plasma Canon x2 rather than the Side Missiles x2.

Without thinking very hard about it I just decided that it would be better as a general rule to use the more powerful weapon, the Plasma Canon. But it’s not. It’s considerably more efficient to use the Side Missiles than the Plasma Canon. It wasn’t until I switched strategies that I could finally get the high score. Please consider the following explanation:

With each weapon type there are 2 levels. Let’s use some rough numbers that approximate the weapon capabilities: let’s say that Plasma Canon Level 1 delivers 5 units of damage to 1 target per unit time, Plasma Canon Level 2 delivers 10 units of damage to 1 target per unit time, Side Missiles Level 1 delivers 1 unit damage to 4 targets per unit time, and Side Missiles Level 2 delivers 1 unit damage to 6 targets per unit time (sort of, approximately).

The amount of damage that you need to inflict on a (non-Boss) target varies from say 1 unit to 50 units depending on the unit type. The most common unit types only require 1 or 2 units of damage to kill, but there are some stronger units. Let’s say we’re dealing with a median case of 1 unit damage to kill and we fire either Level 2 of the Plasma Canon or Side Missiles:

With the Plasma Canon x2 if we fire 3 shots, assuming we are accurate, we can deliver 30 units of damage to 3 targets. With the Side Missiles x2 if we fire 3 shots, also assuming we are accurate, we can deliver 18 units of damage to 9 targets. With the Plasma Canon we get 3 kills and “waste” 27 units of damage, with the Side Missiles we get 9 kills and waste 9 units of damage (assuming it’s actually possible to hit 3 units per shot the way you target your 3 shots, more on this later). So Side Missiles are *vastly* superior to the Plasma Canon when it comes to efficiency. On the numbers above approximately 3 times more efficient. So, always get Side Missiles!

If you compare your strategies you will see the effects of the increased efficiency of the Side Missiles over the Plasma Canon in your scores for each level. When I was using the Plasma Canon x2 I was getting about 65% to 75% kills per level, but when I switched to Side Missiles x2 I was getting over 90% kills per level. More kills per level is more points per level, and more points per level means you can reach Gold Level sooner. The greater efficiency of Side Missiles is pretty much a mathematical certainty.

Drones are pretty handy too, so always try to get at least x1 Drones. If you decide you’d like to run with only x1 Drone and try to collect more bombs then that’s a respectable choice. Personally I try to run with x2 Drones because I get the extra 1/2 point damage per unit time and have a higher chance of having my life saved by it. But, up to you. I guess if you wanted to ignore Drones altogether in order to get more Bombs that could also be a valid approach… but I like x2 Drones.

So since the goal is to max out Drones and Side Missiles as soon as possible, what should you get first? On this decision I decide to take whatever I can get sooner. I just take whatever is available as soon as I can. Sometimes it’s easier to get max Side Missiles before Drones, and vice versa. I don’t think it’s too important. It’s hard to make a quantitative judgement. With regard to damage per unit time you are probably better off getting your Side Missiles first, so you can deliver more damage sooner. But, how do you weigh the possibility that a Drone might save your life? If you have a Drone it might turn out that it sacrifices itself to save your life, in which case having it would probably have been better than delivering more damage. Also the Drone seeker missiles can help clear out your bottom corners before enemies that arrive there can fire at you, and that’s worth something. So my rule of thumb is just to take whatever Drones or Side Missiles I can get as they become available. If I can’t get one thing easily I will wait until it turns to something else that I can get easily, and if the power-up is about to cease changing and become something I don’t want then I might use a Bomb to clear a path to it before that happens (more on this point below).

As a general rule I try to max out my Side Missiles and Drones before collecting Bombs. That’s because I pretty much always have a few Bombs up my sleeve so it’s better to get the other upgrades working for me and delivering more damage per unit time on the screen sooner and thus for longer. So the goal is definitely to collect as many Bombs as you can, but try to max out your Side Missiles and Drones first. Also, having Drones first is pretty handy if it turns out it saves your life when you stuff up your navigation! Bombs are similarly life-saving: never be afraid to drop a Bomb if you’re cornered, that’s what they’re for! Bombs are pretty much as good as an extra life if you just recognise your imminent danger and press that Ctrl key in time. Always prefer to “waste” a Bomb than risking a Life, Bombs are much easier to come by! (That said, always try to save a few Bombs (say 3) for taking on the Terra-Tron at the end of every 3 levels.)

If there is a power-up on the screen but it’s hard to get to it in time because there are too many enemies or enemy missiles in the way, then drop a Bomb and go straight for it to make sure you get it in time. It’s always better to drop a Bomb to get a power-up that you would otherwise miss, even if that extra power-up is another Bomb! If you lose 1 Bomb and gain 1 Bomb you lost no Bombs and get the points for the power-up that you would have missed if you hadn’t used your power-up. If the other power-up isn’t a Bomb (i.e. it’s a Side Missile or Drone) then it’s good to have it (and the points you get for it) rather than missing it because you wanted to save a Bomb. So spend Bombs to get power-ups if necessary (i.e. if you can’t get it without clearing the way with a Bomb, obviously if you don’t need to clear a path to a power-up with a Bomb then that’s better.)

You can maximise the efficiency of your Side Missiles by trying to stay approximately in the centre of the screen both horizontally and vertically. It’s tempting to keep navigation simple by playing in “one dimension” from the bottom of the screen and only moving left or right. But with Side Missiles it’s better to move in two dimensions and spend as much time as you can in the vertical centre by moving up and down. This is especially true when there are powerful units (like Science Vessels or Swarm Hosts or Battle Cruisers) that arrive in twos, one on each side. If you stick in the middle horizontally and vertically when fighting these guys then you will be delivering maximum damage because you will be hitting each of them at the same time (and your front guns will be clearing out whatever arrives in the top-middle of your screen too.)

With Side Missiles it takes about 3 to 4 times as long to kill a boss as it does when you have the Plasma Canon. Back on our rough numbers: the Plasma Canon x2 can deliver 10 units damage per unit time, but to a single target the Side Missiles can only deliver 2 units damage per unit time. On those (imaginary) numbers you can kill a Boss 5x faster with Plasma Canon x2. The reason it doesn’t quite take 5x as long is that with the Side Missiles you can deliver continual damage from the side of a Boss even when you can’t get under it horizontally, which isn’t possible with the Plasma Canon.

My exception to the Side Missiles x2 rule is if you are fighting a Boss. But don’t try to run with Side Missiles x2 and then try to switch them out for Plasma Canon x2 before confronting the Boss, that’s way too hard to get the timing right and it essentially wastes 2 Bombs that you could otherwise have had. So always arrive at a Boss with your Side Missiles, but if the Boss kills you while you are fighting it and your weapons drop then wait for them to become Plasma Canons before picking them up again. The weapons always cycle through in the following order: Side Missiles, Drone, Plasma Canon, Bomb. So if you drop your Side Missiles because you died you will need to wait for them to cycle through Drone to Plasma Canon before picking them up again. If you respawn on top of your weapons and accidentally pick up one of your old Side Missiles then pick up the other Side Missile too, it’s better to have x2 weapons in case you die again and then you can try for Plasma Canon x2 again. If you finish fighting a Boss with a Plasma Canon then when the next level starts switch back to Side Missiles again as soon as you can.

So, here are the rules I follow in summary:

  • Always try to have x2 Side Missiles
  • Always try to have at least x1, or even better x2, Drones
  • Take weapon upgrades as they are available as soon as you can, don’t worry too much about getting Side Missiles first or Drones first
  • Try to max out your Side Missiles and Drones before collecting Bombs, but aim to collect as many Bombs as you can
  • If you can’t make it to an upgrade in time because there are too many enemies or enemy missiles in your way use a bomb and get that powerup!
  • If you’re cornered drop a Bomb rather than losing a life
  • Try to stay in the middle of the screen both horizontally and vertically to maximise total effective damage per unit time
  • If you get killed fighting a Boss wait until your weapons change to Plasma Canons before picking them up again then kill the Boss faster with your increased fire-power
  • If you’re fighting a Boss and get killed and then accidentally pick up a Side Missile because you respawned on top of it, then pick up the other Side Missile too, don’t wait for it to become a Plasma Canon
  • Be careful! Try not to take risks. If you find yourself in hot-water: drop a Bomb, that’s what they’re for!

Happy hunting!