Question about objects in multiplayer video games

Started by
1 comment, last by frob 6 years, 11 months ago

Hi, I am quite new at game development and I had a quick question. The best way for me to explain my question is through an example so here it is.

Let's imagine a box in a multiplayer game, when the box falls on the ground it falls on one place for one player and on another place for another player. Is that a thing ? If so what is it called and why does it happen ?

Advertisement
This is typically known as a "desynchronization event" or desync. It can happen anywhere from extremely rarely to nearly all the time depending on the design of the game's network code.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

In networked games, some things are important and other things are not.

Objects that are critical to the game are synchronized between machines. It is important that the characters in the game are the same, in the same places, and are doing the same thing. As you realize, if the group is going in to fight a dragon and one sees a dragon throwing fireballs with seven dragon hatchlings helping out, and another player doesn't have the fireball and only has six hatchlings, that's a problem. The games are desynced and the game needs to get them back together.

Objects that are not critical to the game may be partially synchronized or completely non-synchronized. For instance, the game needs to keep in sync that the fireball is going to travel a specific path. But the various game clients don't need to have the effects on the fireball synchronized; one can have a red ball with glowing effects, smoke in the air, and dripping cinders that glow on the floor; another can have the ball with a smoke trail but nothing on the floor; and another player may have all visual effects disabled and just see a smooth sphere with minimal smoke and no cinders. Those details make the game more compelling but are not critical to the game.

There are semi-syncrhonized objects, where the authoritative server can say "This object is here", but the game client may have different ways of making that happen. Say there is an NPC animal harmlessly jumping around. The game client might teleport the harmless little animal into the right place, or it may play a slower hopping animation, or it may do nothing at all.

Some games have used a degree of error and a degree of tolerance on various things; if an object with a high tolerance for error is slightly out of place it doesn't matter, like the harmless NPC bunny in the forest. Others have a low tolerance for error, like the boss dragon throwing his punches, or other player characters standing near each other. The tolerance can also play a part in what data to send and what to omit during high-communications events. If there is a massive fight going on, it is critical that the dragon's attack be sent to all the players accurately, it is less critical that the terrified rabbit in the corner have his position updated.

This topic is closed to new replies.

Advertisement