17 July 2018

Why spelling is so important in coding: or how to screw up a perfectly good game!


In case you need help selecting an old game to spend the weekend with, it might be a good time to revisit 2013's Aliens: Colonial Marines. In a one-star review written when it was released, Xav de Matos called out the game's AI as a problem and said: "Enemy encounters feature stunningly moronic xenomorphs that show none of the tactical sense seen in the films. There's no tension or challenge to the engagements. The highly intelligent alien race simply leaps or rushes toward the player, exploding in a mist of acidic blood after absorbing enough shots. If any of them fail to combust, they simply fade away."

Why would I recommend a game that only received a one-star review when it was released? Because there's a chance a much better version of the game was hiding within, only to be stymied by, of all things, a single typo:

ClassRemapping=PecanGame.PecanSeqAct_AttachXenoToTether -> PecanGame.PecanSeqAct_AttachPawnToTeather

should read:

ClassRemapping=PecanGame.PecanSeqAct_AttachXenoToTether -> PecanGame.PecanSeqAct_AttachPawnToTether

The mistake relates to the alien's "tether" in the code. A tether is the area in the game where the alien is programmed to move in - and how it can exit this "tether" and move to another.

However, a crucial piece of code spelled it "teather", which meant an important part of gameplay simply didn't happen.

Instead, aliens wandered aimlessly around in the game or stood in groups hissing at the player as they pointed weapons at the supposed threat.

I thought Aliens: Colonial Marines was a pretty good, if somewhat buggy game. Worth revisiting: with a tweak to the code!


No comments:

Post a Comment