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

1.05K 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

While you play a game, your actions affect the state of the game’s world, and therefore the game’s code. If the bug only happens when some part of the code is in a specific state, then you can trigger the bug by specific in-game actions.

Anonymous 0 Comments

hardware differences. the code might be the same but hardware isn’t. Also what other software is running? Drivers? What version? All these things could cause issues.

Anonymous 0 Comments

Game code is like an instruction manual for a very complicated board game.

If one of the rules of the game has an issue, that only effects the game if you end up in a situation where that rule applies.

If in your playthrough you never trigger that rule, then it doesn’t matter if it has an issue.

Anonymous 0 Comments

Since hardware is already mentioned here, the state of your memory also matters. A lot of bugs come from accidental overwriting of memory, or reading memory that hasn’t properly been initialized. These are often unpredictable. If uninitialised memory is read, then its contents will be whatever was last written to them by whatever program was using it. So a bug can be effected by software you were running before.

Memory stomps are different, but fall into the same category.

Another reason is that bugs sometimes only happen under a very specific sequence of events, that are a matter of timing.

Anonymous 0 Comments

It might be the same code but the variables might be different. You and your friend wouldn’t have done exactly the same thing so variables will be slightly different and therefore your friend experiences a bug while you don’t.

There are also cosmic rays that can flip bits in a computer. While very very rare they do happen.

Anonymous 0 Comments

Think of it like two cars driving down the same potholed road. The road is the same, but the paths the cars take will be slightly (or not-so-slightly) different. One car might take a route that avoids most of the potholes, while the other might hit a large pothole and blow a tire. Same car, different routes, different results

Anonymous 0 Comments

Imagine a video game as a basic recipe being followed in many different home kitchens (players’ devices). Even though everyone’s using the same recipe (the game code), the outcome can be different in each kitchen.

1. **Different “Kitchens” (Devices):**
Each player’s device is like a different kitchen with its own set of tools. Some might have the latest kitchen gadgets (newer hardware), while others have older tools. A bug might happen in one kitchen because of how these tools work with the recipe, but not in another.

2. **Ingredients (Software Environment):**
The software is like the ingredients used in cooking. If one kitchen uses slightly different ingredients (like an older version of an operating system), the cake (game) might not turn out the same.

3. **Cooking Method (Game Settings and Player Actions):**
The way you cook (play the game) can change things. It’s like two people baking a cake but one mixes by hand and the other uses a mixer. These different methods can change the cake’s texture.

4. **Timing:**
Timing in cooking is key. If you add eggs too soon or too late when baking a cake, it can change the outcome. Similarly, in games, if players do things at different times or under different conditions, it might lead to a bug for some but not others.

5. **Player Interaction:**
This is like a kid experimenting in the kitchen, trying different ways to mix ingredients or decorate the cake. These experiments can lead to a unique cake or, in the game, a bug.

6. **External Factors:**
Imagine something unexpected happening in the kitchen, like the power going out briefly. In gaming, this is like having an internet issue or server problem that affects the game.

Just as two people might end up with different cakes using the same recipe due to these factors, players can experience the same game differently. This variety in devices, software, player actions, timing, and external factors leads to some encountering bugs while others don’t.

Or perhaps the cake is a lie, and it’s a glitch in the grand simulation that’s running this world of ours?

Anonymous 0 Comments

It depends on a lot of things.

First, we should understand that “the code” is more like a library than a single word. Especially when it comes to online multiplayer. There’s a bunch of code. Some of it effects both people at the same time and in the same ways (say, the enemy spawned and both players see it) while some code affects only that individual player (say you got hit and it took away your health).

So you could have code that only affects one player which has a bug in it and that gets triggered so it is only affecting that one player.

Next, we need to understand the everything a computer or console does is also based on code. So not only do you have the game’s code, you have the device’s code as well. So maybe one player’s device has a bug in it that the other does not. Or maybe, there is a bug BETWEEN the code of the device and the code of the game, since they have to talk to each other.

Lastly, we have to understand that code doesn’t run perfectly every single time. There are anomalous events such as cosmic ray bit-flips that make weird things happen with code when we didn’t even say it was possible for the code to do it. Code is dependent on hardware, and hardware is real physical materials prone to the laws of physics. Weird things can happen when you get physics involved.

Lastly, and this is more of a clarification to your question. It’s not necessarily that the -code- is different but that the -value- the code spits out, is different. The same thing that prevents you from walking through a wall, may very well be the same thing that caused you to glitch into the wall. Weird right? But here’s how it works in a hypothetical.

Code says your position is 0 on the map. You try to move through a wall which is positioned at 5 on the map. The game is constantly checking your position to see if you are moving to 5 and, if so, it says “nope” and reduces your position by 1 to 3 (4-1=3) to push you away from the wall and indicate you can’t touch the wall. But what if you could skip 5 and go to 6 and THEN you go to 5? Well, okay we said reduce position by 1 so 6-1=5 and…now we’re in the wall. The code did exactly what we told it to do, we just had no plan for if you approached the wall from the other side.

This is primarily how glitches occur. It’s usually that something happened in the code in a specific way that the developers did not or could not anticipate. These differences could be very nuanced and specific, to the level that you may not even see what caused it. So you could have the same code for the game on the same device and play it at the same time. But maybe one of you does something just a smidge different and seemingly unrelated that caused a glitch 3 hours later that you can’t explain.

Anonymous 0 Comments

In Dark Souls, you can skip half of the game by parrying an enemy while standing on a very specific stair (Sen’s Skip). Too far up or down the flight of stairs and it won’t work, you have to be on the right stair – so sometimes replicating what produced a bug can be complicated

Similarly, you can duplicate items if you parry an enemy and perform some inventory menu shenanigans. However, if your character is a female then you have to backstab because the parry animation is *very slightly different -* so sometimes even when you think you’re replicating a bug, you might be overlooking something strange

In Halo MCC – you can’t play the first two coop campaigns if your partner is on a different drive type. My game is loaded on a HDD, my partner’s on a SSD, and because of this inconsistency in loading times we can’t play the first two campaigns online together – so sometimes bugs can be hardware related and your friend’s machine may not be exactly the same

Anonymous 0 Comments

Even if the code is the same every player has different inputs this triggering different parts of that code in different order, also the components on their pc/console may be different which can also cause problems