I’m working on server optimization, and I was just watching this 2018 GDC talk given by Epic’s Fortnite devs:
https://youtu.be/KHWquMYtji0?t=1879
At 31:19 James Golding is discussing how they disabled player character animations server-side in order to save resources, as well as player collision shapes. He then says “we use different methods to verify things like hits on the server”, but he doesn’t say what those methods are.
Does anyone know what methods Fortnite uses to detect collisions between players and weapon projectiles on the server?
Currently, my game relies on player character animations server-side in order to determine if a raytrace or actor being moved by a projectile movement component has hit their body (and where). If there was a way I could disable animations and still achieve that, it would indeed save a lot of resources.
Do they just do hit detection client-side, then run some code server-side to validate the hit? e.g. checking if the hit location is sane (within a certain radius of the hit player, perhaps compensated for by network latency between server and the player dealing the hit).
I bet it is all client-side.
Server side it’s all anti-cheat validation code.
Wasn’t always like that tho.
In previous versions health bars used to react instantly to damage, now you can see that it usually have a huge delay waiting for server validation about how much health was lost.
I’m actually pretty surprised they do client-side hit detection, I wonder how exactly they validate the hit on the server. It seems like it would require a lot of work to prevent cheating. What do you imagine that consists of?
I’m thinking they would need to check things like:
- is hit within acceptable distance of player that was hit (maybe compensate for latency here)
- is player dealing hit within range for weapon being used
- does player dealing hit have line of sight to the player being hit
Any other ideas for validation they could be doing? So far I guess that’s just two distance checks and a ray trace, so wouldn’t be very resource intensive. Still, I can’t help but think this would open the game up to a lot of cheating somehow. There must be other clever tricks being used.
Epic bought EasyAnticheat company.
They have the manpower to do crazy optimizations.
So in other words, they’re using black magic. :^)