PDA

View Full Version : how bullet approximation is done online?



FatBoyHK
12-12-2004, 02:39 AM
People have very different view about the hitting power of 0.5 cal online. Someone suggested that it is mainly due to the approximation (required for bandwidth concern) done for bullets. It should affect all kinds of gun and cannon equally, but it seem that it isn't done correctly, or fairly, for the 0.50 cal.

However, arguement without real data is nonsense. Can we have the actual parameter currently in use? I wanna know the smapling percentage of all kinds of bullets, and the conpensating increase of hitting power. With this data we would be able to discuss this matter in a more civil way.

I need to stress that it is not a whining thread. Personally I have no problem with 0.50 cal online and offline. But I would like to see this game with better realism, and better competitive environment online.

Platypus_1.JaVA
12-12-2004, 10:03 AM
The American fighter aircraft almost exclusivly rely on .50 machine guns.

It is an american weapon. Americans won the war or, they like to think that way. That's why everyone thinks that the .50 should be better then any other gun in the game. Furthermore, Americans tend to scream more and louder so, that's why there is so much whining about the .50. Just a combination of factors.

FatBoyHK
12-12-2004, 10:15 AM
pls don't hijack my thread, I want information, not emotion...

oFZo
12-12-2004, 11:25 AM
That was observation, not emotion.

Oh and .50 could kill tigers.

TangmerePhilipp
12-12-2004, 11:34 AM
What approximation? You mean my bullets won't fly and hit what I see but rather an area around the plane?

Tully__
12-12-2004, 11:41 AM
As far as I understand it there is no approximation, however sometimes packet loss causes some of them to "go missing". This affects all guns, but the higher the number of bullets involved in a given time period, the more likely you are to notice.

LeadSpitter_
12-12-2004, 11:50 AM
Java, we americans do not think that, we also do noth think russia won the war itself but it took all allies to defeat the germans and axis powers.

Why we think .50 cal is should be stronger is seeing many guntables and me personally seeing over 18 hrs of guncamera footage about 10 of it being allied .50 cal clips.

So think of all the clips I have seen each clip is one minute max or shorter so I have seen alot.

I have been collecting since a kid and now im almost 30. I dont take one clip of a short burst on a 190 and it catching fire and wing tearing off from a secondary explosion and say this is how gun effectiveness should be but when theres 1000s of clips with the same effect to me thats all the proof I need.

I think alot of gunstrenghts are to weak in game and 20mm cannon being much more accurate in dogfight then .50 is beyond me.

Everything i see shows the opposite cannon being much harder to use in a dogfight and designed for bomber attack. But then again even 2 7.62 was enough to bring down even a p47 reading alot about the german 109 pilots and japanese ki43 pilots.

Dont get me wrong cannon was more effective when getting hits but look at the germans in the east same with the british they were facing alot of medium alt bombers and ground attack aircraft like the il2.

Also with the guntables they are compairing just 1 .50cal vs 1 20mm and seem to think thats how weak 4 6 8 should be this sim clearly has the firing of .50 cal done wrong and its making the recoil of 4 6 8 happen at once even tho the recoil for the 1 gun firing at once.

If you research it you see the wing mounted .50cal fired two at a time but all guns fired from one trigger so its 2 2 2 for 6 .50cal then 8 .50 cal 2 2 2 2 having a Faster ROF and more hitting power on target. In here firing all at once it seems 4 is more effective then 6 or 8. You can also tell by muzzle flash if you have seen video inner flash middle flash out flash then cycle repeats giving a zigzag effect of muzzle flash on wing mounted .50cal

There is a lot of little things for example the p47 bomb load the center rack was never able to carry a 1000lb bomb but did carry two wing

mounted 1000lb or 500lb and one centerline 500lb bomb they also had the option to drop individualy same with the p51 and 190s

I think gunther rall said it best late war german fighters were designed to bring down bombers allied aircraft were designed to take down fighters.

he also explains how effect the .50 cal was especially at range vs cannon. he also talks about how in 109s they would primarily use the two 7.62 to cripple an aircraft then finish it off with cannon.

The you have herman graf which talk about sniping engines out of multiple aircraft with 1 cannon shot. Saburo saki same thing he would use nose mounted 7.62 to cripple then use cannon to finish off. Many ki43 pilots with 2 7.62mm shot down many p39s p400s corsairs hellcats wildcats p47s with thier armament.

Look at this game for example theres alot of things that should not be happing like the dms of yak lagg fighters from 20mm but p47 and 190 explode from 2-3 hits almost everytime in one pass. But look on the bright side oleg keeps improving the game with patchs and most games stop patching after only a couple patchs.

We got alot of different types of people in the community, lots of fanboys wanting the only one or two aircraft they fly to be the best.

the the ones who want all planes to be easy to fly first time they fly them with easy to see huge basketball dots padlock just a fun game to play in general not caring about realism whatso ever and have fun with friends.

then the realism fanatics who want the sim to be equal to pilot manual performances, data charts, all altitude speeds and ballistics. reading pilots manuals of all gauges temps prop pitch manifold pressures best rpm to get best performances which immediatly get called whiner when trying to help.

So say it like it is and dont care if I ever get called a whiner US fanboy or what ever, most people know me from flying online and they all see i fly all planetypes same ammount of time as all the others.

Everyone has different views of how things were from the books charts ammount guncam etc. Flying is just not many of are hobbies but researching everything about wwii and for us its enjoyable.

Sry for hijacking the thread but im not sure how the code is different online but seems something is becuase bombstrenght vs static still ground items is different. Firing rockets hitting exactly two at convergence on a tank won kill it even tho both crators are exactly under the tank or halftrack, gunnery strenght vs offline play seems much different, but ai bail out from one burst of hits offline, So to me they seem much different even for the host online with no people in game but hitting ground targets that are static so somthings got to be different but could be wrong. Only the 1c team and oleg could tell us the answer.

FatBoyHK
12-12-2004, 01:00 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by TangmerePhilipp:
What approximation? You mean my bullets won't fly and hit what I see but rather an area around the plane? <HR></BLOCKQUOTE>

I heard that some of the bullet you fired are intentionally being removed and won't be sent across the internet, to compensate the hitting power of each bullet is increased.

FatBoyHK
12-12-2004, 01:26 PM
Leadspitter now I think I understand your point. Not to said I agree with you totally, but at least I don't see you as a noob or troll as I was before.

But I think the cannon is indeed much harder to use vs fighter in this game.... muzzle V and ROF are clearly worse than a 0.50, and this make them less effective vs fighter... frankly I think they are modelled very well already in this game.

In this game I have never been comfortable with any cannon, but once you give me 0.5cal I come alive immediately. Of course this may be related to fighting style, personaly perference and training. but to give a comparison, I was equally good with MG or Cannon in EAW or so. Therefore I think the difference in ease of use between cannon and MG is already modelled nicely in this game.

back to the hitting power of 0.50 cal, if all you suggest is ONLY to make them perform the same in online and offline, I would support you. But it must be fair across the board. I wanna know if the hitting power of cannon also decreased online? If yes we need to solve them together. When playing Online I use 0.50 cal only, so I am not the right person to make comment in this issue.

clint-ruin
12-12-2004, 02:08 PM
There are a few things that will affect this [indeed they are common to most internet games].

a) everything in PF is a non-hitscan weapon. A real live bullet representation will be drawn coming out of your gun on its way for about a kilometre or more depending on the round. This means that firing off a lot of guns produces a lot of objects that need to be reconciled with other network position data to see if a collision occurs and where. Some prediction is probably used here - this reduces network traffic and the effects of lag, but it can produce "weird" results occasionally ["WTF I was nowhere near that and I died!"], and gets worse when lag or loss is high. This is why you'll sometimes see very rapid reversals or turns or rolls online [it's not usually network manipulation or cheating] - the prediction will usually allow a plane to keep doing what it was last known to be doing until it receives new data from the client.

b) bullet amalgamation. This affects rapid firing guns the most - .50 cal, UB, MG17, ShKAS etc. Not every single round that is 'fired' produces a tracked object in the game. This is different to tracer and non-tracer rounds - both are modelled in PF - but that 1 bullet that is tracked by the engine actually represents the killing power of several rounds. This is especially noticable on something like the Hurricane IIb, where the last time I tested this it was spitting out around 100 bullets a second rather than over 200 as it did in reality. You can test this out by switching arcade=0 to arcade=1 in conf.ini, and fire off controlled timed bursts at the ground offline or from a .trk [not ntrk] playback, then compare to real ROF data per gun. Count the hit dots glowing on the ground - you'll see that not every bullet is a tracer, but it's still not spitting out the "real" amount of bullets the real guns did for some weapons. Slower-firing guns such as, say, the NS45, produce one tracked round to one real life round per shot. Somewhat related to this is "synchronisation" of fire - not through the propellor, but timing guns to all fire at once so that they all have an object to transmit at a predictable interval. This got changed for some .50 cal carrying planes in 3.02b - people seem to like it, but it is likely to have some small effect on the way the weapon works online.

c) network issues. Clients with too high a data rate set, too high detail levels set, servers with too complicated a map loaded, too many objects, too much flak, too many planes in a small area of the map all spitting out the maximum data they can for close-range tracking, network burps, misconfigured routers, cablemodem upload limitations, the list goes on and on. Make sure you are using the lowest client data rate in pfsetup/il2setup that you can get away with [lower is actually better in the vast majority of cases - less data can be transmitted faster than more data], and keep trying til you find a well run, fast server with auto-lag kicks on.

EZbusa
12-12-2004, 03:30 PM
Like I stated yesterday in another thread,
8 scored kills, 4 of them eair + 2 more fatally wounded that were scored by others with 177rds out of 15300+ rds shot out of a p47 online.
Bullets are not connecting with the target ether from my gunnery or some online problem.

This problem seems new and personally I would think at over 100rds a second I could have accidently landed more rounds than I did.
Not a wine, just what happened, if they modeled they .50s like bb guns I will still fly the p47/51.

FatBoyHK
12-13-2004, 12:18 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by clint-ruin:

b) bullet amalgamation. This affects rapid firing guns the most - .50 cal, UB, MG17, ShKAS etc. Not every single round that is 'fired' produces a tracked object in the game. This is different to tracer and non-tracer rounds - both are modelled in PF - but that 1 bullet that is tracked by the engine actually represents the killing power of several rounds. This is especially noticable on something like the Hurricane IIb, where the last time I tested this it was spitting out around 100 bullets a second rather than over 200 as it did in reality. You can test this out by switching arcade=0 to arcade=1 in conf.ini, and fire off controlled timed bursts at the ground offline or from a .trk [not ntrk] playback, then compare to real ROF data per gun. Count the hit dots glowing on the ground - you'll see that not every bullet is a tracer, but it's still not spitting out the "real" amount of bullets the real guns did for some weapons. Slower-firing guns such as, say, the NS45, produce one tracked round to one real life round per shot. Somewhat related to this is "synchronisation" of fire - not through the propellor, but timing guns to all fire at once so that they all have an object to transmit at a predictable interval. This got changed for some .50 cal carrying planes in 3.02b - people seem to like it, but it is likely to have some small effect on the way the weapon works online.
<HR></BLOCKQUOTE>

so what you are implying is that we already have the best solution avaiable?

StellarRat
12-13-2004, 12:51 AM
Tracking thousands of flying objects over the Internet would lead to massive lag. So, we probably do have the best situation available. Basically, all you can do is "sample" the bullets and fill in to make up for the missing ones when the damage is computed on the target.

Aaron_GT
12-13-2004, 01:32 AM
Tully wrote:
"As far as I understand it there is no approximation, however sometimes packet loss causes some of them to "go missing". This affects all guns, but the higher the number of bullets involved in a given time period, the more likely you are to notice."

This is testable. If you are testing on a quiet LAN then there should be no packet loss and not even any collisions. So if the 50 cal behaves as it does offline between two players on a LAN then the chances are that you are correct.

Determining when and where you hit is done on your local PC and I am not sure where the results go: direct to the other client, or via the server? If the latter then it means that the server has to cope with all the packets and is going to be a big bottleneck. So if it is all going via the server then it might mean high packet loss. This is testable (partially) by testing a server and client and adding more clients and seeing if the gunnery behaviour seems to change. If it does then it is probably congestion. If the netcode does pass everything through the server then it might be a problem. Synchronising events is easier if it all goes through the server but peer-to-peer makes better use of the network, potentially, as then you are effectively in a little one-on-one network fight with the person you are dogfighting. The complexity of the required code scares me even to think about it, though!

Aaron_GT
12-13-2004, 01:39 AM
"As far as I understand it there is no approximation, however sometimes packet loss causes some of them to "go missing". This affects all guns, but the higher the number of bullets involved in a given time period, the more likely you are to notice.
"

Yes. This is why I suspect it must be sampled (but I noted a way to test above, perhaps). A 1 second burst from a P47 generates about 100 bullets. Presumably your front end tracks the bullets based on where it thinks things are at that point in times. A typical hit ratio is 15%, so that means 15 objects hitting the plane and the other client needs to get 15 pieces of information. How many packets need to be sent to transmit that information I don't know, though, as I don't know how much information each hit takes to describe. At the very least it needs to be the angle of the trajectory and the energy of the round at that moment and round type. It's hard to say without asking Oleg to reveal how it all works.

So you are talking 60 floating point numbers and maybe 30 additional bytes (guessing that there are more than 256 potential round types so you need more than one byte) for a 1 second burst from a P47, or about 270 bytes, plus whatever usual traffic your front end needs to send about the state of your plane. Now if I could remember how many bytes in 1 packet there were...

WUAF_Badsight
12-13-2004, 02:38 AM
this is FB/PF Gospel

plz read carefully & pay attention

<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by clint-ruin:
There are a few things that will affect this [indeed they are common to most internet games].

a) everything in PF is a non-hitscan weapon. A real live bullet representation will be drawn coming out of your gun on its way for about a kilometre or more depending on the round. This means that firing off a lot of guns produces a lot of objects that need to be reconciled with other network position data to see if a collision occurs and where. Some prediction is probably used here - this reduces network traffic and the effects of lag, but it can produce "weird" results occasionally ["WTF I was nowhere near that and I died!"], and gets worse when lag or loss is high. This is why you'll sometimes see very rapid reversals or turns or rolls online [it's not usually network manipulation or cheating] - the prediction will usually allow a plane to keep doing what it was last known to be doing until it receives new data from the client.

b) bullet amalgamation. This affects rapid firing guns the most - .50 cal, UB, MG17, ShKAS etc. Not every single round that is 'fired' produces a tracked object in the game. This is different to tracer and non-tracer rounds - both are modelled in PF - but that 1 bullet that is tracked by the engine actually represents the killing power of several rounds. This is especially noticable on something like the Hurricane IIb, where the last time I tested this it was spitting out around 100 bullets a second rather than over 200 as it did in reality. You can test this out by switching arcade=0 to arcade=1 in conf.ini, and fire off controlled timed bursts at the ground offline or from a .trk [not ntrk] playback, then compare to real ROF data per gun. Count the hit dots glowing on the ground - you'll see that not every bullet is a tracer, but it's still not spitting out the "real" amount of bullets the real guns did for some weapons. Slower-firing guns such as, say, the NS45, produce one tracked round to one real life round per shot. Somewhat related to this is "synchronisation" of fire - not through the propellor, but timing guns to all fire at once so that they all have an object to transmit at a predictable interval. This got changed for some .50 cal carrying planes in 3.02b - people seem to like it, but it is likely to have some small effect on the way the weapon works online.

c) network issues. Clients with too high a data rate set, too high detail levels set, servers with too complicated a map loaded, too many objects, too much flak, too many planes in a small area of the map all spitting out the maximum data they can for close-range tracking, network burps, misconfigured routers, cablemodem upload limitations, the list goes on and on. Make sure you are using the lowest client data rate in pfsetup/il2setup that you can get away with [lower is actually better in the vast majority of cases - less data can be transmitted faster than more data], and keep trying til you find a well run, fast server with auto-lag kicks on. <HR></BLOCKQUOTE>

WUAF_Badsight
12-13-2004, 02:47 AM
each & every single bullet is a packet of infomation

it has rules & laws governing how it should perform in flight that change from the moment it starts to when it dissaperes

if it hits your plane , you CPU has to instantly display the equations governing the individual rounds damadge ability , resulting in damadge to what is able to be hurt on your A/C (things like the Cylinder Head are moddeled in FB/PF)

with all of this happening very fast , its a wonder that it plays so well at all in high ping situations , but at least for me , FB is one of the best shooting games yet made for ping tolerance

clint-ruin
12-13-2004, 03:09 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Aaron_GT:
Tully wrote:
This is testable. If you are testing on a quiet LAN then there should be no packet loss and not even any collisions. So if the 50 cal behaves as it does offline between two players on a LAN then the chances are that you are correct. <HR></BLOCKQUOTE>

Not too sure about this - just my best guess based on how these things usually work. But testing a 0 ping connection to 127.0.0.1 against what happens offline will show you the effect of the network code, just by itself, independent of lag effects. However the input to the local server will still be quantised & packetised in some way in order to travel along a tcp packet, even locally. As far as I know, other than the movement and action data being interpreted through that layer, the offline and online games are identical in terms of how stuff works for the players own plane. Some previous versions around FB1.22 to AEP2.01 did seem to show some difference in weapon damage effects on a localhost test, so it's definitely something that is capable of impacting the way things work.

And yeah, basically we have about the best solution possible given the technical limitations imposed as well as the range of combat FB has to represent. AI automata units, mission goals, biplanes, jets closing at each other at 1600kmh and firing off bullets at 800m/s headon, etc. Games like Airwarrior/Warbirds and the rest have all had similar issues to deal with and get around them in broadly similar ways. Now that more people have broadband quality connections you'll see greater use of that bandwidth in new games and "massively multiplayer" style games. Start a petition for live updated pilot faces from webcams now ;>

SeaFireLIV
12-13-2004, 03:50 AM
http://forums.ubi.com/images/smilies/10.gif It`s a guarantee that if Oleg provided any detailed hit information it would cause more problems that it would prevent! I just dunno why people just don`t enjoy the **** sim and stop over-analsying everything!

I`ll get my coat then.

Aaron_GT
12-13-2004, 05:57 AM
"each & every single bullet is a packet of infomation"

Ok, assuming you have a socket connection if you have a TCP connection and can be assured that all the packets will be (eventually) delivered bar some big problem then you'd send the information into a buffer, and then send that over a socket either when the buffer fills or after some timeout (to ensure some updates even if the buffer is not full).

These data then gets split over TCP/IP packets by the low level protocol so the contents of a buffer may be split over multiple packets.

With UDP you'd have to guard against non delivery of data so if you were relying purely on a buffer then you might find that headers describing the data might go missing if packets go missing. So if each bullet hit was encapsulated in a single packet at least if a packet is not delivered then none of the data for that bullet is delivered, and I am sure data for an individual bullet would fit in one packet. So it makes it easier to write robust netcode but at the expense of the total number of packets. And the extra network overhead might make some packet loss more likely than if it was done via buffers. But if done via buffers you'd have to find a way to recover from a packet affecting a number of bullets going missing. That would make the code much more complex, and more complex code is more likely to be buggy.

There are some open source gaming netcode libraries. It might be informative to take a look inside those and see how it's done there.

Aaron_GT
12-13-2004, 06:00 AM
Clint wrote:
"Games like Airwarrior/Warbirds and the rest have all had similar issues to deal with and get around them in broadly similar ways. "

Yes, 'rubber bullets' were notorious in Warbirds 2.7x, as were planes lurching backwards and forwards due to lag, dropped packets, etc.

I wish I could remember the name of the open source gaming netcode library I came across. I posted the name on the boards about 3 months ago.