Compensation camps with 2D network games

I want to make a 2D game, which is basically a game with a sandbox / activity in physics. However, there is something that I really don't understand. From the research, it seems that updates from the server should only be about every 100 ms. I see how this works for the player, as they can simultaneously simulate physics and compensate for compensation through interpolation.

I do not understand how this works for updates from other players. If customers only receive player position notifications every 100 ms, I don’t see how this works because a lot can happen in 100 ms. At this time, the player could change direction twice. I was wondering if anyone has an insight in this matter.

Basically, how does it work for shooting, etc.?

thank

+3
source share
3 answers

As a rule, it will happen that the player sees the game for 100 ms after how it really is. This, and you must admit that some game projects require faster server updates. Typically, games that require faster server updates use the client / server model, where the server calculates all the physics, not the client. You saw the traditional peer2peer RTS model, slow updates. But the traditional model for FPS games is client / server, quick updates for this reason.

+2
source

There is a forum entry and a whole multi-user mode / network FAQ on GameDev on this topic, which can be well read.

+1

You must design your game to take it into account. For example, if you shoot at a target that could suddenly fail, you have shells with short-sighted fuses and a lot of noise and pretty colors, hiding the fact that neither your player nor yours really know the target.

In fact, it is quite close to real physics: it takes time for the consequences of actions that must be observed.

-1
source

Source: https://habr.com/ru/post/1781029/


All Articles