Jump to content

Netcode Quickstarter Guide


Guest soco

Recommended Posts

Scenario based explanation of the old (Scenario 1) and new netcode (Scenario 2), repost from battelog.

 

----------------------

They fixed it, to the point that it only stops registering bullets that are registered as fired after the server has determined that you are dead. So if you fire a bullet before the server determines you are dead, it will count as a live round. So in this case you can still have trade kills. But only in certain scenarios.

 

This is an example of what would happen. Say player 1 has 50ms ping to the server and player 2 has 150ms ping to the server.

 

Scenario 1

 

So it would look something like this.

 

Frame 1

Player 1 ----- (50ms) ------ Server ----- (150ms) ------ Player 2

 

So for this example, we will say that 1 bullet will count as 50 damage and 50ms as 1 frame. So player 1 sees player 2 and player 2 sees player 1. They both shoot each other at frame 1. So frame 2, the server register Player 1's bullet has hit Player 2. And Player 2 has 50hp on the server (but 100 hp on his client). So it would look somethingg like this.

 

Frame 2

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 100)Server(P2 hp 50) ----- (150ms) ------ Player 2 (hp 100).

 

Now in frame 2, both P1 and P2 shoot another bullet. In frame 3, the server registers P1's second bullet has hit player 2. So player 2 is dead on the server, but still 100hp on his client. Since it takes 3 frames for data to transfer to his computer from the server. And player 1 sees that P2 has taken 50% damage.

 

Frame 3

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 100)Server(P2 dead) ----- (150ms) ------ Player 2 (hp 100).

 

Now in frame 4, P1 and the server both see P2 as dead. And P2 still has yet to recieve any damage tho. But now here is were things get interesting, since now, P2's bullet has reached the server. Now due to how the server side checks are done. The game looks at when the bullet was fired on P2's screen. Which was at frame 1. And checks to see if P2 was dead, which he wasn't. So the bullet registers as hit. So the frame would look something like this.

 

Frame 4

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 50)Server(P2 dead) ----- (150ms) ------ Player 2 (hp 100).

 

Now in frame 5, P1 has just taken damage and P2 has just taken damage on their clients. And P2's second bullet has just registered as damage on the server. So it would look something like this.

 

Frame 5

Player 1 (hp 50) ----- (50ms) ------ (P1 dead)Server(P2 dead) ----- (150ms) ------ Player 2 (hp 50).

 

Now in frame 6, both players recieve the last bit of damage, killing them on their screen.

 

Frame 6

Player 1 (dead) ----- (50ms) ------ (P1 dead)Server(P2 dead) ----- (150ms) ------ Player 2 (dead).

 

In frame 8, is when P2 recieves data that he has killed player 1.

 

 

Scenario 2

 

We will look at what DICE has fixed under this scenario. Same players, but player 2 will shoot 1 frame later.

 

Frame 1

Player 1 ----- (50ms) ------ Server ----- (150ms) ------ Player 2

 

So for this example, we will say that 1 bullet will count as 50 damage and 50ms as 1 frame. So player 1 sees player 2 and player 2 does not see player 1 yet. Player 1 shoots at frame 1. So frame 2, the server register Player 1's bullet has hit Player 2. And Player 2 has 50hp on the server (but 100 hp on his client). So it would look somethingg like this.

 

Frame 2

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 100)Server(P2 hp 50) ----- (150ms) ------ Player 2 (hp 100).

 

Now in frame 2, now P2 turns around and sees P1. So now both P1 and P2 shoot a bullet. In frame 3, the server registers P1's second bullet has hit player 2. So player 2 is dead on the server, but still 100hp on his client. Since it takes 3 frames for data to transfer to his computer from the server. And player 1 sees that P2 has taken 50% damage.

 

Frame 3

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 100)Server(P2 dead) ----- (150ms) ------ Player 2 (hp 100).

 

Now in frame 4, P1 sees that P2 is dead.

 

Frame 4

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 100)Server(P2 dead) ----- (150ms) ------ Player 2 (hp 100).

 

Now in frame 5, P2's first bullet reaches the server, which was fired in frame 2, which in frame 2, P2 was still alive on the server. So the bullet still damages P1. And P2 has just recieved his damage on his screen.

 

Frame 5

Player 1 (hp 100) ----- (50ms) ------ (P1 hp 50)Server(P2 dead) ----- (150ms) ------ Player 2 (hp 50).

 

Now in frame 6, P2's second bullet comes to the server, which was fired in frame 3, now the server does it's check to see if player 2 was alive in frame 3 on the server. P2 was dead in frame 3. So the bullet does not register. And P1 recieves damage on his screen.

 

Frame 6

Player 1 (50) ----- (50ms) ------ (P1 dead)Server(P2 dead) ----- (150ms) ------ Player 2 (dead).

 

 

So in short, any bullet that is fired after the server determines you are dead does not register. But if a shot is fired before the server determines you are dead will register. So you can still get kill trades. But you are less likely to. This will give the advantage to players who have lower ping as well as who shoots first, is who is more likely to win a fire fight.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...