This Gaming Problem Might Be Impossible To Fix

  Переглядів 517,967

Garbaj

Garbaj

2 роки тому

Game: Overwatch 2 Beta
2nd Channel: / garbajgaming
Twitch: / garbajcan
Twitter: / garbaj2
Discord: / discord

КОМЕНТАРІ: 930
@majorfallacy5926
@majorfallacy5926 2 роки тому
which also means that peeker's advantage is practically hardcoded into the online fps genre
@garbaj
@garbaj 2 роки тому
pretty much
@FostFauxOld
@FostFauxOld 2 роки тому
@@garbaj interestingly, while games like csgo use time stamps to verify who clicked their mouse first irl in a fight, games like dead by daylight have tried multiple iterations. Time stamp based, attack favored, and defense favored, and eventually landed on a solution where the defender gets priority unless more than a certain amount of irl time has passed.
@rifwann
@rifwann 2 роки тому
@@FostFauxOld cs whoshotfirst also determined by who got into the server first.. i think there's a 3klikphilip video about how impossible it is for 2 players to die at the same time..
@BrookeHodgman
@BrookeHodgman 2 роки тому
No there's loads of trade-off to choose between when designing an FPS game's networking. You can accept a shot that was fired by the peek'ee, after the peek'er shot them (in the peek'er's view), if that shot was faster on the draw from the peek'ee. Some games do rewinding to insert events into the past on the server & interpolation of other players on the client (Counter Strike model), others do rewinding to insert events into the past on the client & extrapolation of other players on the client (Doom 3 model). Others are completely different (P2P / hybrid P2P+server have shifting timelines instead of a server-authoritative timeline). If you know the gameplay advantages/disadvantages you want to avoid, you can design your architecture appropriately... But you'll probably end up having to accept a painful situation elsewhere 😑
@Liteg0
@Liteg0 2 роки тому
Sadly there's not really anything that can be done about it. There's always going to be latency in online games, not just FPS games, no way around it.
@ASBDGaming
@ASBDGaming 2 роки тому
This is by far the best explanation I’ve ever heard for lag / rubber banding, I’m going into game design / development as a career so this is pretty cool to see visually explained, thanks for making awesome content man I watch every video :)
@juj9305
@juj9305 2 роки тому
same
@garbaj
@garbaj 2 роки тому
thanks, glad you found it easy to understand!
@jakubmatousek9429
@jakubmatousek9429 2 роки тому
I hope you are still yet to attend high school. If you already have a programing background while not knowing this (or not being able to reason and figure it out yourself), this job is not for you, or at least you have LONG road ahead of yourself. I have met people not having any idea about basic things like this at college (like one time professor asking another student "what would you liken a raycast algorythm to, consider shooter games hint hint" and he could not figure out its alomst as same as hitscan algorythm). 95% of topics covered by this channel are very basic stuff that any programmer should have understanding of, even if not knowing how to implement it step by step.
@wtfimcrying
@wtfimcrying 2 роки тому
@@jakubmatousek9429 agreed, though i think ray casting isnt inherently hitscan.
@wtfimcrying
@wtfimcrying 2 роки тому
Game dev is a horrible career
@kevink1218
@kevink1218 2 роки тому
I actually didn't know that's what the server was doing when I was teleporting backwards! Thank you for explaining and we can only hope that we'll come to a good solution to lag in the future.
@Max-zi5wx
@Max-zi5wx 2 роки тому
It’s impossible to solve this issue unless you also solve the light speed limit
@azertyuiopqsdfghjklm
@azertyuiopqsdfghjklm 2 роки тому
@@Max-zi5wx It's not about light speed...
@kayagorzan
@kayagorzan 2 роки тому
@@azertyuiopqsdfghjklm Because it’s about LUDICROUS SPEED
@Max-zi5wx
@Max-zi5wx 2 роки тому
@@azertyuiopqsdfghjklm But it is, even with perfect netcode you still have to account for the distance between the player and the server
@monad_tcp
@monad_tcp 2 роки тому
@@azertyuiopqsdfghjklm the internet has lag because of the delay between hops, not the lightspeed of a single connection. In fact, I had a commercial fiber optics like and my ping was 5ms at the distance of almost 700km in a single continuous fiber. It used a literal fiber optic duct put on the highway that was 700km in distance to the first hop. It had like 32 pairs of multi-mode optical fibers, and it was super expensive, like $20K/mo to get your own gateway BGP routing through that. 5ms is almost like LAN, I could have LAN parties separated by 700km with a friend in the state capital and the city I was living in the countryside (is that misuse of the corporate network? yep, it is, did anyone ever discovered I did that, no, perfect crime, I just used it for Overwatch, its tiny the amount of data that games use). That's what is the speed of light, that 5ms can't be subtracted because its the literal time the light spend traveling in the tube, aka 3.5ms, plus 1.5ms in the routers, because the router's circuits and CPU actually spend some time.
@zaidlacksalastname4905
@zaidlacksalastname4905 2 роки тому
This is how to solve the problem in the future: fast forward a virtualized instance of the entire universe until when you're playing then take that data and use it instead of the inputs (kinda like a TAS). That way the player thinks they're playing but in reality it's just a TAS based on everything they've ever done in their lives.
@negitivebike3169
@negitivebike3169 2 роки тому
Hahahahahahahahahahahahahahahahahaha
@alessandrorossi1294
@alessandrorossi1294 2 роки тому
An elegant yet simple solution!
@sourlesscream1272
@sourlesscream1272 2 роки тому
i need to learn how to implement this in my projects... it will BE REVOLUTIONARY
@maulidonda
@maulidonda 2 роки тому
I find this solution brilliant but I can only imagine the moral implications of this 😂
@zaidlacksalastname4905
@zaidlacksalastname4905 2 роки тому
@@maulidonda we would change the definition of *life itself* forever and you're worried about the moral implications of a human TAS?
@panampace
@panampace 2 роки тому
Online multiplayer is the most confusing aspect of game development ever. Every mechanic needs to be designed with consideration for efficient packet sending, lag compensation, anti cheat, etc etc. You can’t just apply a one-size-fits-all method, you have to come up with specific solutions for your game. AAA studios can still struggle with this.
@koresaliva
@koresaliva 2 роки тому
Meanwhile GTA V 10 years later: Peer to peer
@nononoohfuck
@nononoohfuck Рік тому
@@koresaliva i dont know if you know this. But their peer to peer service has actually opened up a vile channel of hackers to abuse against randoms. It's arguably the worst implemented system of peer to peer i think anyone's ever seen from a "AAA studio". Its gotten so bad that people havw been doxxed or had their entire computer routed.
@nicreven
@nicreven Рік тому
it's fuckin scary, man you have to develop the entire game with the server in mind
@taragnor
@taragnor Рік тому
Yeah there's a reason you hear a lot of complaints about games with bad netcode. Writing good netcode can be extremely tough. Honestly it gets so complicated most of the time companies don't even want to risk touching it and screwing it up.
@rraaiin
@rraaiin 2 роки тому
this is similar to how trackmania validates replay files. it stores the inputs as a file and plays them out in the game, and since it's deterministic, the result should be the same. if it isnt, then it's not a legit run. it also takes up much less space
@someweeb3650
@someweeb3650 2 роки тому
That's called a demo
@garbaj
@garbaj 2 роки тому
I had no idea about that. That's really smart
@rraaiin
@rraaiin 2 роки тому
@@someweeb3650 yep, I forgot the name for it
@Calinou
@Calinou 2 роки тому
Trackmania actually stores both transforms and inputs, but only the transforms are used when *displaying* replays. Inputs are stored for the purpose of replay validation - this can be used to check if the replay was made using a cheated client, but they are not used when displaying the replay. This prevents replays from breaking after game updates that alter physics in any way (however, the validation will fail if using a recent client). I'd say storing *only* inputs in a replay file is a bad idea, since it's very easy to accidentally make a game change that breaks all replays - either by updating a level or any gameplay code. There are commercially released games out there that were released with demo loops that desync :) This is also why most modern Doom source ports can't play back the original demo loop, since vanilla demos only contain inputs. Modern source ports have made subtle changes that affect gameplay, intentionally or not.
@valletas
@valletas 2 роки тому
Not only that but it also allowed for the fanbase to detect any cheating in the speedruns by seeing the inputs and checking for any signs of slow down since the verification method cannot catch that After all slow down "technically" isnt cheating... At least to the game
@bluegru
@bluegru 2 роки тому
Client side orediction is only the start of it. It gets even more complicated when taking other players into account. The time delay there is even bigger, because you can't predict their movement and have to wait for the server to send you their position. That means, from the server perspective, you see yourself in the future while you see all other players in the past. Which can cause problems when determining weather you hit someone or not. The next step after client side prediction (and Server Reconciliation) is Lag Compensation. Gabriel Gambetta has a great guide on this topic and how it works in depth.
@novikovPrinciple
@novikovPrinciple 2 роки тому
(I got confused at first when I searched "Gabriel Gambetta" here. Turns out the guide is a blog article, and not a video here on UKposts. XD )
@bluegru
@bluegru 2 роки тому
@@novikovPrinciple oh yeah, forgot to mention it But its a great post on this topic with a nice interactive example to show how it works
@IsoiVids
@IsoiVids 2 роки тому
TF2's solution to this issue is time travel. shounic explains how that works in his video "why does crossbow go through teammates at close range?" at the timestamp 1:03. I recommend watching that.
@zappodude7591
@zappodude7591 2 роки тому
This is also why Sniper doesn't need line-of-sight to kill you
@pxldeath3561
@pxldeath3561 Рік тому
I appreciate the video recommendation
@gavalant366
@gavalant366 2 роки тому
Even on the day when lag somehow gets fixed you'll still have that one friend that blames his deaths on lag everytime.
@rominkivela9351
@rominkivela9351 2 роки тому
youre forgetting brain lag. while my computer could have an outstanding 15ms ping, it unfortunately doesn't make up for my brain lagging 500ms behind
@buttonasas
@buttonasas 2 роки тому
1. Many deaths are actually unfair due to lag, currently. If you hide behind a corner, the server has the right to un-hide you and say "you got hit before that!", which is decidedly unfair from the dead player's perspective. 2. It's nice when there is somethin inanimate to blame. I know a few games that can either use a little bit of randomness or a mode where the player knows everything in advance (in some it's damage values, in some it's a generated map/landscape) - turns out most people enjoy it more when not literally all mistakes are their fault. It's quite crushing to realise your faults and I'd rather have a loud friend than a depressed one.
@wlockuz4467
@wlockuz4467 2 роки тому
The lag can't be fixed per se, it can only be reduced to very small unnoticeable amounts of time, because for it to be fixed information would have to travel instantaneously which is not possible even in the real world.
@lethaldumpster2699
@lethaldumpster2699 2 роки тому
Deaths based on your movement, are at a high probability of being lag related though. An action such as crouching can easily take 60ms to get to the server at time .02s. If your head is shot at the time of .05s by another player, but has 15ms ping, the shot will hit you before your crouch has reached the server. Even if you did crouch before the other player pulled the trigger, the trigger pull reached the server first with better ping at that moment. Which gives the oppressor an advantage. We folks often send inputs to servers within fractions of a second at the same time as each other. Which means very frequent mistakes such as that based on ping. This is why peekers advantage exists. You can move into a room and shoot, but nobody, not even the server, knows you just walked in there. But after the server gets this info late, it trusts your movement is legal, and allows the shots to hit successfully. Even if nobody in that room ever saw you walk in. Movement is very sensitive in networked games.
@legendp2011
@legendp2011 Рік тому
some lag will always exist. because the speed of light is the limit. it takes light 130 milliseconds to circle the planet ( and that doesn't take into account any back and forth processing). there is a reason that each region has there own server. the laws off physics means we can never eliminate lag, but we can definitely reduce it a lot on local region servers
@YourBlackLocal
@YourBlackLocal 2 роки тому
Your ability to explain a concept so easily is fascinating.
@misterrhombus
@misterrhombus Рік тому
Rollback Netcode for fighting games is probably the best solution we’ve had for lag for a long time. But it can’t really just be applied to other genres
@sachitechless
@sachitechless 2 роки тому
As someone who comes from fighting games, I'd never actually realised what was going on under the hood in FPSes that made them function more smoothly than the classic delay based netcode of Fighting Games. At first I thought you were talking about a similar thing to rollback netcode in fighting games just directed at a server, where the game is focused on predicting and correcting your opponents while you have complete control over your character. but then it kind of wasn't it. I also realised rollback would be really janky in an FPS where the server not recognising you being stunned for even a short period of time might mean a situation in which you are in a death combo compared to a fighting game where animations are generally long enough to catch up to the lag since you can't microspace while using a move like you can in FPSes.
@stratusdelta3272
@stratusdelta3272 2 роки тому
it's so nice to be able to watch a simple explanation of a complicated gaming concept without all the loudness of a typical gaming video - you have a very calming voice as well, so props to you
@EinhanderSn0m4n
@EinhanderSn0m4n 2 роки тому
And like everything else comp-sci/networking related, there's both what passes for the right way and a greater number of the worst possible ways to do it, and people backing both implementations for their own ideological reasons. Some ISPs like gamers, and others really really don't, for example.
@sourlesscream1272
@sourlesscream1272 2 роки тому
great explanation and very comprehensive. short and too the point while fully getting what you said out there in an easy to understand manner
@pacefactor
@pacefactor Рік тому
There is a LOT of stuff that has been explored when dealing with online play, and a whole lot of different solutions that have been played with. Rubber-banding vrs. Lockstep (which may sound horrible, but when you have to make split second decisions and don't want the sever to just screw you on it its pretty nice), many different Peer 2 Peer solutions, and the chaos of the cloud are all major contenders. This is surface level.
@jacob-2271
@jacob-2271 2 роки тому
I can't wait for quantumly entangled game states to play without lag over infinite distances
@LinucNerd
@LinucNerd 2 роки тому
Sadly never going to happen
@jacobdaniels3246
@jacobdaniels3246 2 роки тому
That’s not possible because information cannot travel faster than the speed of light. Or more accurately, the speed of causality
@spinecho609
@spinecho609 2 роки тому
@@jacobdaniels3246 in a collapsing entangled state separated by huge distance, causality is going faster than light but information isnt
@Ale4D
@Ale4D 2 роки тому
Just use quantum entanglement to have ping 0
@azertyuiopqsdfghjklm
@azertyuiopqsdfghjklm 2 роки тому
You can't transmit data through quantum entanglement
@Ale4D
@Ale4D 2 роки тому
@@azertyuiopqsdfghjklm I know 😭
@azertyuiopqsdfghjklm
@azertyuiopqsdfghjklm 2 роки тому
@@Ale4D 😭
@EnesSahin1725
@EnesSahin1725 2 роки тому
"...the server will quickly yoink the player back..." 🤣🤣
@christianplamann3464
@christianplamann3464 2 роки тому
This is news to me and great explanation! Thanks for helping me understand input delay and rubber banding.
@tactical_slime4608
@tactical_slime4608 2 роки тому
Theres also this thing that i call ghosting where everything you see is in the past in milaseconds. see a player turn a corner they already are aiming at you before you see them and vice versa. which results in extremely fast deaths that make no sense on your screen (this applies to clientside hit detection)
@taragnor
@taragnor Рік тому
Most people just call this peeker's advantage. It refers to the fact that the guy peeking around the corner can see you before you see them. This happens because their screen is projecting what's on the other side before the server gets the info, while your screen only puts the player on it when the server tells you he's rounded the corner. This gives the character in motion an advantage compared to the person standing still.
@CrtngSomethings
@CrtngSomethings 2 роки тому
You forgot to mention there's also a lot of different types of netcode, the two most known being Delay-Based Netcode (The one you have shown in the video) and Rollback Netcode (Which is more common in Fighting Games, but there's also FPS games that use it)
@duyngo7697
@duyngo7697 2 роки тому
Can you tell me what fps game use Rollback netcode? I want to see how it play
@duyngo7697
@duyngo7697 2 роки тому
Can you tell me what fps game use Rollback netcode? I want to see how it play
@CrtngSomethings
@CrtngSomethings 2 роки тому
@@duyngo7697 From what I remember correclty, Quake already had its own implementation of a Rollback Netcode, since it prevented the input response to happen just moments later. I think Battlefield and Call of Duty also use their own implementation of Rollback, the connection in most of their games are quite good.
@CCuppy29
@CCuppy29 Рік тому
Surprised I haven’t seen any other mentions of rollback. Lots of modern fighting games basically do not need to deal with lag anymore if both players are using a wired connection
@Aceleo209
@Aceleo209 2 роки тому
Your channel always teaches me new stuff. Thanks for that!
@icefirecloud2868
@icefirecloud2868 Рік тому
This is very insightful and easily comprehensive, nice video!
@Myxo2
@Myxo2 Рік тому
Preferring turn-based games, I do not suffer from this weakness. But it is always a pleasure to listen you explain some ideas, detail, and issues.
@rakuzan5839
@rakuzan5839 2 роки тому
You need to do some kind of podcast, your voice is so soothing to hear
@britonburdick
@britonburdick Рік тому
Amazing content dude. Straight to the point and educating. You got me subscribed real quick
@HaloGoku
@HaloGoku Рік тому
Yo that was actually super informative and simple thanks
@atomicnectar
@atomicnectar Рік тому
We need to develop quantum technology that allows for a theoretical “hyper position” that is able to actively mimic player movements i.e. the player inputs and server checks are entangled at the quantum level
@3u-n3ma_r1-c0
@3u-n3ma_r1-c0 Рік тому
that made no sense to me whatsoever.
@pxldeath3561
@pxldeath3561 Рік тому
@@3u-n3ma_r1-c0 basically on a quantum level, particles behave differently, as in, they are both positive and negative, until something observe them, in which they suddenly become either "positive" or "negative". Now substitute "positive" with "on" and "negative" with "off" and now imagine a light being both "on" and "off" at the same time and when you enter the room it chooses to either be "on" or "off" and you see its result. Now substitute "on" and "off" with "dead" or "not dead" and now you can imagine it better, the server will end up calculating both results and in the server the player is in both states, and when its time to get the result, thats when, in the actual game, you get to see if you died or lived. (Much more complicated than that, but thats a rough idea that should fully or at least partly be right)
@nebulous9280
@nebulous9280 Рік тому
@@3u-n3ma_r1-c0 what the person above me said. Schrödinger's Cat is the most famous example used to teach this concept. The cat is simultaneously Alive and Dead inside of the box, and until the Box is opened, we have no way of knowing which one it is. In the above example, the player is the one who is simultaneously dead and alive until the SERVER opens the box.
@mcmorky9704
@mcmorky9704 Рік тому
@@pxldeath3561 Theres a reason quantum finishes were controversial when added to horse racing, the results tended to change when observed.
@blazernitrox6329
@blazernitrox6329 2 роки тому
I've been dabbling with server-client communication for a bit now, as I've been playing around with a concept for an online game that plays similar to Monster Hunter. This one problem has been the source of much hair pulling and gnashing of teeth. Figuring out a way to 1) make sure the server and client always agree with each other, 2) make sure the client's experience feels consistent - that is, they don't get hit by stuff they clearly dodged, and 3) make sure that it's not possible to modify the client in a way that confers an unfair advantage. It is, of course, a classic example of "You have three things: pick two."
@stefanmalovic6212
@stefanmalovic6212 2 роки тому
I started watching you for only a few months and i already learned so much more about how video games work
@ow5622
@ow5622 2 роки тому
Awesome vid! Very interesting and VERY well explained. Both from dev perspective and user's.
@AlexanderTBratrich
@AlexanderTBratrich 2 роки тому
In Overwatch, during normal gameplay, lag (for me at least) is never really a problem. The only game mode where lag makes a match just literally unplayable for me is in Lucioball. Apparently (but I can't verify this) it's because the Ball in Lucioball is tracked differently than the players, so when I play as a Goalie, and I boop away the ball, it detects that I hit it, but the lag just lets the ball continue to travel through me and into the net, resulting not only in a goal but a own-goal
@KaseyC.
@KaseyC. Рік тому
The fighting game community calls this (or at least something similar) rollback netcode. Predicts where you're going to be so there's far less lag. Only issue is that, rather than rubber banding back to where you were, in fighting games it can rarely make you rubberband into a completely different position. So, on screen, your character would jump and kick and then teleport into a couching position, which is bad because most fighting games have you block either standing or crouching for high, mid or low attacks.
@brokenpianotunes1923
@brokenpianotunes1923 2 роки тому
I would always run into this problem on almost every game, but I remember it being far less of a problem with halo 3 and reach, and I've always wondered how they did that. It's nice learning all these little things from your channel because it answers those questions that you have in the back of your head, possibly from years ago, that were never too much of a problem to actually look up
@thornels
@thornels Рік тому
The term "yoink" caught me off-guard haha! Great video!
@vwnt
@vwnt 2 роки тому
One of the solutions that fighting games have solved for sometimes now is rollback netcode. It works by predicting the move that the player would have input but its not really that good for any other type of game then fighting games
@JorgetePanete
@JorgetePanete 2 роки тому
than*
@Nothyn
@Nothyn 2 роки тому
What are you on about, rollback netcode has been the standard in shooters for decades now (since Quake iirc) while it's only just now becoming more common in fighting games. Fighting games as a genre are a joke in terms of the tech, content and monetization, they're literally a solid decade behind other genres because the devs are greedy fucks and fg consumers are dumb enough to pay $60 + $20 per season pass for the same re-released pile of shit with slightly improved graphics every 4 years for three decades.
@Jazztral
@Jazztral 2 роки тому
@@Nothyn kid I doubt you’ve ever really PLAYED a good fighting game just from hearing you shit on the entire genre. What are YOU on about? Greed isn’t a fighting-game-exclusive thing. In fact, it’s far more prominent in FPS genres. Plus, fighting games aren’t about graphics. Too much emphasis on graphics reduces performance. FGs are about technical execution, mindgames, and competition. Rollback is only just now seeing the light of day in FGs because it’s so damn hard to implement in games where every, single, frame, matters.
@quintendegraaf2129
@quintendegraaf2129 2 роки тому
@@Nothyn This is a garbage take on fighting games. You should take into consideration that the shooter genre has a much larger audience and budget than fighting games. Additionally, popular fighting games are masterpieces of game design and animation and might require a lot more work than you might think. Often times online multiplayer functionalities suffer as a result. Fighting games are best played locally anyway.
@twaps1322
@twaps1322 2 роки тому
@@Nothyn bro they play for its mechanics not graphics🤭.
@rancidmarshmallow4468
@rancidmarshmallow4468 2 роки тому
Theoretically, a future game could probably eliminate *most* lag issues with very advanced, prediction-based servers. you press a button, the server not only moves your character but predicts where it thinks you are on the client side and displays you there. given enough data on how players tend to move around the map and a powerful ML setup I'd expect very high accuracy.
@gimballock2084
@gimballock2084 2 роки тому
I doubt it, since it requires knowing what that specific human will do in that specific situation. Just the action og changing direction while running can mess with what can feasibly be predicted.
@rancidmarshmallow4468
@rancidmarshmallow4468 2 роки тому
@@gimballock2084 yeah, I'm not talking about a basic setup on the server you could do today. I assume in 10 years, maybe more, it's feasible from a computing power and storage perspective to, for example, collect, store, and train a ML model on the movements of every single player, predicting from both thier history and other plays who act similarly. In a rigid, predictable environment like a shooter my guess is that people are fairly predictable with enough info. Broadly, it becomes a question of the complexity of the model- a simple one with incomplete data wouldn't work very well, but if the game could create a perfect replica of your brain and run it in the same situation, it would always know exactly what you were about to do. Realistically in 10 years, maybe the game can be right 90% of the time, combined with other existing and new more conventional tricks it could significantly improve the experience.
@user-to7ds6sc3p
@user-to7ds6sc3p 2 роки тому
@@rancidmarshmallow4468 A small FPS drop and the resulting delayed input recognition from the game would get them out of sync and destroy the whole system, without the player doing anything different.
@BOOwF
@BOOwF Рік тому
that was actually really informational, thank you!
@brian_morrison
@brian_morrison Рік тому
I never truly understood the mechanics of lag and rubber banding until now. Thank you for the succinct explanation!
@donglers
@donglers 2 роки тому
There is actually a possible solution to this. I believe it was Linus tech tips who went over a pcie card that (sorry if I simplify too much) kept it's time synced to an incredible accuracy. And then even further beyond this is quantum entanglement to sync time also.
@pucewarfare
@pucewarfare 2 роки тому
Video title : why is this card radioactive?!?!
@GonziHere
@GonziHere 2 роки тому
And how is syncing time helpful? You still wait for the packet to arrive.
@stevethepocket
@stevethepocket 2 роки тому
@@GonziHere Because you can send the time as part of the packet, so at least the server knows exactly how long of a delay to compensate for. So for example, it could build a model of not only where it thinks everyone is now, but where it _knows_ everyone was exactly .1 second ago now that all the packets have finished coming in from that moment, and undo any hits that it thought were successful based on the intel it had at the time but actually weren't.
@yaoitiddieexpert1486
@yaoitiddieexpert1486 2 роки тому
out of curiosity: when playing overwatch on high enough ping, i find myself teleporting across the map randomly. I can understand rubber banding but this goes WAYYYY beyond that; teleporting forward, backwards, through walls etc even when im not pressing any buttons. what causes this kind of insane movement to happen when theoretically and accordin to this model, i should only rubberband to places i have already been rather then, say, through 7 walls then back to where i was an hour ago
@DaddyMouse
@DaddyMouse 2 роки тому
Maybe OW's prediction algorithm wasn't designed with high ping in mind, so once you reach a certain threshold, the servers get confused. There could also be server-side issues where the servers themselves throw artifacts. Packet loss is also something that might cause this. Imagine if the server saw you run forward, and then there was 2000ms of no consistent information coming from your end due to packet loss and whatnot. The server then might assume that you have been running in a straight line for the past 2 seconds, and rubberband you a mile forward. Just my guess
@galact1c
@galact1c 2 роки тому
^ Yeah to combat lag spikes, the server keeps a buffer of inputs it can play from. If you get a lag spike that's really bad, the server runs out of inputs to play and extrapolates based on the last move (so if you were going forward, you keep on going forward). Also, when the server sends back a correction to a player position, usually that comes with a time stamp. Since the player is "predicting" ahead of the server instead of only snapping to the correct position and experiencing a large rubber band, it replays all the predicted inputs since that correction time stamp, which typically minimizes the rubber band to something unnoticeable. However, if you're lagging really hard, the server might be predicting something completely different from what your client is predicting, resulting in you teleporting "randomly"
@RookieSnow
@RookieSnow 2 роки тому
To me what you are experiencing also sounds like the packages that contain your input might be getting lost before reaching the server, thus making you overshoot every input that actually reaches it. Rather than just slow connection, might probably be a matter of package loss as well.
@galact1c
@galact1c 2 роки тому
@@RookieSnow Yeah you're totally right, I forgot to mention packet loss
@biscotttii
@biscotttii 2 роки тому
client: *sends a packet stating a button is being held down* server: *receives the packet, starts moving your character* *lag is happening* client: *sends a packet stating the button is no longer being held down* *due to lag the packet was never been sent or being ignored by the server because of timestamp or smth else* server: *keeps moving your character because as far as the server is concerned, you're still holding that button down* client: "MOVE THE CHARACTER ERRATICALLY!!"
@metaDeWeta
@metaDeWeta 2 роки тому
Very well explained, love your content
@lulitober
@lulitober 2 роки тому
i really like these videos that are easy to watch and quick but also having something educational. espacially for me who plays lots of video games
@andrewmirror4611
@andrewmirror4611 2 роки тому
While you in shooter multiplayer games have been doing this for quite some time, here at fighting game dev it's a bit more new primarily because we use p2p connections instead of servers because servers are real expensive, so the development of online has been different. And instead of rubber ending we call that rollback, because that's what the netcode type is called
@bowmanruto
@bowmanruto 2 роки тому
its essentially the same principle though, with in peer to peer one player acting essentially as a server for the rest of the players
@andrewmirror4611
@andrewmirror4611 2 роки тому
@@bowmanruto but also the rest of the peers are servers as well, it's complicated. With non-platform fighthing games it's a bit easier because they're 1v1. There is also an increased complexity in the snapping itself, as shooters don't particularly care if the player appears in frame 1 of the walking animation, or frame 13
@GonziHere
@GonziHere 2 роки тому
It's entirely different. He is wrong, since (most) FPS are NOT deterministic, so your real position is updated from the server at all times (and hopefully the corrections are miniscule). Rollback works, because fighting games actually are deterministic and because you can easily simulate several steps of physics of the game in one frame (since it's two guys on a plane, not 32 players, 60 bullets and complex geometry).
@Cigam_HFden
@Cigam_HFden 2 роки тому
I have not researched it much (other than some old doom multiplayer back on dialup), but I would think that given internet speeds today, if you are just transmitting the key inputs of the user, it would be relatively quick. Since there would not be too many keys at one time, you could simplify all the keys to a simple amount of bits. So unless there was hundreds of players I don't see why there is still lag. Unless games are transmitting massive amounts of data like actual xyz, stats, etc, all at one time. then that would be a lot of overhead. I know that there are a variety of anti-cheat implementations, and that is probably where a lot of the overhead and lag is from. But if you are just playing straight out. I would not think there would be much, if it was an optimal bit set. I know distance is a factor too, for the information to be transmitted, but couldn't the input delay be calculated based on the slowest connection? Meaning, whoever is the slowest connect/highest ping, etc that would set how much delay each other player has on the server side. so that once everything is caught up on the server, then everyone, would be synced at the same delay amount. if that makes sense. Not sure if that is even useful, but just my random thoughts on it.
@wtfimcrying
@wtfimcrying 2 роки тому
Another factor is that these games use their proprietary tools which suck ass.
@BoredDan7
@BoredDan7 Рік тому
Lag has nothing to do with the amount of data (mostly), the issue is the information literally has to travel, and even at the speed of light that is not insignificant as far as games go. If we could send information around the world perfectly at the speed of light we'd still have about ~133ms worse case ping. If we could direct line through the earth there would still be ~85ms of ping worse case. Even in the future real world pings will probably always be worse than this as it will probably never be a perfect straight-line, there will probably still be delay from routing and processing along the way, and the information will probably never be travelling at 100% speed of light.
@RoadkillLaharl
@RoadkillLaharl 2 роки тому
Fantastic explanation as always. Love your vids
@json9865
@json9865 2 роки тому
Excellent explanation of lag in games. Hats off to you sir.
@benwillms1899
@benwillms1899 2 роки тому
Other than one outright false statement ("games are deterministic"... it's actually a lot more complicated than that. Unreal, for example, is not deterministic under most conditions. To get Unreal's physics to be deterministic, you need to run at a set tick interval - say, 16.6666ms - never miss a frame, and always run on the same platform), this is pretty good. It' a little bit over simplified, but it gets the idea across. In reality, the server will correct a client's position by finding the saved move that fails the server's validity check, and then the client will replay the saved moves AFTER that one. So, if you have 5 saved moves, and move 3 doesn't agree with the server, you don't just snap back to move 3. You replace your move 3 with the corrected one, and replay move 4 and 5 to see where you currently are. This minimizes rubber banding in most cases, with "getting stuck on something" as the big exception.
@SioxerNikita
@SioxerNikita 2 роки тому
Your example is also false. Unreal is deterministic, but because of physic ticks being unstable, it comes up with different results. The results are still deterministic, because there is no random element to these results at all. It's simply a different deterministic output decided by the length of the dynamic length physics ticks based on your example.
@benwillms1899
@benwillms1899 2 роки тому
@@SioxerNikita I mean, that's exactly what I said. Deterministic only if you take away the highly random nature of the tick (and also, you forgot that different platforms can treat floats differently, so even on a fixed physics tick it's not necessarily cross platform deterministic). If the engine is only deterministic when you do some work to ensure that an inherent random element is removed, the engine is not deterministic at its base. Usually when a developer wants to rely on determinism in Unreal (or unity), they switch the physics engine to Bullet. And when cross platform determinism is needed, floats are replaced with fixed point numbers.
@SioxerNikita
@SioxerNikita 2 роки тому
@@benwillms1899 Yes, some platforms can, although floats are pretty much set in specific formats these days. But the point is that it is technically deterministic, which it is, but you are right on the caveat that it requires consistent ticks.
@Spartan322
@Spartan322 2 роки тому
@@benwillms1899 Most modern CPUs and all modern operating systems use the same floating point standards right now and calculate them the same, floating points are only "nondeterministic" in the sense of a predictable human result where 0.1+0.2 == 0.3, (also yes I understand that these would not be accurate representations of the true value in floating point, these are just the rough approximations we can easily read in decimal) but that's not because they won't constantly make the same result, but because humans don't easily understand binary floating point because it must violate common rules of decimal systems to function. This is where the concept of "floating point inaccuracies" come in, its not that they're inaccurate to calculate a value, on pretty much every system you run a program the floating point numbers will become the same, its that they're not accurate to their decimal representations to such a degree of a common epsilon. This is because floating points such are only being represented as decimals and inherently are making a mathematical guess, we can only be sure of a floating point number most of the time by rounding it to a general epsilon, which in extreme cases will change as the difference between two distinct values will become more pronounced. This is in fact what causes issues like Minecraft's Farlands bug, (or in some games if you record world position as an absolute to the camera instead of being relative to it then you can get strange graphical behavior like meshes breaking or even draw buffers being screwed up) where the the difference between the epsilon grows as the floating point itself grows resulting in things like the epsilon eventually even being capable of becoming larger then 1 where in Minecraft that results in calculations being screwed up and producing some of the strange behavior. Thing is this is all still massively deterministic and could be known so long as you feel the need to calculate it. (from what I recall this is solved, aside from using a more "accurate" type, there's likely few techniques to correct it without too much of a cost of performance) Something similar happens as numbers get smaller (without reaching zero) as well, the epsilon will basically only end up supporting a limit of significant digits before it becomes junk "digits". But those junk "digits" will be consistent even across platforms.
@benwillms1899
@benwillms1899 2 роки тому
@@Spartan322 when working with floats, it is generally recognized that determinism can be achieved on the same architecture and with the same compiler. Compilers can choose to optimize things in different ways, resulting in the same program having slightly different instructions to reach the "same" result. If the differing instructions touch floats, different "errors" can accumulate. This is where fixed point numbers come in.
@sxmxuxxxlx7797
@sxmxuxxxlx7797 2 роки тому
I have been thinking about this problem myself for some time and have been working on a solution to make rubber banding less noticeable, at the expense of a longer client-server desync. If the server doesn't agree with the client - let's say the server thinks the client should be a transformation of (-1,0,-1) from the client position, then the client should restrict predictive movement in direction inverse to that, until there is synchronisation. So if the player attempts to move in the direction (1,0,0), the speed they travel in the x direction will be reduced by an order of magnitude to the difference in client-server position, giving the server an opportunity to 'catch up' with the location of the client. Once the server is close enough to the client that rubber banding will not be noticeable it can set the position of the client to be exactly the same as the server and continue. Reducing the magnitude of resistance to the player direction would make the effect less noticeable to the client, while increasing time the client is desynced for, so there is also an opportunity to tinker this to your liking. This works really well for me in 2D environments, although I have yet to try it in a 3D workspace it should translate over. Hope that helps!
@garbaj
@garbaj 2 роки тому
that seems like it should work in 3d as well, but I wonder how the small changes in speed would feel in first person perspective.
@Calinou
@Calinou 2 роки тому
I think most client-side prediction algorithms already do this - it's called bounding. Quake 3 certainly does for instance, and I still consider it to be one of the better implementations of client-side movement prediction out there. That, and smoothly correcting prediction errors over time instead of correcting them instantly.
@RoachDoggggJR
@RoachDoggggJR Рік тому
I was expecting a meme and instead I got a very efficient, well thought out and novice friendly explanation. Thanks for that
@tarekvr
@tarekvr 2 роки тому
Great Video! Keep it up Garbaj!
@badideagenerator2315
@badideagenerator2315 2 роки тому
Here's the ultimate solution to rubber banding: Make it canon that the fabric of spacetime is damaged, causing people to randomly make small jumps back and forth in time. You then add a weird camera effect whenever rubber banding happens. And Bob's your uncle, lag becomes an intentional gameplay mechanic.
@someweeb3650
@someweeb3650 2 роки тому
Titanfall 2 canon
@PixyEm
@PixyEm 2 роки тому
Isn't that just Tracer?
@CoolSs
@CoolSs 2 роки тому
i am certain a space age technology will be the reason why leg will be fixed. because we will need to find way to communicate in really really long distances . and whatever technology we will come up to solve that problem . gaming will benefit from it . is it safe to say i am born too early to see lag fixed ?
@Hietakissa
@Hietakissa 2 роки тому
I don't think so, even now in most places you can play games with little to no issues caused by network lag, even on mobile networks.
@CoolSs
@CoolSs 2 роки тому
@@Hietakissa what i meant and want is to play with low latency with others even if they are in the other side of the world .
@bowmanruto
@bowmanruto 2 роки тому
the example shown at the beginning of the video where the player directly controls the server side character is probably the best ''short term'' fix, its essentially what stadia tried to do and its failure shows the hurdles to this solution... however client side prediction basically allows for this already, when you have incredibly low latency (say 5-10 ms) to the server, the client side prediction is basically meaningless as it updates often enough that the users and the servers are basically in constant alignment already, which makes me wonder when client-side prediction will become a user toggle-able setting, have it on and you get a lag free experience but with the chance of rubber banding, have it off and there's a chance you might have input lag
@Hietakissa
@Hietakissa 2 роки тому
@@CoolSs I guess even that could be possible relatively soon as 5G rolls out more, probably when 6G comes along at the very latest.
@CoolSs
@CoolSs 2 роки тому
@@Hietakissa i really want that to become a reality. there is so many . i mean so many cool game on steam that died just because people who interested in it are in different places around the globe . yes this technology will be beneficial for normal game but also will make other game live longer . and even games with small community will thrive because of it .
@ashaanime4003
@ashaanime4003 2 роки тому
Yo that sleep dart on Doomfist was so smooth
@czyprodigy2743
@czyprodigy2743 Рік тому
I never knew that rubber banding was made for a good reason (or that it was even intentional) thank you for the useful information
@Gr00t
@Gr00t 2 роки тому
Best solution, fibre for all. If everyone had a
@PixyEm
@PixyEm 2 роки тому
My town has fibre all around, but I still suffer from 300ms ping because their routing is so god awful
@Gr00t
@Gr00t 2 роки тому
@@PixyEm sorry I should have said fibre everywhere plus competent ISPs lol
@pkaulf
@pkaulf 2 роки тому
I have FTTH and my ping is still 15-20ms.
@lxdixd
@lxdixd 2 роки тому
as a suggestion for a video, it seems like it would be interesting to explain "time travel" - for example, in the context of shooter games, the server rewinds back time to see if your shot actually hit the enemy to compensate for lag. it's in the same vein as things like peeker's advantage.
@onebeets
@onebeets 2 роки тому
nice timing, im working on my games network code right now
@ziyadmerzak3080
@ziyadmerzak3080 2 роки тому
I definitely thought this would be in regards to pick rates of multi-roles shooters from the thumbnail lol
@FulmenTerra
@FulmenTerra 2 роки тому
Thanks for explanation, very ilutrative. This then should explain why in some online games when you are standing on the roof of a moving vehicle you experience this rubberbanding, your pc (client) tries to predict you next position but as you are not moving it predicts that you should be in the same spot, but then the server corrects it as your position actually depends on the position of the moving vehicle who is controlled by another player. But this does not happen when you are in the passenger seat of a moving vehicle, i think in that case what most games do is deactivate this client side prediction so you position in only updated when the server says so, and your movement is interpolated between the last 2 positions the server told the client. So in that case you are actually moving "in the past". In the case of when your are driving your vehicle, the same principle you explained here applies, the difference is that the client now tries to predict the physics of the vehicle. This also explains that when 2 moving players collide you see the rubber banding as it is impossible for each client to predict the next movement of other players.
@Rctdcttecededtef
@Rctdcttecededtef Рік тому
Thanks for the explanation 👍
@blackstorm8716
@blackstorm8716 Рік тому
i most definetly learned something new today so thanks
@wyzero769
@wyzero769 2 роки тому
I knew exactly what you will be talking about just when you started xD
@pluto3450
@pluto3450 Рік тому
that sleep was crazy in the first clip
@chrisyabadabadoo5482
@chrisyabadabadoo5482 2 роки тому
Hey Garbaj, super excited and love the premise of your game... any idea on an ETA?
@OVTHeatmen
@OVTHeatmen 2 роки тому
Garbaj. The guys making shorts and understandable vidéos. No matter the algorithm, or other factors. Turns the camera on, explain what he needs to, turn the camera off. Respect !
@BacToDac
@BacToDac Рік тому
I was playing Cassidy and had used my roll to avoid combat but i noticed i had gotten the red icon and hoped it would be a minor problem but after 2 seconds, my screen yoinked upwards and noticed that i had gotten eliminated by an ana. Instead of getting out of combat i had went right in according to the server
@timothygooding9544
@timothygooding9544 Рік тому
I've kinda wondered if there are any considerations of reversing client-side prediction if a certain amount of trust with the server is reached, like having your server counterpart teleport to you allowing the client uninterrupted motion if they were suffering from it for too long. Would probably be best in cooperative settings where it's more ok for allies to jitter or teleport
@taragnor
@taragnor Рік тому
The problem is that when this happens you actually teleport on all the other players screens, leading you to be extremely difficult for them to shoot because your motion is no longer smooth. According to them you'd just be warping around. And that assumes the person isn't actively creating this effect through a cheat. Rubberbanding effectively ensures that the lagger doesn't get an advantage.
@DefineOutside
@DefineOutside Рік тому
yeah this works as long as the client sends their predicted position to the server, in which the server can track the distance between the server and client predictions and only rubberband once they don't match by a certain amount, otherwise the server will just trust the client's sent position
@Altimor0
@Altimor0 Рік тому
in a model like overwatch's, the server isn't responsible for teleporting you when you desync and doesn't know whether you've desynced. all it receives is your inputs. when the server tells the client their (now in the past) position, the client checks if it matches what they had predicted for that tick. if it doesn't, the client rolls back to when the desync occurred and instantly replays all of their inputs from that point to catch their prediction back up to where it was, but with the server's correction.
@adrigl3371
@adrigl3371 Рік тому
I never knew the rubber banding effect had an explanation, thank you
@maxemore
@maxemore 2 роки тому
Ah, I was reading the valve article on prediction and lag compensation the other day, and now you make a video about it. nice
@aschneider8912
@aschneider8912 Рік тому
Rollback netcode for fighting games works pretty similarly to this, except it also predicts your opponent's movement
@Millerboy
@Millerboy Рік тому
0:10 From my understanding, when you press a button to move your character, you ARE instantly moving you character on your client side. The server is then sent that movement information from your client and then the server sends out that movement/player location information to the other player's clients. It seems like the way you explained it in the beginning is a little backwards right?
@operatorwarden4098
@operatorwarden4098 2 роки тому
explains a lot, like when i duck behind cover and still get shot then on the enemy'd kill cam it shows me still in the open is that what this is?
@MexMX
@MexMX Рік тому
I remember being called stupid when I described this. Thanks for covering it.
@GankAlpaca
@GankAlpaca Рік тому
I have never experienced rubber banding in overwatch before though I had my shot hit animation go through but no dmg being dealt. Does it use a different system or is it just a good networking from devs? I also heard about server side prediction. May be I miss read it or smth it can possibly be that client side prediction that is shown in your video.
@FIVEBASKET
@FIVEBASKET 2 роки тому
Thank you garbaj for explaining
@acunamatata2169
@acunamatata2169 Рік тому
Still learning coding and I mean, learning the basics lol, but would it be possible to essentially “prepare” the code for any input as in its waiting and almost guessing what the player will input and has the pre planned routes/ pathing based on what they press? Almost like a multiple choice question in a sense, the code knows it’ll be one of the option just has to wait for which one
@comet.x
@comet.x Рік тому
having to wait for each one IS the problem
@scottalexgray
@scottalexgray 2 роки тому
It doesn't do a hard reset/ clean slate every time the player is in the wrong position. It corrects that specific position for that tick and then recalculates where the player would be with their input added after that.
@LinucNerd
@LinucNerd 2 роки тому
Plus in some games, you don't snap to where you should have been according to the server, there is a smoothing period to make the correction gentle and less jarring. This only takes place on the client and is just a visual thing.
@Kristyybug
@Kristyybug Рік тому
yea I noticed in OW2 Beta I couldn't hit ANY of my shots it had me extremely confused. come to find out the lag was bigger than in the first... had to learn that change... then going back to 1 everything seemed to move faster for a bit
@Paperboy018
@Paperboy018 Рік тому
This happened to me alot in codm as low end device
@hometimemayhem928
@hometimemayhem928 2 роки тому
me, who has a corrupted data bit and teleports around the map at will with sheer lag
@gamingcraftgamer
@gamingcraftgamer Рік тому
What if the server simulator moves together with your character when you push one button
@68plus1.
@68plus1. Рік тому
You explained it so well
@rubenaguilar6277
@rubenaguilar6277 Рік тому
I never put too much thought into it before, but now that I’m thinking about it, I wonder what causes some games to randomly teleport the player into random locations during lag. Like I remember being teleported out of bounds numerous times while playing games like cod
@axu6207
@axu6207 Рік тому
he must have forgotten about our savior negative ping
@fiffy6572
@fiffy6572 2 роки тому
And in addition to that maybe the server is using UDP for input check and the package get lost or corrupted or TCP and is "slower" from the start
@JettzCG
@JettzCG Рік тому
There's lag between light stimulus emitting from my monitor and hitting my retinas, my neurons firing off in response, my hands doing the inputs my brain tells it, and the electrical signals running through my setup to perform and display the inputs I told it to lag is life looool
@cauritauant6428
@cauritauant6428 2 роки тому
what if when you walk and there is eror on your side because of the server but they let the player just a few meter or so no one see lags
@danielkelsosmith
@danielkelsosmith 2 роки тому
That sleep on the phara was ahhhh
@niciusb
@niciusb 2 роки тому
I didn't notice it was overwatch 2 until like 20 seconds before the end of the video lol
@Anonymous-73
@Anonymous-73 Рік тому
Multiplayer games: you guys always think that you’re better than me Single player games: *waiting for MP to lag out and disconnect*
@Anukii
@Anukii Рік тому
This explanation just took me back to the days of dealing with lag switchers in Destiny crucible, smh
@TheStrongSkye
@TheStrongSkye Рік тому
Also wanted to add that the factor that determines how fast "checking" occurs is simply the well known "Tickrate" hope this clears some things out :D
@itisWhatitis12345
@itisWhatitis12345 2 роки тому
This is the best explanation of rubberbanding
@infernobandit2961
@infernobandit2961 2 роки тому
this is how it works in most games, but if lag in rocket league the server strokes out and warps you to random locations on the field, which looks pretty funny
@shuyastarwind7935
@shuyastarwind7935 2 роки тому
This is actually good channel holy fuck how the hell i haven't heard about you. Keep up the good work buddy
@KieranHD
@KieranHD Рік тому
The fact none of those sleep darts landed was toooo much to sit through
@SinisterPixel
@SinisterPixel Рік тому
I feel like it's just something that will go away as clientside and serverside connections in general become better. Not completely, but you can at least get it to the point where the input is 1:1 with if the signal was being sent over a LAN.
@ryuhanja3415
@ryuhanja3415 Рік тому
Best way to counter is hope you can hear your enemy first and pre fire
The Fatal Trap That Can Kill Any Game
4:27
Garbaj
Переглядів 541 тис.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Переглядів 1,3 млн
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Переглядів 6 млн
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Переглядів 9 млн
This is one of my favorite video game exploits
3:27
Garbaj
Переглядів 221 тис.
I Have One Question About Bungie's New Game
4:07
Garbaj
Переглядів 72 тис.
Create Your Own Style: Ana Amari
10:49
Feltiik
Переглядів 2,2 тис.
The Real Reason Sbmm Is Everywhere Now
4:39
Garbaj
Переглядів 456 тис.
Uhhhhh... Hmmmmmm...
8:09
Phoenix SC
Переглядів 421 тис.
The Truth About PS1 Graphics
3:06
Garbaj
Переглядів 1,5 млн
I Made the Same Game in 9 Engines
16:12
Emeral
Переглядів 259 тис.
5 weird motherboards that shouldn't exist
14:22
Linus Tech Tips
Переглядів 4 млн
When you're not the main character
5:07
Garbaj
Переглядів 56 тис.
МУСОР ТУТ РАЗБРАСЫВАЮТ! ► [Chilla's Art] Shinkansen 0
0:23
Freija Crescent shorts
Переглядів 945 тис.
Tick🔥 #brawlstars #brawler #supercell
0:12
Nalled
Переглядів 2,1 млн
Спидран по кошмару... 93ч
0:33
Zalperovski
Переглядів 2,5 млн
Кто забьёт гол ? #логиклаб
0:29
ЛогикЛаб
Переглядів 3,6 млн
МАЙНКРАФТ, НО БЕЗ МЫШКИ! | Кэтич
0:52
_кэтич_
Переглядів 636 тис.
Frog Prince Rush With Herobrine and Entity
0:32
Realistic Craft
Переглядів 23 млн