– How come a game can have random glitchy moments if it’s all pre-written code?

910 views

I was playing FarCry Primal on PS4 and Mirror’s Edge catalyst – sometimes NPCs will get stuck in a wall or end up standing on the air. Sometimes I complete a quest on FarCry and the mission objective won’t go away until I re-spawn and an NPC will be standing 2 feet above the ground.

What causes weird minor glitches like these to happen ?

In: Technology

3 Answers

Anonymous 0 Comments

Well, glitches happen when the code tells the computer to do something that the programmer didn’t mean for it to tell the computer to do.

Let’s use the example of getting stuck inside of a wall. The game code says that if you’re touching the left side of the wall, then you can’t move right (elsewise you’d walk into the wall). If you’re touching the right side of the wall, you likewise cannot move left.

If somehow you end up inside of the wall, you cannot move either way because you are touching both sides. The programmers did not fix this because they didn’t expect you to end up inside of the wall.

Let’s take another glitch – this is how you got inside of the wall in the first place. In this game, you’re on a ladder, and you get shot. You don’t die, but your character is caused to leave the ladder and go through a ‘getting shot’ animation which moves then six inches to the side. Once the animation is complete, you’re inside of the wall.

You are viewing 1 out of 3 answers, click here to view all answers.