If a game has the same lines of code across all players, then why do some bugs only affect certain players?

732 viewsOtherTechnology

I was playing a game earlier when a friend was experiencing a bug. Wouldn’t it make sense for me to be experiencing the same bug since were playing the same game that’s coded with the same lines of code?

In: Technology

24 Answers

Anonymous 0 Comments

Imagine a bug triggers when a player has played for 100 hours and has equipped the purple sword of triumph before completing the quest to collect 100 forest flowers. The game may not know how to proceed because it’s expecting the quest to be complete.

The game is running the same code as you overall, but not that EXACT sequence of events as you may have completed the quest first before equipping the sword

The more complex the game, the more things that can go wrong.

Anonymous 0 Comments

Imagine the code is a set of driving directions that you hand out to fifty drivers, each with their own vehicle. Most directions will be just fine no, but a few drivers might have some issues — the guy driving the semi won’t be able to get under the highway overpass, the motorcycle is gonna have a bad time on that one road full of potholes, the Rolls-Royce driver might not be willing to drive down the sketchy back alley, and so on. Computers have different capabilities, and sometimes a specific piece of code might not work as well on some computers versus others.

Beyond that, the different computers aren’t actually all executing the exact same code: most modern programs use libraries that are usually pre-built on the specific computer, either because the specifics of a task change depending on the computer in use, or simply because the code being referenced is definitely already there so there’s no point in adding another copy. However, those libraries aren’t always exactly the same — they may be updated on different schedules that the game can’t control, or they may be deliberately different because they are selected based on the user’s hardware. In the driving directions metaphor, this would be equivalent to saying “drive thirty miles north on Maple street” rather than “look for a green street sign that reads ‘N Maple St.’ when driving to an intersection, stop by removing your foot from the gas pedal and depressing the brake pedal for 1-3 seconds , then…” — you trust the person (or computer) executing the commands to already have some background knowledge that they will use to interpret your instructions.

And, as others have already pointed out, some bugs only occur in scenarios that most users won’t find themselves in. A good example of this was the [infinite ladder](https://www.digitaltrends.com/gaming/the-outer-worlds-bug-killed-companions-with-infinite-ladder-climbs/) glitch in The Outer Worlds: if you started talking to a companion while on your ship at the exact moment that another companion was climbing a ladder (which didn’t happen very often), the second companion would keep climbing through empty air until the conversation ended, at which point they would fall, possibly to their death. Having the same conversation ten seconds earlier or later wouldn’t do anything. Some bugs are like that — the circumstances that produce them are rare and hard to observe, so most people won’t experience them and the programmers will have an extremely hard time reproducing them.

Anonymous 0 Comments

it depends on what kind of bug it is, if said players are under different conditions then the result of the code being applied will be different for different players

Anonymous 0 Comments

2 people given the exact same water bottle with the exact same amount of water in it.

Person A drinks from it like you normally would and no water spills out.

Person B misaligns their mouth with the bottle’s mouth and some water spills out while drinking.

Same bottle, same water, different result.