What goes into making a multiplayer FPS game?

  Рет қаралды 14,012

Rift Division

Rift Division

Күн бұрын

Have you ever wondered what goes on behind the scenes in a multiplayer FPS game? I have spent the last two years researching and creating my own networking solution that implements player prediction, entity interpolation, delta compression, lag compensation and more for my upcoming multiplayer survival domination game Rift Division!
---------------------
SUPPORT THE GAME ON PATREON:
/ riftdivision
---------------------
Credits:
Great networking series by Tom Weiland: / @tomweiland
"Speed hacker" clip: / @shroud
"Lag compensation" clip: • How It Works: Lag comp...
---------------------
Chapters:
0:00 Intro
0:54 Network Architecture
1:26 Latency
1:49 Player Prediction
3:05 World States & Tickrate
3:41 Delta Compression
4:24 Entity Interpolation
5:13 Lag Compensation
6:39 Outro
---------------------
#devlog #gamedev #unity #multiplayer #fps

Пікірлер: 91
@sietse1249
@sietse1249 4 ай бұрын
Damn dude, This is really good. I hope the algorithm is finding you :)
@RiftDivision
@RiftDivision 4 ай бұрын
Thanks! Stay tuned for more content like this :)
@Tvngsten
@Tvngsten 3 ай бұрын
Looks like it just found him!
@fizzyo7
@fizzyo7 4 ай бұрын
Holy shit man, this is some quality content!! Rooting for the algorithm to favor you man
@RiftDivision
@RiftDivision 4 ай бұрын
Let's hope KZbin is kind to me, thanks for the support!
@Heu..
@Heu.. 4 ай бұрын
It did favour him. it just came into my Page
@Gonebyebye888
@Gonebyebye888 4 ай бұрын
you explained it very well there are 3 hard things in programming video games multiplayer advanced ai and optimizations
@RiftDivision
@RiftDivision 4 ай бұрын
Absolutely, you've hit the nail on the head. I will be covering all three of those topics at some point so keep an eye out for that!
@hyperryft
@hyperryft 3 ай бұрын
Damn this explained it so clearly and concisely. Good job!
@idohl7114
@idohl7114 3 ай бұрын
the devs of the long drive need this video
@MrGermandeutsch
@MrGermandeutsch 4 ай бұрын
This is surprisingly entertaining to watch, my ADHD approves of this!
@torjohand.aleksandersen1297
@torjohand.aleksandersen1297 3 ай бұрын
insane video, explained everything really well! Thank you
@RugbugRedfern
@RugbugRedfern 3 ай бұрын
Awesome description of server-client architecture!
@mek101whatif7
@mek101whatif7 3 ай бұрын
I am sure this is going to be 1000% relevant to a co-op city building game...
@Comrade_Tux
@Comrade_Tux 3 ай бұрын
Whoa, this is exactly what I was looking for. Been trying to figure out multiplayer for unreal engine and I'm considering trying to make my own just to help me understand it better. This video really helped me get my head around how it works.
@theRPGmaster
@theRPGmaster 3 ай бұрын
I'd love to see more in-depth videos about these topics (I'm developing a networking system from scratch, custom game engine). That might be too boring for a lot of viewers, but I can dream! Nice video.
@RiftDivision
@RiftDivision 3 ай бұрын
I will certainly consider making some more videos on these topics, are there any specifics that you would like to know about?
@theRPGmaster
@theRPGmaster 3 ай бұрын
@@RiftDivision I've been thinking about alternate approaches to the standard interpolation algorithms. I've got no concrete plans yet, but I think there are ways to make competitive games more fair and responsive by doing things smarter. One thing I know I will be implementing, an anti-cheat technique: actually hiding the positions and states of other players (not updating positions) when not visible. Defeating radars and wallhacks. Surprisingly, none or very few games do this.
@Sgtlog123
@Sgtlog123 3 ай бұрын
Why isnt this getting to the algorithm yet? Your vid is good bro.
@abe1
@abe1 3 ай бұрын
Great video, subbed
@valk4721
@valk4721 3 ай бұрын
I barely comment on videos, HOW do you not have 1000 subs. I mean you are very close when i write this (994) but wow! you explained so well.
@JonathanGoodHelper
@JonathanGoodHelper 2 ай бұрын
nice and informative. subscribed
@esmith2k2
@esmith2k2 2 ай бұрын
This is actually a really good video!
@AntiqueGear
@AntiqueGear 3 ай бұрын
this is an insanely poggers high level view of multiplayer. thank you.
@Good_Username
@Good_Username 3 ай бұрын
Very nice video!
@cate01a
@cate01a 3 ай бұрын
glad that you seem to be implementing the solution where it is fair to both fast and slow players, not just to the american with good ping i think pavlov vr uses that implementation too, and it is so helpful because it makes the game very playable even when youre playing sweaty amongst americans and aussies with maybe as much as 500ms lag between players
@theDemolisher13
@theDemolisher13 3 ай бұрын
if your whole play style resolves around cover diving the server lag can straight up kill that tactic. I know it's the best we got right now though I would still advocate for looking for other solutions
@Mraprilcoffee
@Mraprilcoffee 4 ай бұрын
great video! thanks for you and the algorithm
@RiftDivision
@RiftDivision 4 ай бұрын
Thank you, I'm glad you enjoyed it! :)
@markverb1
@markverb1 3 ай бұрын
very helpful!
@LachlanHitchcock
@LachlanHitchcock 4 ай бұрын
Yo thanks a lot for the vid, keep em up! Hope the algorithm finds you!
@RiftDivision
@RiftDivision 4 ай бұрын
No worries, I'm glad you enjoyed it! :)
@StormcellX
@StormcellX 3 ай бұрын
Dude this is absolutely brilliant
@GlorifiedPig
@GlorifiedPig 4 ай бұрын
I love the vibe of this project
@prodkanser
@prodkanser 4 ай бұрын
Can’t wait for this to drop
@kianfitzpatrick6507
@kianfitzpatrick6507 4 ай бұрын
Smashing it lad keep it up
@monfrezo
@monfrezo 4 ай бұрын
It is not possible to encrypt the client data, so cheaters wont be able to access it, im a complete noob btw
@RiftDivision
@RiftDivision 4 ай бұрын
It's a valid question! Generally, cheating is done from a client, for example trying to modify their own position, give themselves items or changing their health etc. If the clients were to encrypt their data, it would prevent a third party from intercepting their data and modifying it, although this is not generally the way cheating in video games plays out. The best thing is to validate a client's data on the server as much as possible, and reject it if it doesn't align with the server's state :)
@alvesvaren
@alvesvaren 4 ай бұрын
@@RiftDivisionIt's still important to encrypt the data, as it would make sure another computer couldn't for example listen to all location updates over the network and display a radar hack on another screen, but as you said, it won't help with cheats that run on the client machine. This is also really only important if the game has an anti-cheat, as otherwise they can just create the cheat on the target machine anyways
@RiftDivision
@RiftDivision 4 ай бұрын
@alvesvaren 100%, encryption is still a very important part to ensure there's no middle man attacks on the network.
@EJ1..1
@EJ1..1 4 ай бұрын
Keep going brother dont give up - your 33rd subscriber
@RiftDivision
@RiftDivision 4 ай бұрын
I'll never give up, I appreciate the support!
@StaerkungFuerMeineBrueder
@StaerkungFuerMeineBrueder 3 ай бұрын
Thanks for telling us about the development of a multiplayer first person shooter game. It's interesting to think about these things :-)
@scemochilegge8581
@scemochilegge8581 4 ай бұрын
Great video! Good job with the game
@RiftDivision
@RiftDivision 4 ай бұрын
Thank you!
@abdullaheta
@abdullaheta 3 ай бұрын
I hit a gem, i found this channel!
@gubodaniel9523
@gubodaniel9523 3 ай бұрын
Now I know why do I die behind cover in CS2. Thanks. :D
@lordzockt1853
@lordzockt1853 4 ай бұрын
this is an amazing video!
@RiftDivision
@RiftDivision 4 ай бұрын
Thanks, I appreciate it!
@aidanmelendez7201
@aidanmelendez7201 3 ай бұрын
for the lag compensation portion of this. how are you handling the data needed to simulate the hitbox locations at the given server tick to handle the shot? as i noticed it was a bit off. and wouldn't that require quite a bit of data on the server. if we had to always store the hitbox information for every server game world tick? or it that animation derived from other player information?
@boogiehasfun
@boogiehasfun 3 ай бұрын
pretty good video to watch at 7:00 in the morning
@niklasw.1297
@niklasw.1297 2 ай бұрын
the server know where he is at all times. It knows this by knowing where he isn't...
@aidensgamestuff4620
@aidensgamestuff4620 4 ай бұрын
This is a high quality vid dawg, lmk when you hit 100k subs -your 31st subscriber
@RiftDivision
@RiftDivision 4 ай бұрын
Thank you, I appreciate the support!
@ContenterDEV
@ContenterDEV 4 ай бұрын
cool!
@feyakut
@feyakut 4 ай бұрын
Goated video. Do you plan on making an asset out of your networking package
@RiftDivision
@RiftDivision 4 ай бұрын
I've certainly considered it, it would take a while to clean it up to a production standard but I won't rule it out as a possibility.
@armada2483
@armada2483 3 ай бұрын
I really liked how you explained it beginner-friendly, though I still have questions and Im sure there are many people like me too. Do you think a beginner game dev should follow your path and create his own mp solution like you did or use the ones in the market? (and if you have recommendation on choosing which one pls share) thank you so much!
@RiftDivision
@RiftDivision 3 ай бұрын
That's a good question. I think a lot of it depends on the requirements of the game. Most networking solutions offer a generic solution that will fit most projects with the downside of having less fine control over what happens behind the scenes. I chose to develop my own solution as I wanted to have fine control for the PvP aspects of the game, allowing me to fix any bugs that arise and hopefully build a stable experience. As for a beginner, I would look into Photon for a generic out of the box solution that will cover most use cases, but if you would like a more low level solution, Riptide (created by Tom Weiland), will allow you to build upon a more basic netcode solution giving more fine control. I hope this helps!
@Coolkidstan
@Coolkidstan 3 ай бұрын
I've been really struggling with weapon switching currently my code is just using a list that references all the weapons and then when input(Alpha 1 to 9) is clicked it set's the corresponding weapon in the list as active but when i try to animate arms is the issue I just change an Int value in my animator which at the current moment changes a transition as useable or not and plays the pickup animation of the weapon although it seems to animate the arms separately so for example when the shotgun is equipped after the knife the knife's arm animation will play but the shotgun will stay in it's original position.
@xardinlume7345
@xardinlume7345 3 ай бұрын
So basically, server-side rollback netcode? I still feel like 100ms delay is long, and I might be comparing pineapples and apples, but 2-players fighting games and some team games do have less latency than that... I'm guessing that in the end it's mostly a problem of server performance/scalability? Or that the difference in world states is too heavy to allow for more frequent tick rates? That aside, great vid!
@Keksent
@Keksent 3 ай бұрын
now thats a dev log
@RyTiex
@RyTiex 4 ай бұрын
Cool video.
@CaptainFX1
@CaptainFX1 3 ай бұрын
Could you release some simple example project, it would be very interesting
@RiftDivision
@RiftDivision 3 ай бұрын
I probably won't release an example project using the same netcode as my main project as I want to try keep it as secure as possible and if cheaters get access to the source code they can finds exploits and such. If I get the time I will piece together something that is a little more simple but displays all the concepts outlined in this video!
@switch-axe
@switch-axe 4 ай бұрын
Dude when are you releasing this awesome game and this is the best coding channel since Dany.
@RiftDivision
@RiftDivision 4 ай бұрын
I have no set release date yet, but stay tuned as I will be doing play tests in the near future. Thank you for the kind words! :)
@user-fr8mz9cw8m
@user-fr8mz9cw8m 3 ай бұрын
You are on my front page 😁
@jabtastic
@jabtastic 4 ай бұрын
underrated lol
@razrazi-ci5lc
@razrazi-ci5lc 3 ай бұрын
hi man great work i have qus how can imake online inventory system like you make thanks
@RiftDivision
@RiftDivision 3 ай бұрын
Thanks! It's a good question, the inventory is handled on the server (to ensure cheaters can't modify their own inventory). The client sends over inventory requests, such as moving items, dropping items, etc. The server then processes these requests and sends the relevant inventory data back. The key part to ensuring the inventory system is optimal for network usage is to only send inventory data that can be seen by the player - don't send other player's inventories, or the inventories of storage boxes.
@razrazi-ci5lc
@razrazi-ci5lc 3 ай бұрын
can you make videos how to make that pls thanks you very much man @@RiftDivision
@Nightshardyeet
@Nightshardyeet 3 ай бұрын
I need help: I die and the person only shoots me one second later. No the killcam is not a replay as I just die without any reason and then see the killcam display that the person who killed me is shooting the air where I stood 1 second before I died-without me standing there. I see my radgoll (dead body) where it should be-which is also not where they shot me.They used a weapon with tracers so I could see when they shot. I don't even see I am damaged, I just die. I even recorded it once and it didn't display any damage taken. I know it probably is a skill issue but sometimes it doesn't happen to me and I go 25 - 4. (My internet is also not bad)
@TetyLike3
@TetyLike3 4 ай бұрын
for the algorithm 🗣️🗣️
@RiftDivision
@RiftDivision 4 ай бұрын
🗣️🗣️
@Tyty1308_Off
@Tyty1308_Off 2 ай бұрын
are your dummy characters (in unity) from Call of Duty Advanced Warfare? They look kind of like Gideon with an exo-suit on.
@salatalyanca3312
@salatalyanca3312 3 ай бұрын
00:02 France
@damian6202
@damian6202 3 ай бұрын
Huh, then, how does cs2 to work with this infinite tick system they have?
@INeatFreak
@INeatFreak 3 ай бұрын
Don't agree with the thumbnail, making a multiplayer fps game IS harder than what many players think. Great video though, got me subscribed for more even though I already know most of these stuff!
@Just_memes1
@Just_memes1 2 ай бұрын
Are you creating a game alone?
@trophy9782
@trophy9782 3 ай бұрын
>spoof ping to server >shoot at the past records >server accepts it as a legitimate due to you spoofing the ping and sees it as a accurate shot on target >hits the player >ez time travel
@Grayest_Fox
@Grayest_Fox 3 ай бұрын
Anon discovers lag switches
@no_name6584
@no_name6584 4 ай бұрын
Damn great video and great explanation! Hopefully the algorithim does it s thing.
@RiftDivision
@RiftDivision 4 ай бұрын
Thank you!
@Reinhard_Erlik
@Reinhard_Erlik 3 ай бұрын
Do you have a discord server?
@RiftDivision
@RiftDivision 3 ай бұрын
Not currently, but I might create one sometime in the future!
@BingBong-zq9cp
@BingBong-zq9cp 3 ай бұрын
could cheaters forge world state IDs to do stuff in the past for example?
@Alekzander_11
@Alekzander_11 3 ай бұрын
bro is like the better version of dani
@RiftDivision
@RiftDivision 3 ай бұрын
Much appreciated! :)
@RustyBear
@RustyBear 3 ай бұрын
Dani will always be 1% better 😉
@Nightsu_
@Nightsu_ 3 ай бұрын
This comment is for the algorithm
The Formula for Replayable Games
18:44
Blargis
Рет қаралды 204 М.
Dead Source Engine Games
17:08
Goldec
Рет қаралды 457 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 55 МЛН
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 35 МЛН
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 298 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,4 МЛН
BODYRAIN - Indie FPS game devlog #1
9:06
Amaro
Рет қаралды 2,6 М.
I Made a Multiplayer FPS Game in 10 Days
6:12
Kyle Rhoads
Рет қаралды 1,1 МЛН
How I designed Fruit Ninja
22:58
Luke Muscat
Рет қаралды 6 МЛН
The Art of Game Optimization
10:18
Worlds In Motion
Рет қаралды 253 М.
Adding INSANE weapons to my Multiplayer FPS | Devlog 5
8:06
AlexRak2
Рет қаралды 19 М.
Simulating the Real-Life Night Sky for my Survival Game...
8:02
Rift Division
Рет қаралды 1,4 М.
Most FPS games avoid doing this... and for good reason
2:51
Rift Division
Рет қаралды 73 М.
Ата мені Құпия қорабқа алдап кетті!
24:02
Lp. Последняя Реальность #91 БОСС МАФИИ [Элитный Отряд] • Майнкрафт
37:25