Netcode explained.

Tutorials and guides for Plazma Burst and community features.

Netcode explained.

Postby Nyove » 26 December 2020, 08:38

Hey marines,

I want to address certain issues in the new netcode explaining why it happens and the general hate towards the new netcode.
(TLDR at the bottom of the post.)


Let us first understand why certain things happened in the new netcode, before making a fair comparison between new netcode vs old netcode.

NEW NETCODE ISSUES - EXPLAINED

1. Taking damage from bullets that are not near you.

This happens because there is a delay between your player position on your screen vs on other player's screen.
Spoiler: Show More

The delay happens because of the ping delay, the time it takes for data to travel from your computer to the PB2 server.

2. Resurrection / Dying after you killed enemy.

It's the same concept as the picture on top. In your screen, you may have killed the enemy - but in the enemy's screen, he may have killed you before you even moved and kill him.

In this situation the game will either resurrect both for you or both of you will die.

Eric Gurt even wrote these explanations in https://www.plazmaburst2.com/?s=3&a=. So in case you are wondering why these things happened in the new netcode, this is the reason.

OTHER ISSUES - NOT RELATED TO NEW NETCODE

1. Teleportation

Contrary to popular belief, players teleporting is not related to the new netcode at all. Players teleporting is because of the game mechanic called Entity Interpolation.
Spoiler: Show More
The PB2 server does not constantly keep track of every player's position. Instead, the PB2 server will only receive the position of every player in a fixed time interval. Every time this time interval has passed, a tick has passed.


Without entity interpolation, the players will appear exactly like this, appearing at one spot and freezing for some time before teleporting to the next spot. (jaggered movement)

Entity interpolation tries to predict where the player is going to movement in between ticks, but sometimes prediction is not perfect. (Especially near edges or when player is selfboosting) This imperfection prediction results in players teleporting from one spot to another, as the player's prediction position gets updated by the player's actual position.

This issue exist even before the new netcode, in fact this existed since the start of the game. Veteran ranked players knew about this and abused this, a mechanics known as Shadow Walking.

The main issue lies on the existence of lag, not the new netcode. The new netcode and the old netcode is just two different solutions to tackle the main issue that is called lag.

In fact, for those newer players (>2018) who loves to complain about the new netcode, why don't you guys go and play in the old netcode, where you have to predict where you are going to shoot and be mindful of entity interpolation potentially offsetting your bullet's position. If the older netcode is really better than the newer netcode, than you guys would be playing on the old netcode. Most just jumped on the train wagon and complain about the new netcode without actually trying to understand it and why Eric made certain decisions.

For older players who are extremely used to the old netcode, I understand that you guys are much comfortable with the old netcode, with the reasons being higher skill cap, knowing how you die and no annoying resurrections. But imagine an alternate reality,
- PB2 first started off in 2011 using the new netcode. Eric decides to change the new netcode to the old netcode in 2019.
All of us will be complaining about the change of netcode. We all will be used to having to moving your players in advanced in prediction as to where your enemy will go, and able to expect when resurrections happen. We will all be complaining about players eating bullets in the old netcode, and will want the new netcode back.


As mentioned, the issue does not lie on the new netcode itself, but the fact that
- lag exists
- there is a change of netcode.

WHY CHANGE NETCODE IN THE FIRST PLACE?

1. New netcode is friendlier to new players

Factoring in the death of flash player, the intake of players and the game's accessibility will be cut off - potentially leading to the death of PB2. As a result, I believe Eric Gurt wants to make the game more intuitive for the newer players, resulting in higher player retention rate. With more players in the community, the death of PB2 will be delayed.

2. New netcode will be more similar to PB2.5's netcode when compared to the old netcode

Although the PB2.5 netcode will be different from both of the netcode, I believe PB2.5's netcode will resemble the new netcode more than the old netcode.

Old netcode calculates damage based on the receiver.
New netcode calculates damage based on the attacker, after confirmation from the server.

Popular multiplayer games like CSGO follows the concept of the new netcode more than the old, calculating damage taken based on the attacker's screen. The 2 above mentioned issue is not prevalent in these popular games because they have many servers, drastically reducing the ping of players to near instantaneous.

SUMMARY / TLDR FOR LAZY PEOPLE

Both the new and old netcode has their pros and cons. These two are just solutions to tackle the main problem - the existence of lag. Eric Gurt changed the netcode because the new netcode is friendlier to the new players and will resemble PB2.5 netcode more than the old netcode.

Best regards,
Nyove

Additonal notes:
https://www.youtube.com/watch?v=6EwaW2i ... l=DevinDTV
Last edited by Nyove on 26 December 2020, 08:39, edited 1 time in total.
Reason: Adding additional notes.
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support

Contact me on discord for quickest reply possible.

User avatar
Nyove
Moderator
 
Posts: 255
Joined: 7 July 2016, 10:26
Location: Cicada 3301

Re: Netcode explained.

Postby eru_ » 26 December 2020, 15:04

Very interesting post Nyove tbh
User avatar
eru_
Civil Security Heavy [300]
 
Posts: 316
Joined: 18 April 2017, 18:57
Location: Safaqis/Tunisia

Re: Netcode explained.

Postby Girl_Power » 26 December 2020, 22:56

Thanks for the info. Very well thought-out!
Forever young, ever strong, ever brave.
User avatar
Girl_Power
Noir Lime [600]
 
Posts: 666
Joined: 12 February 2017, 00:45
Location: Earth | Close To The Sun

Re: Netcode explained.

Postby nightmar » 28 December 2020, 13:25

What about when you shoot someone and they do not receive damage? That is of course if they have not shot you back at the same time.
How many bugs does this game have anyway? jeez
User avatar
nightmar
Usurpation Destroyer [350]
 
Posts: 393
Joined: 2 September 2017, 19:36
Location: Inside your closet or under your bed

Re: Netcode explained.

Postby mokaal » 28 December 2020, 15:20

So, in short you're trying to convince us that PB used the same system as CS:GO does.

In fact, I'm surprised that your words became true as the video explained.

Now I'll try my best to get used to the new netcode but soon because my monitor's broken.

Nice one!
Plazma Burst 2 had its moments,

let it rest peacefully among the legendary flash games.
User avatar
mokaal
Advanced Usurpation Soldier [150]
 
Posts: 182
Joined: 11 March 2016, 13:31
Location: Egypt

Re: Netcode explained.

Postby Nyove » 28 December 2020, 16:42

Hey nightmar,

Just looking for the answer? Scroll all the way down till you see a pink text.

This is a relatively tough question. The previous few points I made are either referenced from Eric Gurt's FAQ along with online resources or through experimentation.
Eric Gurt does not explicitly explain why does this happen in this specific scenario.

However, I have a theory.

Let us first understand the concept of lag compensation.

LAG COMEPSATION

When you shoot an enemy on your screen, what you are shooting is his delayed position. (explained in my first post, imagine you are the red character in the picture now.)
Spoiler: Show More

Without lag compensation, the server will not register your hit. You have to fire in advance so your bullets hit the enemy after factoring in lag delay. (exactly how the old netcode works)

With lag compensation, everytime your bullet hits the enemy, the server tries to perform certain task to confirm your shot.
1. Server estimates how delayed is your character by looking at your ping.
2. Server rewinds enemy's current position
3. If rewinded position matches the delayed character position, confirms the shoot and applies damage.

More technical details
Spoiler: Show More
The above post misses out a single detail so the idea is more digestible for the general public. Instead of 2 positions, there are actually 3 different positions recorded in any given instance.


1 - Enemy's position you see on your screen.
2 - Enemy's position the server records.
3 - His own position the enemy's screen is seeing.

So when the server rewinds the character position, it rewinds enemy position from what it has recorded [2], not the enemy's position on the enemy's screen [3].

Summary on Lag Compensation
Lag compensation tries to confirm whether a kill is legitimate. It does this by rewinding the current enemy's position, and see if the rewinded position matches with the delayed position which the player is seeing.

Citing from his words in the FAQ:
Eric Gurt wrote:Game usually will try to predict whenever damage dealt to enemy players is enough to count as elimination. But in cases when significant network delay exists - this kind of prediction can end up being false and game will try to return enemy player to alive state.

Game usually will try to predict whenever damage dealt to enemy players is enough to count as elimination.

Eric Gurt seems to be describing lag compensation.

But in cases when significant network delay exists - this kind of prediction can end up being false and game will try to return enemy player to alive state.

So the potential answer to the question is because
- PB2 is not designed to lag compensate high pings, therefore it sometimes fail to confirm legitimate kills and resurrects the player.

Citing another answer from Eric Gurt which supports the above answer.
Eric Gurt wrote:Plazma Burst 2 isn't designed to lag compensate higher network delays and is built on top of TCP protocol (Flash Player limitation) which means way too low update rate as well (as for action-packed game like Plazma Burst 2. TCP protocol does not allow data to be sent again until reply with confirmation was received from server) in cases of players with high ping.


References

https://www.reddit.com/r/Blackops4/comm ... _rate_lag/
https://www.youtube.com/watch?v=6EwaW2i ... l=DevinDTV
https://developer.valvesoftware.com/wik ... was%20sent.
https://www.plazmaburst2.com/?s=3&a=

Best regards,
Nyove
Last edited by Nyove on 28 December 2020, 16:46, edited 1 time in total.
Reason: Adding PB2 FAQ Link into References.
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support

Contact me on discord for quickest reply possible.

User avatar
Nyove
Moderator
 
Posts: 255
Joined: 7 July 2016, 10:26
Location: Cicada 3301

Re: Netcode explained.

Postby yi en » 29 December 2020, 10:07

"no matter how high tech you have got to us, if there's part of end-users doesn't like it, either having fun losing those potential end-users, or you can revert it back to lose more."

Yes, This is a sad fact which we had to face in the market of the netcode.
Been thoughts a lot of days, months, with my limited marketing knowledge or either some tech knowledge, now it's nowhere possible to revert back to full old-netcode.

The steps had been done, some players are adapted the new netcode and they said it works best for them but others not.

Every changes would lose amount of potential people. Even if you didn't do anything like the current PB2 and PB2.5.

I was asking myself, even if old netcode really comes back, is that any chances to make players back?

welp, the answer lies there. It's too late to revert it back. Although keeping that nostalgia are good though, maybe the best he can make.

Sometimes, giving up veterans to attract more newgens are one of the options. Time's changing, the man was the only one who can refuse to change.
User avatar
yi en
Civil Security Boss [500]
 
Posts: 556
Joined: 20 August 2013, 09:10
Location: What do you need, then?


Return to Tutorials

Who is online

Users browsing this forum: No registered users