35 ms·
This article explains what every figures out when making their own engine (and basing it off guessing what other games do and reading 2 blogposts instead of div
by dbttdft 4y ago
This article explains what every figures out when making their own engine (and basing it off guessing what other games do and reading 2 blogposts instead of diving into philosophical rabbit holes). It also misses that most games are made with frameworks/libs now that give the dev no control over what things require round trips to the server (I assume this is the explanation for that; Fortnite took 2 years to fix weapon switch lag and LoL still has round trip bugs).
What immediately happens in practice with interpolation, is that every second player has a bad network connection and so you get unevenly spaced movement packets from him, and he just warps from here to there (via teleport, or smooth movement, neither of which look good or are possible in single player mode), among other problems. Interpolation also adds latency which is already a constrained area. Your game should already be designed to handle a constant rate of in and outbound packets and is broken if it sends them on demand instead of packing them into this stream of evenly paced constant rate packets. If you can't send packets for a few frames you should be punished until you switch ISPs, as opposed to you getting advantage because you teleport somewhere on the other clients's screens. The idea of "right away" is a misconception here. Since you get packets at a constant rate (which should be high enough to be displayed directly on screen), interpolation is not necessary. 60 tick is literally nothing, for a game with less than 100 players and little to no moving objects. Of course, most gamedevs are not concerned with this stuff as the framerate drops to 10 in most games if 1-6 players are on screen depending on how shit their game is. Also, client side damage is a mistake.
- oneoff786 4y agoFortnite is on Epic’s own engine so that seems a little unlikely.
- s-lambert 4y ago> It also misses that most games are made with frameworks/libs now that give the dev no control over what things require round trips to the server (I assume this is the explanation for that; Fortnite took 2 years to fix weapon switch lag and LoL still has round trip bugs). League of Legends is using a custom game engine built from the ground up, it's always been a really buggy mess though.
- maccard 4y ago> also misses that most games are made with frameworks/libs now that give the dev no control over what things require round trips to the server (I assume this is the explanation for that; Fortnite took 2 years to fix weapon switch lag I can't speak for riot/league but I've worked in unreal for close to a decade and the engine provides complete control over what requires a round trip. I won't speculate on the Fortnite weapon switch lag (although I did work for epic on Fortnite at the time), but these kinds of bugs happen in the same way any other bug happens - accidental complexity. You call a function that you know requires a round trip, but then 6 months later someone else calls your function but doesn't realise that theres a round trip in there. > Since you get packets at a constant rate (which should be high enough to be displayed directly on screen), interpolation is not necessary. This is just nonsense. There is no such thing as a perfect connection, particularly when you're communicating across the internet. Even in your perfect world situation it doesn't work - if both you and I are 16 ms away from the server and it's running at 60hz (which is a stretch too - many games are running at much lower update rates because of the expense of running these services), in the worst case you have over 60ms of latency to handle, which is 4 frames. > Of course, most gamedevs are not concerned with this stuff as the framerate drops to 10 in most games if 1-6 players are on screen depending on how shit their game is This is the sort of comment I expect on Reddit and not here. Most developers, myself included would do anything in their power to avoid that happening, and I can't think of a single game that drops to even close that bad that was released in the last decade. > Also, client side damage is a mistake. Client side hit detection is a trade off. On one end it allows for abuse, but most client interpolation systems (including the one that comes out of the box with unreal engine) will mostly negate that. On the other, it allows for local-feeling play in a huge number of situations.
- hasel 4y ago> Also, client side damage is a mistake. I’m assuming you mean client side hit detection, as a person who lives in a region where a lot of games are 100 ping, that’s absolutely necessary. Without it players with latency above the tick rate would have to lead their shots to hit other players. While it causes some unfairness for the victim (ex. getting hit behind cover), it’s still the best way to do it but it must be disabled at a certain threshold, preferable where it doesn’t completely ruin the experience for players with average connections playing on their closest server. That said it is a band aid and ideally you would just set up servers closer to players.
- maccard 4y ago> ideally you would just set up servers closer to players. That doesn't really solve the problem though. In my last apartment a ping to my router on WiFi was 15ms, and it had some nonsense hardware that caused spikes of 100ms+ every now and again [0]. Someone else in your household watching Netflix can cause buffer bloat, and in a multiplayer game you have both players connections (or 10 or 100 players depending on the game). Even at 10ms latency to the server, you have a worst case network latency of 50ms if the server runs at 30hz (plus network buffering plus client frame rates plus buffering plus render buffering...) You also need the population to support having servers everywhere, and choose to put servers in places, _and_ you very quickly hit diminishing returns. Sure you could locate in 3 cities in the UK to absolutely minimize latency, but the advantage of doing so is complete elimi6 if one player is on WiFi, so the servers for all of Europe might as well be in Amsterdam or Dublin. Completely agree otherwise! [0] https://www.ispreview.co.uk/index.php/2018/08/intel-coughs-to-puma-cpu-flaw-that-hit-virgin-media-hub-3-router.html https://www.ispreview.co.uk/index.php/2018/08/intel-coughs-t...