Monday, March 18, 2013

BF3 Hit Detection Investigated

I really don't wanna do this again as some people just go all jumpy whenever things turn out not exactly what they thought.... but meanwhile I really have to do this as some false statements have been already widely spread and EA/ DICE are getting away from this.. (I may not be perfectly right on this topic but I've tried my best)


 There's this common thinking that BF3's client side hit detection makes players with high ping harder to kill, and get you killed easier. And things would have been much different if the hits were server sided.

 But is it true?





Conflicting Experiences


The following comments are from this youtube video

1) People saying foreigners gain advantages
"Saw a UK player in an AUS server go 70-2 he couldn't be killed by AUS/NZ players in there"

2 ) People saying playing outside your region gains no advantages
"On PS3, this only happens to me when I play in servers outside my region (Australia), so just stick to your own region and your hit detection will be much more reliable. There is a HUGE difference when I play in US west or Asia servers (about 5.-1 second), very noticeable. It's been like this in all Frostbite engine BF games."

"Sadly, there are no latin American servers...."

We often hear people ranting about foreigners abusing hit detection. But on the other hand, we also hear people complaining about game being unplayably laggy when playing outside their region.



3 ) People saying playing locally still makes you lag
"It's probably less noticeable on consoles for the game being a bit slower paced than on PC. But I can tell it happens even when you play locally."

 So even if you play locally you'd still lag? You might be thinking "wait, that must because of the foreigners hording in". But as shown in 2 ) , those from other regions often suffer from playing in your region.


The conflicting results suggests that the so called client side theory rumored across the community could only explain this much.





The Real Client Side

(This is in short of what I've learned from this thread, wikipedia, Valve)


 There are generally three hit detection methods in FPS games - pure server side, server sided lag-compensation, and client sided lag-compensation.

 The later two were invented to make up the downside of pure server side hitreg, as in pure server side hit detection, your shots would be unreliable and inconsistent, you have to lead your targets, or worse you calculate them in mind but have to expect to still miss.


Pure server side is easy on server but clients suffers from inconsistent hitreg


 So the spirit is the same for both server sided lag-comp, and client sided one - they both seek to give players instantaneous feel in gunfights. 

Lag-comp on server side uses time stamp of players movements and adjusts the game world's state, which stresses the server a lot, while client side on the other hand, it makes players send their hits and server verifies them, and then update the game state.

 You might be thinking - "Isn't that making the game a big hell of mess with different pingers all joining in?"

 Well that's why we have server as authority. As pure client side hit detection would only work in LAN networks, we still need a server to coordinate and sync everyone in the game. With every client doing part of the lag-comp job, the server could run with a lot less stress.

 Actually it should be called server-side hit detection with client side lag-compensation.



server side compensation makes gameplay smoother, but stresses the server



client side compensation also smooths out the gameplay, and clients share the load 



 "But how do you know BF3 isn't using pure client side?" You may ask.

 Well according to the theories and experiences, if BF3 used pure client side hitreg, it'd have been much worse for everyone no matter the ping. It'd be the WYSIWYG effect to the max - Your hits all count, but so do others, and more likely the getting-shot-around-corner thing would be unpredictable as well. 

 This actually happened back in the 90s with games like Duke Nukem 3D and the first Quake World add-on, where pure client sided hit-reg were expected to be perfect but turned out otherwise because most people only had dial-up connection at the time, so even playing locally it was far from ideal.



Pure client based hit detection on WAN connection






So What's with BF3's Awful Hit Reg Anyway?


 After a long time, probably half of a year of reading and digesting here and there, I've come to the conclusion - BF3's hit detection problem could have less to do with its methodology, but more with the game's nature and EA/DICE's decision making.

 How so? Well, let me explain it in one pic:


Both server and clients are running hot



 This is a portrait of the current state of a game session in BF3. As seen in the pic, both sever and clients are running pretty hot.


 This maybe caused by:

1 ) The game itself is a resource hog
2 ) Most Physics are server sided


 For the game to look new and cool, DICE gave us the Forstbite 2 engine, at a cost of higher resource usage. Granted Battlefield is a large scale shooter game, with a lot of vehicles, destructions, explosions, and 24+ players, all being server sided, the data flow on your device and on the server would be considerably high. So to relieve the load, EA/DICE simply make the tickrate slower.


 Hence:

1 ) Server's tickrate (server's refreshing speed) being too low


 You can have a super fast hardware but for online gameplay it would only go as fast as the server can, which is the tickrate. Anything you send that is too fast for server to pick up would get delayed/ dismissed. So even with latest machine built, your connectivity potential would be still limited.


2 ) Built-in In-game latency (such as interpolation)


 And there are issues at the client's side too. With the game developed for current gen consoles mainly. The game has rendering issues from time to time. Which DICE decided to lower the resolution on console to 702p (up-scaled to 720p), but that still isn't enough, as we all have experienced the constant freezes here and there. 

 Although I'm not sure of it, the hardware limitation and interpolation (to smooth out player movements and such) introduced could have led to the delayed rendering that often occurs in game, like one guy just popped out of nowhere and you're dead with no time to react.

 How do I tell if this is not because of high ping? Well first I've experienced this in local lobbies as well, and second, the lag often comes 1 sec late, which is far more than purely a 200ms ping can do.

 Another thing to notice is, if we are to have higher tickrate, the bandwidth requirements would raise as well. (For now it's already in the Mbps range)





You're Full of $h!t, Where's the Proof?

 This is the typical reaction I get when I try to explain something on forums (which is why I don't post a lot). I don't mind. But let's take a look at this video:



 In this video they tested with different ping from 30ms to 150ms. And no matter how low or high their pings were it's always lagging for like 1 sec. (From my experience on distant server with 250+ms ping it may lag for up to 1.5~2 sec as well.)

 This clearly indicates that the game doesn't run on purely client side, otherwise they wouldn't be lagging out that bad at 30ms.

 And it's definitely not only ping that made them lag-shotted either. The slow tickrate and interpolation also played a big role in the test . See test #3 for proof. If it were only ping, the shooter and his hits wouldn't have been out of sync that bad.




The Part Where EA Gets Shadowy


 As a developer, EA/DICE should know more than us in the first place. But they never announced anything related to this issue. The only source would be from an ex-employee who publicly criticized before he joined DICE that "Even a monkey could do a better coding job than DICE."

 In his posts, he mentioned that BF3 uses a hybrid hit detection [source], which have been proved to be true after further investigation above. But the part about the tickrate were never responded directly, only discussed by other enthusiasts . They would at least answer questions about client side/ server side, but no comments on the tickrate and interpolation??


 I can't help but wonder how they made every decisions........


--what happens next is only imagination--


Problem: Server is running too hot
Solution:

1 ) Rent servers with better specs


Do you know how much it costs??



2) Lower the tickrate 



I like smart thinkers!




Problem: Game on console lags too much
Solution:

1 ) Develop PC version first and tweak it from there


This is why your not the manager



2 ) Do nothing



Full of wisdom!





Problem: Customers complain about lag
Solution:

1 ) Explain everything?


Pack up your things, really



2 ) Tell them to contact tech support



You nailed it! Promoted!






























Saturday, March 9, 2013

Nerdy Weapon Setup: Part 1 - NATO AR



M16A3 | HK416 | M16A4 | F2000 | G3A3FAMAS | L85A2 | SCAR-L | AUG A3 (Click to navigate)


- M16A3


1) US Navy

Iron Sight
Underslung Rail
No Attachment/ Heavy Barrel/ Flash Supp


US Navy sailors shooting, via www.flickr.com

M16A3, or officially, M16A2E3, comes with fixed handle, so Iron Sight is the only way to go. Most A3 in service utilize the classic ribbed handguard, which is not available in BF3, but I did find the use of KAC-M5 tactical handguard in this specific pic below, which is taken at a Navy compound. As for barrel attachments, the Navy don't fancy lasers and tac-light as other branches do, because the rifle is mostly used on board. So to your liking you can have either nothing or HB/FS.


Navy maintaining upgraded M16A3, via www.dvidshub.net




2) Canadian C7A2
M145 (As ELCAN C79)
Underslung Rail / Foregrip
No Attachment/ Anything except Suppressor


Canadian fireteam,via theminiaturespage.com
Canadian soldier with C7A2 in Afghanistan, via www.thefirearmblog.com
Canadian forces also use M16, designated as C7, the current model is A2, which is full auto capable.
And they favor the ELCAN C79 as the standard optic.




- HK416

1) US Navy SEALs

HOLO
Foregrip
Laser Sight/ Suppressor


Navy SEAL in Afghanistan, via www.c3airsoft.com

HK416 is most famous with the Navy SEALs. And as found in most pics, the setup is usually - EOTECH sight, foregrip, and laser sight. Sometimes the SEALs would use suppressor too. Since the game only allows one barrel attachment at a time, you'll have to give up laser sight if you want supp.


2) European

PK-AS (As Aimpoint CompM4)
Foregrip
Laser Sight


Norwegian soldiers on HK416,via fhpubforum.warumdarum.de

In some cases, like in German and Norwegian Army, an Aimpoint CompM4 optic may be preferred, which  Russian PK-AS could be a close alternative.



- M16A4
Standard Issue
ACOG
Underslung Rail/ Foregrip
Laser Sight


Marine with m203 equipped M16A4, via www.marinecorpstimes.com
Marine under enemy fire, via afghanidan.blogspot.com

Marine don't use M16A3 in real life unlike in BF3, they use M16A4, usually equipped with ACOG sight, foregrip or m203 grenade launcher (m320 is developed by Army), and laser sight/ tac-light.





- F2000

1) Slovenian
PK-AS
No Attachment
No Attachment/ Heavy Barrel/ Flash Supp


Slovenian soldiers equipped with F2000s

Slovenian F2000 utilizes Aimpoint sights, so PK-AS would be a close alternative.


2) Belgian
HOLO
Foregrip
Laser Sight


Belgium soldier testing F2000, via downeastblog.blogspot.com

Not much to say on this one, typical modern tactical loadout. Very similar to HK416.





- G3

1) Iranian

Iron Sight/ ACOG (As Hensoldt 4x)
No Attachment
No Attachment/ Heavy Barrel/ Flash Supp


Iranian soldier with scope mounted G3, via www.defence.pk

Iran has been manufacturing G3s under HK's license for decades. And most them comes with iron sight, but recently they have been updated with Hensoldt 4x scopes.


2) Swedish AK-4, Norwegian AG-3
PK-AS (As Aimpoint)
Foregrip
No Attachment/ Heavy Barrel/ Flash Supp


Norwegian AG-3 in Afghanistan

Both Swedish and Norwegian have their own variant of G3 rifle, AK-4 and AG-3. Both come with Aimpoint sights. Depends on the mission either a grenade launcher or foregrip can be attached. But since it's not available to mount M320 under G3 in BF3, the only option would be foregrip.


3) MSG90
Sniper Scope
Bipod
No Attachment/ Heavy Barrel/ Flash Supp


Italian marines during UN operation, via www.militaryphotos.net
Sniper team from Saudi Arabian special forces ,via gunrunnerhell.tumblr.com

Here's a good example of this setup


MSG90 is a sniper rifle based on G3's mechanics. It is also known as PSG1 in police units if you are coming from another AAA FPS franchise (you know what game it is...). This is an interesting setup for assault class. You get to play as a recon, with the benefit of medkit. The downside is, although G3 is a 7.62 rifle like any other sniper rifles in BF3 except M98B, it does a lot less damage per bullet.


4) Hellenic G3A4
HOLO
Foregrip/ Bipod
No Attachment/ Heavy Barrel/ Flash Supp


via www.militaryphotos.net




- FAMAS

1) Standard Issue

PK-AS (As Aimpoint)
Foregrip
Laser Sight/ Tactical Light


FAMAS in action
via www.m4carbine.net

The main setup for French troops in Afghanistan, with Aimpoint CompM4, foregrip, and laser/ tac-light.



2) FÉLIN FAMAS with Optical Device
IRNV
Foregrip/ Bipod
No Attachment/ Heavy Barrel/ Flash Supp



Famas with Felin system, via www.militaryphotos.net
In joint of French and American, via www.militaryphotos.net
An example of IRNV on FAMAS

The Felin is a man-machine system to assist solder and fireteam in combat. It has light intensifying image provider built in the optic device, which in BF3 the only thing comes in close would be the IRNV. To fight off the scope sway of IRNV you may consider putting bipod on it, in exchange of foregrip.


3) FÉLIN FAMAS with EOTECH Sight
HOLO
Foregrip
No Attachment/ Heavy Barrel/ Flash Supp


Newly Issued FAMAS setup. via news.fr.msn.com
FAMAS fireteam, note that only one is equipped with Felin device, via alliancegeostrategique.org


Not everyone can get his/her hand on the Felin's optic device. The rest of the fireteam would get the Felin FAMAS with EOTECH HOLO sight equipped instead.





- L85A2

Current Issue

ACOG
Foregrip/ Bipod
Tactical Light


via www.militaryphotos.net

The latest L85 rifle has been modernized into an accessory platform with tactical rails. And the legendary SUSAT scope has also been phased out of service too, replaced by ACOG sight. It's a shame that the L85 in BF3 doesn't share same upgrade. So it's impossible to underslung m320. You can choose to use either foregrip or bipod, while in real life you get a deployable grip.





- FN SCAR-L MK 16

1) SOCOM

M145 (As ELCAN Specter DR)
Foregrip/ Bipod
Laser Sight


Navy SEALs with MK16, via www.ar15.com
via globalmilitaryreview.blogspot.com
via kitup.military.com

The MK16 had been in several deployments before it got cancelled by SOCOM in favot of SCAR-H MK17. The typical setup was ELCAN Specter DR 1-4x sight, foregrip or bipod, and laser sight.


2) US Army Ranger 75th Regiment
HOLO
Underslung Rail
Tactical Light/ Laser Sight
Army Rangers with SCAR-L in public event

The 75th Regiment of the US Army Ranger was the only unit that entirely adopted MK16. The main setup was EOTECH sight, under rail, tac-light or laser sight.





- AUG A3

1) Austrian Jagdkommando

PK-AS (As Styer's stock scope or Aimpoint CompM4)
Foregrip
Tactical Light


via imgur.com



Pretty much the same config as the stock AUG A3. The scope is a 1.5x made by Styer. Which you can use PK-AS as a replacement (144% zoom)


2) Australian
ACOG/ M145
Underslung Rail
Tactical Light



Australian (Not Austrian) also use AUG since 1989. Due to their deployment in Afghanistan. Their setup tend to be more open field oriented - ACOG/ ELCAN 3.4x, M203 grenade launcher attached, and tactical light for search and patrol use.




to be continued... 









Sunday, March 3, 2013

Optics Part3: 3.4x Magnification




American 3.4x Optic - ELCAN SpecterOS 3.4x

 The M145 Machine Gun Optic, or MGO, is a variant of ELCAN's SpecterOS 3.4x designed for Canadian Forces (Salute! =D). It was first adopted back in 1989 by the Canadian military, designated as C79 scope, and has been widely equipped on C7 assault rifles, C8 carbines, and C9 light machineguns. (Canadian's M16, M4, M249). The U.S military eventually adopted C79, with some modifications, and designated it as M145.

A Candian soldier aiming on C7A2 rifle through C79A2 optic ,via wikipedia

Again, it's got poorly illustrated by DICE in BF3.


 First thing to notice is the distance between the user's eyes and the scope, which results in the messy field of view.

Mounting the optic, excerpted from www.elcansightingsystems.com

The optimal distance, according to ELCAN's manual, would be about 2 3/4 inches.

via 3gn.ar15.com
 Secondly, the M145 comes with 2 different reticle styles, one for M4 carbine, and one for machine guns. But in BF3 we have only the one for M4, which DICE ironically said it's designed for M249.

M4

LMG, via www.swfa.com
 Like what happened on ACOG mentioned in the last post, the reticle on M145 got enlarged in BF3 as well, to compensate for visibility.




Russian 3.4x Optic - BelOMO PK-AW

 The PK-AW is the latest variant of the classic design from BelOMO, the PK-A. the W here represents weaver, meaning its made to be mounted on firearms with Weaver Rail Mount. It's been out there for more than a few decades and has proven to be a durable and efficient design.


In BF3, it's elegant, clean, and leave no mess on your screen, and have become every aggressive recon and suppressive PKP operator's go-to scope. But should it be so cool?

via www.ar15.com
 PK-A in real life, in fact, is a red dot sight, which means its magnification is only 1x, just like Kobra. And it provides a bit less field of view compared to the BF3 counterpart. 

via www.spbtalk.ru
 DICE made it 3.4x just to simply counter M145 from the US side, but with its cleaner view over M145, their attempt to balance the game has been proven futile again.

 Hate to say this, but someone out there did a better job than DICE on this one (not perfect, but better), and you know who that is.... (Don't say the name or you'll get a warm cup of fanboy bash!)






to be continued... 

(In the next part I won't be doing sniper scopes as they are fine as is except for PKS-07's rangefinder not accurately scaled, an old news. Instead I'll be talking about the zoom mechanism in BF3)