Jump to content

Hit Detection, Implementation, and UDP Cummunications


Recommended Posts

Posted (edited)

I have some concerns/questions around hit detection, implementation, and UDP communication in BOS/BOM.

 

We've been doing some testing, and have observed significantly varying results regarding hit detection and implementation based off the latency/packet loss to the server we are engaging in multiplayer activity on. To make this easier to identify the questions, I've highlighted them in blue.

 

Example #1.  When flying on a US based dueling server, a 109 will consistently down a Russian aircraft with a 1/4 second to 1/2 second burst of 20mm and MGs at close range... with more than half the time setting the Russian aircraft on fire.  When flying on the only populated Multiplayer server, Wings of Liberty, it often takes 3-4+ similar bursts to achieve the same results.

 

We're digging to try to understand why this is, which brings about the following questions to assist in the investigation:

 

1. Where is hit detection of a round impacting an enemy aircraft triggered? 

1.1. Is this hit detected on the client side, a packet sent to the server indicating the hit, then the server notifies the target of the hit and damage is implemented?

1.2. Are the bullets fired at a location in the sky, and those bullet paths sent to the server and the server detects the location of the bullet in the sky vs the location of the enemy aircraft.  If it calculates a hit then the server notifies the target and damage is implemented? (To be clear, in this calculation, to implement a solid hit, we would have to hit where the target is located on the server, not where he is displayed on our client's Front end).

 

Example #2.  This is relative to 1.2 above, and I'm sure you've all experienced similar situations like this. Sometimes you CRUSH a target at close range (lots of HE explosions and MG impacts), and the damage associated with the visuals doesn't match up.  Other times, I've lead the target too far and totally missed the shot,  I even cry out "DAMN I MISSED", only to see the target's wing separate and award me with the kill.  This is making me lean more towards 1.2 being the way hits are detected and calculated, as well as the visual representation of the opponents aircraft is displayed on your screen.  Obviously this could pose a problem because latency (and packet delivery) are directly related to the accurate detection of weapons released and the impact/damage.

 

Example #3.  You're following a target up into a climb, he stalls and is hanging in the air with little movement.  You CRUSH the target, visuals and all, and he goes down in a ball of wreckage as you would expect.  This also supports 1.2 above, because if the target it stationary, there is less room for error in the location displayed to the aggressor on your front end vs his actual location on the server (latency), as well as the hit detection and calculation server side.

 

2.  Doing some quick netstats, I can see that there is established communications on the default ports of 28000 and 28100 to the multiplayer servers (if the server host hasn't manually reconfigured them).  Is this communication to the server from the client done via TCP or UDP?

2.1.  If communications are performed via UDP, any packets lost en route to the client or server and gone forever and never re-transmitted.  If they are TCP, then they will continue to send the packet until acknowledgement is received.  What type of packets are sent for location information, and what type of packets are sent for weapons release, hit detection and implementation? 

 

Example #4, You see where I'm going with this.   You CRUSH an enemy target at close range, full visuals of HE explosions and mg impacts, and he flies away with almost no damage, taking only a fuel leak or two.    This could be the result of 2.1 above, relative to dropped UDP packets that never made it to the server.  Some of the packets with damage (or indication of weapons release) detail successfully make it to the other side of the world, but not all of them, resulting in maybe 1/3 to 2/3 less damage inflicted than expected,

 

I have some potential solutions/recommendations on how to address this, but I want to confirm how things are actually being done today before posting them.

 

I pondered whether to even bother posting this; however, the experienced results varied so significantly I couldn't turn a blind eye.  The difference between low latency servers to mid and high latency servers with varying degrees of packet loss did not represent the damage inflicted vs what was seen on our screens.  Since there is currently only one popular multiplayer server, if you don't live in Russia or Eastern Europe, this severely limits your options.

 

I'd like to try to keep this a reasonable discussion and get some real answers from the development team around some of the situations we've observed experimenting across several multiplayer servers around the globe.  PLEASE lets not make this a whine thread and keep it focused on examples and facts that contribute to the overall goal.

 

Thanks, and I hope we get some answers and other people's experience around this topic.

 

Mods: I have posted a *link* to this post in the questions for developers thread, but wanted to keep it as it's own post so it does not get buried.

Edited by [TWB]Pand
  • Upvote 6
71st_AH_Mastiff
Posted

Yes, Pand I live in California and it's worse for me the pings are 250 and hi packet loss, that's why I don't dog fight. I would shoot at a enemy plane and nothing happens to them. I do ground pounding and it would some times take up to 6 seconds for the server to report my ground kills.

Posted

MODS: Please move this back to General Discussion.  These aren't bugs until data has been confirmed how these communications work with details provided by other users and devs!  I didn't want this to be buried, so the first action by the mods appears to be an attempt to bury it.  

VBF-12_Snake9
Posted

My ping is awful also on wings. Many of you know. Lol Once a night I can walk my rounds right through a plane without any damage. My kills would probably double with a good ping. Of course my deaths would probably increase too. :) In the end I have to suck it up and deal with the Russian ping.

 

It's funny but just flying a little closer in Twa improves my experience by huge amounts.

=EXPEND=Tripwire
Posted

Awesome post Pand. Would love to know the answers to your questions too.

 

From my own tests running Wireshark and IO graphs with filters, there is a significant (almost excessive) increase in TCP traffic when firing. UDP stays somewhat constant.

Jason_Williams
Posted

This topic belongs here as it is technical in nature. We have no comments on this topic at this time, nor do I know when we will comment on it. 

 

Jason

  • Upvote 2
VBF-12_Snake9
Posted

 

 

there is a significant (almost excessive) increase in TCP traffic when firing.

 

Correct.  You ever see a plane strafe ground targets then pull up and continue shooting up in the air at nothing.  He's not holding down the trigger.  It's a problem with low bandwidth and the way the game handles it.  I try to keep my strafes at 1 second burst or the "excessive traffic" will build up and . . . ping kick.     

Posted

Im going at a relative good ping of 80 at WoL and nearly always have bad stuff happen like disconnects ,undestructible targets, enemies rubberbandzooming away or into me , popping visible out of the nowhere. (Even gunfire out of a blank screen) while in SP everything dies as expected.

 

Did you ever thought about the Wings server is just a really bad performance one ? or thought about something thats called lag compensation, (the same problem the CSGO official matchmaking servers have)

=EXPEND=Tripwire
Posted (edited)
Pand -  2. Doing some quick netstats, I can see that there is established communications on the default ports of 28000 and 28100 to the multiplayer servers (if the server host hasn't manually reconfigured them). Is this communication to the server from the client done via TCP or UDP?

 

Both are used, TCP and UDP. Knowing what each is used for is the part that is missing, but as per my previous post - TCP increases significantly when firing or when rounds impact - with ground hits spiking the most traffic.

 

 

 

I try to keep my strafes at 1 second burst or the "excessive traffic" will build up and . . . ping kick.

Yep, this is what happens to me too. Strafing ground targets, or dropping a huge number of rounds into a low IL2, or Pe2 is the most likely result of a kick. I'm wondering if ground impacts exaggerate the issue further.

Edited by Tripwire
Posted

Very Interesting topic and important subject ...  at the heart of the gameplay 

 

2 comments about this :

- when flying with poor performance / laggy servers we experience a lot of visuals explosions smokes and impacts burst, generating a very few damages in reality.

- no real topics on how fine tune our Network settings (on client side) 

Posted

Both are used, TCP and UDP. Knowing what each is used for is the part that is missing, but as per my previous post - TCP increases significantly when firing or when rounds impact - with ground hits spiking the most traffic.

Thanks for the detail Tripwire!  This is very helpful. 

 

Continued tests are leaning more and more towards server side hit detection, which isn't necessarily a bad thing because client side hit detection introduces a host of other potential issues that could be exploited.  

 

That being said, server side hit detection when you're on the other side of the world exhibits results that most of the US players are experiencing.  The increased latency in receiving the opponents position, in addition to fire time and latency for our bullet paths to travel back to the server for calculation, is all the more reason that we REQUIRE a popular US multiplayer sever to experience the game the way it was meant to be played.

 

We've extended our tests to include not firing on a target with normal lead, but instead opening fire with our best guess of where the target is on the server (further in front of where you see it),  The faster the target is going, the even more you have to lead more than you think.  

 

This mindset has had *explosive* results for our testers in the last 48 hours.  Adjusting your lead to hit a target somewhere in the sky 1/4 to a 1/2 second before you see him cross that position is no easy task, especially if you have to constantly realign your thinking based off of his speed.  Don't shoot where your think your bullets will impact the target, instead shoot where you think you'll miss by leading too much in front of the target.  

 

We're looking forward to continuing to test and receive additional pilot reports in this thread... although it would be easier for everyone if the devs would just tell us how it works so we may attempt to compensate accordingly... or provide us a US based multiplayer server. :P

 

Showerthoughts  Are those Russian pilots really better than you, or are they just seeing things closer to when they are actually happening than you are?

 

Good hunting gents! :salute!

  • Upvote 2
[APAF]VR_Spartan85
Posted

 

 

 

 

... or provide us a US based multiplayer server. :P

 

 

 

Yes Please!

 

Toronto, Ontario, Canada over here :)

 

=EXPEND=Tripwire
Posted (edited)

Here is a Wireshark graph showing the outbound TCP traffic spikes. Interestingly it seems that only large amounts of TCP outbound traffic is generated on actual object hits, not firing into the air.

 

This capture was take online in the official normal server with about 12 planes in the sky.  I hit airfield ground objects as examples of the hits.

Graph attached depicts the following traffic filtered to just the server IP address.

 

TCP In

TCP out

UDP in

UDP out

 

I would suggest that it is a combination of client/server hit detection. Server probably performs some checks against the time the rounds were fired/hit and then winds back time and checks historically as to where the plane was for the client at that time to calculate if there was actually a hit or not. This is all just speculation though, and doesnt explain why more rounds are required to take down an enemy, unless the server is not receiving the large bursts of TCP traffic within a suitable time-frame and is unable to wind back time to check the hits.

post-31310-0-03887100-1472880426_thumb.png

Edited by Tripwire
Posted

Hit detection seems to be 99% client based ie you can see how you hit the plane on your own screen. And then a whole second later you see the damage being done and even the hit sounds while you pass by. it doesnt matter how much ping you have and how much the other plane has. As long as the planes dont warp.

  • 4 weeks later...
Posted

Huh... well, it's still frustrating, but I feel better about the 23mm's I keep putting through enemy planes at range to no avail... I guess lead more?  Get closer?

71st_AH_Mastiff
Posted

Huh... well, it's still frustrating, but I feel better about the 23mm's I keep putting through enemy planes at range to no avail... I guess lead more?  Get closer?

or just play single player and get real time information?

 

:wacko:

Posted

or just play single player and get real time information?

 

:wacko:

 

Hahahahaha yeah... but then my P40 wingmen will just flat spin in since they can't figure out how to fly such a special aircraft!

  • Upvote 1
Posted

How much server does this game require for a 70-player dogfight mission with no AI?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...