What goes into making a multiplayer FPS game?

Ойындар

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
    @sietse12493 ай бұрын

    Damn dude, This is really good. I hope the algorithm is finding you :)

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Thanks! Stay tuned for more content like this :)

  • @Tvngsten

    @Tvngsten

    3 ай бұрын

    Looks like it just found him!

  • @hyperryft
    @hyperryft3 ай бұрын

    Damn this explained it so clearly and concisely. Good job!

  • @fizzyo7
    @fizzyo73 ай бұрын

    Holy shit man, this is some quality content!! Rooting for the algorithm to favor you man

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Let's hope KZread is kind to me, thanks for the support!

  • @Heu..

    @Heu..

    3 ай бұрын

    It did favour him. it just came into my Page

  • @idohl7114
    @idohl71143 ай бұрын

    the devs of the long drive need this video

  • @Gonebyebye888
    @Gonebyebye8883 ай бұрын

    you explained it very well there are 3 hard things in programming video games multiplayer advanced ai and optimizations

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    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!

  • @MrGermandeutsch
    @MrGermandeutsch3 ай бұрын

    This is surprisingly entertaining to watch, my ADHD approves of this!

  • @RugbugRedfern
    @RugbugRedfern3 ай бұрын

    Awesome description of server-client architecture!

  • @Sgtlog123
    @Sgtlog1232 ай бұрын

    Why isnt this getting to the algorithm yet? Your vid is good bro.

  • @theRPGmaster
    @theRPGmaster3 ай бұрын

    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.

  • @monfrezo
    @monfrezo3 ай бұрын

    It is not possible to encrypt the client data, so cheaters wont be able to access it, im a complete noob btw

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    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

    3 ай бұрын

    @@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

    3 ай бұрын

    @alvesvaren 100%, encryption is still a very important part to ensure there's no middle man attacks on the network.

  • @Comrade_Tux
    @Comrade_Tux2 ай бұрын

    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.

  • @mek101whatif7
    @mek101whatif73 ай бұрын

    I am sure this is going to be 1000% relevant to a co-op city building game...

  • @valk4721
    @valk47213 ай бұрын

    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.

  • @torjohand.aleksandersen1297
    @torjohand.aleksandersen12973 ай бұрын

    insane video, explained everything really well! Thank you

  • @esmith2k2
    @esmith2k22 ай бұрын

    This is actually a really good video!

  • @abe1
    @abe13 ай бұрын

    Great video, subbed

  • @cate01a
    @cate01a3 ай бұрын

    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
    @theDemolisher133 ай бұрын

    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

  • @AntiqueGear
    @AntiqueGear3 ай бұрын

    this is an insanely poggers high level view of multiplayer. thank you.

  • @JonathanGoodHelper
    @JonathanGoodHelper2 ай бұрын

    nice and informative. subscribed

  • @Good_Username
    @Good_Username3 ай бұрын

    Very nice video!

  • @StormcellX
    @StormcellX3 ай бұрын

    Dude this is absolutely brilliant

  • @Mraprilcoffee
    @Mraprilcoffee3 ай бұрын

    great video! thanks for you and the algorithm

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Thank you, I'm glad you enjoyed it! :)

  • @prodkanser
    @prodkanser3 ай бұрын

    Can’t wait for this to drop

  • @GlorifiedPig
    @GlorifiedPig3 ай бұрын

    I love the vibe of this project

  • @abdullaheta
    @abdullaheta3 ай бұрын

    I hit a gem, i found this channel!

  • @LachlanHitchcock
    @LachlanHitchcock3 ай бұрын

    Yo thanks a lot for the vid, keep em up! Hope the algorithm finds you!

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    No worries, I'm glad you enjoyed it! :)

  • @markverb1
    @markverb13 ай бұрын

    very helpful!

  • @kianfitzpatrick6507
    @kianfitzpatrick65073 ай бұрын

    Smashing it lad keep it up

  • @StaerkungFuerMeineBrueder
    @StaerkungFuerMeineBrueder3 ай бұрын

    Thanks for telling us about the development of a multiplayer first person shooter game. It's interesting to think about these things :-)

  • @scemochilegge8581
    @scemochilegge85813 ай бұрын

    Great video! Good job with the game

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Thank you!

  • @EJ1..1
    @EJ1..13 ай бұрын

    Keep going brother dont give up - your 33rd subscriber

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    I'll never give up, I appreciate the support!

  • @gubodaniel9523
    @gubodaniel95233 ай бұрын

    Now I know why do I die behind cover in CS2. Thanks. :D

  • @niklasw.1297
    @niklasw.12972 ай бұрын

    the server know where he is at all times. It knows this by knowing where he isn't...

  • @lordzockt1853
    @lordzockt18533 ай бұрын

    this is an amazing video!

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Thanks, I appreciate it!

  • @boogiehasfun
    @boogiehasfun3 ай бұрын

    pretty good video to watch at 7:00 in the morning

  • @aidensgamestuff4620
    @aidensgamestuff46203 ай бұрын

    This is a high quality vid dawg, lmk when you hit 100k subs -your 31st subscriber

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Thank you, I appreciate the support!

  • @Keksent
    @Keksent3 ай бұрын

    now thats a dev log

  • @ContenterDEV
    @ContenterDEV3 ай бұрын

    cool!

  • @armada2483
    @armada24833 ай бұрын

    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!

  • @RyTiex
    @RyTiex3 ай бұрын

    Cool video.

  • @xardinlume7345
    @xardinlume73453 ай бұрын

    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!

  • @feyakut
    @feyakut3 ай бұрын

    Goated video. Do you plan on making an asset out of your networking package

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    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.

  • @aidanmelendez7201
    @aidanmelendez72012 ай бұрын

    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?

  • @Coolkidstan
    @Coolkidstan3 ай бұрын

    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.

  • @CaptainFX1
    @CaptainFX13 ай бұрын

    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!

  • @user-fr8mz9cw8m
    @user-fr8mz9cw8m3 ай бұрын

    You are on my front page 😁

  • @TetyLike3
    @TetyLike33 ай бұрын

    for the algorithm 🗣️🗣️

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    🗣️🗣️

  • @jabtastic
    @jabtastic3 ай бұрын

    underrated lol

  • @switch-axe
    @switch-axe3 ай бұрын

    Dude when are you releasing this awesome game and this is the best coding channel since Dany.

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    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! :)

  • @salatalyanca3312
    @salatalyanca33122 ай бұрын

    00:02 France

  • @Nightshardyeet
    @Nightshardyeet3 ай бұрын

    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)

  • @razrazi-ci5lc
    @razrazi-ci5lc3 ай бұрын

    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

  • @Tyle_W
    @Tyle_WАй бұрын

    are your dummy characters (in unity) from Call of Duty Advanced Warfare? They look kind of like Gideon with an exo-suit on.

  • @INeatFreak
    @INeatFreak2 ай бұрын

    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!

  • @damian6202
    @damian62023 ай бұрын

    Huh, then, how does cs2 to work with this infinite tick system they have?

  • @Just_memes1
    @Just_memes12 ай бұрын

    Are you creating a game alone?

  • @no_name6584
    @no_name65843 ай бұрын

    Damn great video and great explanation! Hopefully the algorithim does it s thing.

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Thank you!

  • @trophy9782
    @trophy97823 ай бұрын

    >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

    2 ай бұрын

    Anon discovers lag switches

  • @Reinhard_Erlik
    @Reinhard_Erlik3 ай бұрын

    Do you have a discord server?

  • @RiftDivision

    @RiftDivision

    3 ай бұрын

    Not currently, but I might create one sometime in the future!

  • @BingBong-zq9cp
    @BingBong-zq9cp3 ай бұрын

    could cheaters forge world state IDs to do stuff in the past for example?

  • @Alekzander_11
    @Alekzander_113 ай бұрын

    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

Келесі