This Is Why You Get Bad Hit Registration - Unity Multiplayer Game Development

Sdílet
Vložit
  • čas přidán 4. 06. 2024
  • Why Do You Get Bad Hit Registration? Hello guys, this is my 12th update video showing the progress on my current multiplayer game project. I am making a multiplayer first person action shooter game with multiple game-modes that can be played in a variety of team sizes. Hopefully that will be fun but, we'll have to see.
    In this update video I add lag compensation for shooting by implementing collider rollback. I make changes to the gun recoil. I polish the scoreboard and add two new score values. Lastly I implement a few other small adds and tweaks.
    ----------------------
    Time stamps:
    0:00 - Intro
    0:33 - Network Latency
    2:03 - Collider Rollback
    4:07 - Recoil Changes
    5:26 - Scoreboard Changes
    6:35 - Small Adds & Tweaks
    7:20 - Outro
    ----------------------
    My Multiplayer Development Updates Playlist: • Multiplayer Game Updates
    Tom’s Unity Multiplayer Networking Series: • Connecting Unity Clien...
    Discord: / discord
    My Website: zxgames.net
    CSGO Lag Compensation: • How It Works: Lag comp...
    ----------------------
    Music:
    Title: MemoRaydar
    Source: • Memo | cute, 8 bit, ch...
    Title: Night Rain
    Source: www.streambeats.com
    Title: Raydar
    Source: • Raydar - Elation
  • Zábava

Komentáře • 132

  • @elorus1366
    @elorus1366 Před 2 lety +2

    I like it. also thank you for replying to my comment last vid! made my day.

  • @Skeffles
    @Skeffles Před 2 lety +9

    Great explanation for collider rollback. I've always wondered how it was done.

  • @kryten719
    @kryten719 Před 2 lety +4

    Nearly 20k subscribers
    :D
    Great job

  •  Před 2 lety +8

    Yeah, having a lag compensation system is kinda important for PVP games. I was always terrified of trying to make one of those systems but thanks to your very clear explanation now I have a better idea how it's done. Good job! :)

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +2

      Yeah it really is! Glad I could help you understand a bit more about how its done :p

  • @RugbugRedfern
    @RugbugRedfern Před 2 lety +3

    Ooh I like the new scoreboard a lot! All these improvements are great.

  • @GamesBySaul
    @GamesBySaul Před 2 lety +3

    Great video Zach! - Again you explain a somewhat confusing concept really well - and the difference it's seemed to have made as well is amazing! :D
    Also love the new recoil system!

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Thanks Saul! I second guess if I actually explained it well. So its nice to hear that I did a good job. Glad you liked it! :p

    • @GamesBySaul
      @GamesBySaul Před 2 lety +1

      @@xzippyzachx Sensing a recurring theme, especially with your last video on CSP - You're great at it!

  • @minijimi
    @minijimi Před 2 lety +1

    Good Job man, I like the custom gameboard value you put in. Good for all game modes, nice. I bet the lag compensation was cool to implement, keep up the game development.

  • @JS-ew2ri
    @JS-ew2ri Před 2 lety +2

    Yay, I'm so glad there is another one!

  • @kombatcbse2819
    @kombatcbse2819 Před 2 lety +2

    Great work Zach

  • @coolk4275
    @coolk4275 Před 2 lety +2

    Can’t wait for the game it’s gonna be so cool

  • @Dubitarul
    @Dubitarul Před 2 lety +1

    Yes . A now video!
    I love your videos

  • @JayCode_dev
    @JayCode_dev Před 2 lety +2

    It's really cool to see these new changes! It's cool that the lag compensation is here!

  • @aimegrieten
    @aimegrieten Před 2 lety +6

    you could maybe implement a friends list so when the game releases you can play with friends!

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yeah probably, or I will implement steam integration or something like that to invite your friends

    • @gqmeboi_2135
      @gqmeboi_2135 Před rokem

      If you have friends
      Cries

  • @winterboltgames
    @winterboltgames Před 2 lety +1

    Really interesting!

  • @facusandoval4074
    @facusandoval4074 Před 2 lety +1

    Thank you bro!

  • @MideyDev
    @MideyDev Před 2 lety +1

    Lessgoooo. New recoil system looks a lot better too. I wonder how you get all this stuff done while also doing uni work.

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +2

      Glad you like it! Very slowly. I work on it a few times a week but sometimes take longer breaks when life is busy. :p

  • @chocco_fairy
    @chocco_fairy Před 2 lety +1

    Thanx to you and other coders I am interested in coding

  • @PuffoPufferfish
    @PuffoPufferfish Před rokem +1

    I watched this video (well done, hope the game went well) and the CSGO video by Devin but was still left a little confused on how exactly the rollback part functions; Are you archiving the player's collision every tick on the server and referring back to the archived collisions whenever a shot is fired at the player, or is it using some other system?

    • @xzippyzachx
      @xzippyzachx  Před rokem +1

      Thanks! Yes you understand it correctly. I keep around a 1 second buffer/archive of the players positions. This way I can rollback to account for latency. Here is an in depth playlist on the topic if you are even more interested in all the mechanics czcams.com/play/PLoRL6aS9crowO6h2SL7k9lUV5eeC6uqnx.html

  • @tomweiland
    @tomweiland Před 2 lety +5

    Congrats on getting the lag compensation working! Did you apply it to the knife as well or just the guns?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Its on the knife as well but the knife is still using a raycast which makes it hard to hit players. Need to try changing it to a sphere cast instead I think.

    • @RugbugRedfern
      @RugbugRedfern Před 2 lety +1

      @@xzippyzachx I'd probably use an OverlapSphere instead of a SphereCast

  • @prod.halfnhalf
    @prod.halfnhalf Před rokem +1

    Recoil is much better. Gud job

  • @panically
    @panically Před rokem +1

    Hey may I request these features:
    In a settings menu you can enable low computer mode(which decreases particles for grenades and snow and grass and clouds and others and lowers quality but enhances fps for worse computers)
    in the settings menu you can enable custom crosshair mode(which allows the client to change his crosshairs to a color or chrome or default)
    in the settings menu you can change chunk render(so the trees around you load with full texture but the far away things like trees and clouds don't load as great or don't load at all for better fps)
    sliding(allows the client to slide down hills and ramps by pressing a key for increased momentum PS add a camera shake or motion blur while sliding depending on your velocity)
    in the settings menu you can enable color highlights(so when your in range to pick up a weapon you can change the color of the outline)
    lastly I just want say its my birthday today and you using any of my suggestions would be nice to know. thanks in advance...

  • @moonknight7564
    @moonknight7564 Před 2 lety +1

    Cool!

  • @rockukaz4648
    @rockukaz4648 Před 2 lety +2

    i love your videos. May i suggest you to add some kind of additional items or abilities, like granades

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yes, there will me a lot more content added in the future. Grenades are on my list.

    • @rockukaz4648
      @rockukaz4648 Před 2 lety +1

      Nice

  • @reallocal
    @reallocal Před 2 lety +1

    very epic.

  • @byzantinebb2037
    @byzantinebb2037 Před 2 lety +1

    Strong

  • @juhaszdavid640
    @juhaszdavid640 Před 2 lety +1

    Hey
    How did you manage the camera recoil to return to the center? I used to do that with lerping back to Vector2.zero, but when you do that it weirdly moves downwards after when your done with shooting
    Game's looking great, cheers

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Its kind of hard to explain but I am using lerping and slerping to accomplish the returning. If you ask on my Discord server I can direct you to the resources I used.

    • @juhaszdavid640
      @juhaszdavid640 Před 2 lety +1

      @@xzippyzachx i have done the same, but doesnt it feel weird when you try to compensate your recoil?
      Thanks, I will definitely join your discord!

  • @plaidev
    @plaidev Před 2 lety +1

    0:36 damn he cracked

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      I wish CZcams compression didn't make it so blurry but yeah I may have snuck a few of my Val plays in :p

  • @Sebastian-Bianchi
    @Sebastian-Bianchi Před 2 lety +2

    Hey man, you should add odball mode from halo. Also, when is this gonna be out?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Yeah a gamemode like odball would be cool. I really don't know when it will be in a releasable state, still a long time until then I would imagine.

    • @Sebastian-Bianchi
      @Sebastian-Bianchi Před 2 lety

      @@xzippyzachx ok cool

  • @Bongabangoboga
    @Bongabangoboga Před 2 lety +2

    Here is an idea: why not implement a weapon customization (If you have time)

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yeah both weapon and player customization is on my long list of features to implement :p

  • @EXP256
    @EXP256 Před 2 lety +1

    I think that the recoil going back to the start should be with sniper rifles only but you do you

  • @mrIUBERSTRIKE
    @mrIUBERSTRIKE Před 2 lety +1

    I think you should add a feature where during capture the flag when you got the flag you can use it as a weapon

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Like a melee weapon? Interesting idea :p

  • @mr.soulless904
    @mr.soulless904 Před 2 lety +1

    Amazing, is there anyway i can apply collider rollback with photon?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      I am sure you can but it depends if you actually need it. If you are using Photons peer to peer networking then I don't think there is any delay in hit detection. I may be wrong though.

    • @mr.soulless904
      @mr.soulless904 Před 2 lety

      @@xzippyzachx oh there is and it’s really bad, it’s because i live in middle east and they don’t support middle east server, so i chose the nearest server which is Europe, however it’s still on 110 ms, so i was wondering how do i implement collider rollback?

  • @darkigg
    @darkigg Před 2 lety +2

    There's only one problem with that - the player who go hit by the shot, is not there, and he will absolutely complain about the fact that he got hit by a shot - that never hit him. Though there is no any way to fix it........

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yeah, that's the way it works in every FPS game though. Its called the peakers advantage.

    • @darkigg
      @darkigg Před 2 lety

      @@xzippyzachx now I finally understand why do I and basically every other gamer always complain about people hitting us when we're not there lol

    • @kingdomlamb7741
      @kingdomlamb7741 Před rokem

      @@xzippyzachx”camera-ing” in cod is basically the same except your running around a corner fast so the enemies computer doesn’t render it as fast as yours

  • @s4ng124
    @s4ng124 Před 2 lety +1

    you should make a story mode for multi player, and solo

  • @josephnowland8940
    @josephnowland8940 Před 2 lety +2

    you should add waves to the ship map water

  • @mrIUBERSTRIKE
    @mrIUBERSTRIKE Před 2 lety +1

    I think you should add a map maker feature

  • @fv4202x
    @fv4202x Před 2 lety +1

    1:25 If we shoot a little bit further than it moves, can we kill the enemy then?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yes if there is no lag compensation then you could lead your shots to try and "guess" where there actual position is on the server.

    • @fv4202x
      @fv4202x Před 2 lety

      @@xzippyzachx So we can think like csgo has wind :D

  • @StepLite
    @StepLite Před 2 lety +3

    when this game fullly release

    • @LAE-7
      @LAE-7 Před 2 lety

      yeah

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +2

      No clue, when its ready. And I don't know when that will be :p

  • @mrIUBERSTRIKE
    @mrIUBERSTRIKE Před 2 lety +1

    Can you please add and improve that cops vs bad guys mode?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Is that the gamemode where you could breach walls in my old multiplayer game? If so then yes its on my list of gamemodes to add to this game.

    • @mrIUBERSTRIKE
      @mrIUBERSTRIKE Před 2 lety +1

      Yes

  • @Chillco600
    @Chillco600 Před rokem +1

    isnt this also just because of bad netcode? some things cant be fixed no matter how good of netcode you have, but i feel like this isnt one of those, if you have a system in place to make it so that movement and the such is handled by directions (if a player starts moving in a new direction at a given speed, send both the direction vector and the speed float/integer to the server and make it appear like they are moving in that direction on the client) and have a direction and speed comparing system for it ( if the client fires a shot, have the client send the direction and speed the target is currently moving, if it matches up, consider the shot landed, if it doesnt, then dont) and a course correction system along with it (every time a new direction and speed is sent, have them send the current position too, if it for whatever reason does not match up, set their position to the position sent)

    • @xzippyzachx
      @xzippyzachx  Před rokem

      You have the right idea. I have both a client prediction system and collider rollback system implemented. I do explain the solution to this problem in the video so I am not sure why you had to repeat an explanation here. :p

  • @edgeworksgames
    @edgeworksgames Před 3 měsíci +1

    Great video but just want to say that you should probably put an on screen credit/text to show the person who's video you've used :D Specifically for the csgo video

    • @xzippyzachx
      @xzippyzachx  Před 3 měsíci +1

      I asked for permission to use their video and its linked in the description :p

    • @edgeworksgames
      @edgeworksgames Před 3 měsíci

      @@xzippyzachx Yaa of course but I think it would be good just to have the channel name in the corner maybe so people could know

  • @RealHalal
    @RealHalal Před 2 lety +1

    When can I play this I can’t wait !!

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      join the discord and give yourself the playtester role. Next time we playtest you will be pinged.

    • @RealHalal
      @RealHalal Před 2 lety +1

      @@xzippyzachx ok i did ill wait

  • @lop1506
    @lop1506 Před 2 lety +2

    can you add explosives to break walls.
    with that i mean: 5 years of making games in unity 8:40

    • @xzippyzachx
      @xzippyzachx  Před 2 lety +1

      Yeah I might add that to this game eventually

  • @mrIUBERSTRIKE
    @mrIUBERSTRIKE Před 2 lety +1

    Are you gonna add story mode

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Maybe, but for now I will be focusing on the multiplayer aspect

  • @molkayt7984
    @molkayt7984 Před 2 lety +1

    You should see with getting it on console it's really good

  • @jadelinliske371
    @jadelinliske371 Před 2 lety +1

    cracked valorant player

  • @andresv8856
    @andresv8856 Před rokem +1

    What happens when you have an unstable connection??

    • @xzippyzachx
      @xzippyzachx  Před rokem

      An unstable connection would make the hit registration even worse.

    • @andresv8856
      @andresv8856 Před rokem

      @xzippyzachx yeah it's really difficult for me to play online fps, I got fiber but still sucks

  • @jeffersonbellon4432
    @jeffersonbellon4432 Před 2 lety +1

    If I play this game I fell like it would be to easy to shoot for the head, it looks so big tho

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Yeah thats why I am not sure if head shots should do more damage or not.

  • @zoidskenji2597
    @zoidskenji2597 Před 2 lety +1

    I download your game ,but i don't know to how to join the server?

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Servers are only running during playtests. If you are on my Discord server you will be notified when there is a playtest.

    • @zoidskenji2597
      @zoidskenji2597 Před 2 lety

      @@xzippyzachxi just joined your discord server

  • @zoidskenji2597
    @zoidskenji2597 Před 2 lety +1

    I don't know how to make your own server?Just like the old one

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      You cant host your own servers in my new multiplayer game yet.

  • @WhiteFTO
    @WhiteFTO Před 2 lety +1

    bro i love ur game were can i download it

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      Become a playtester on my Discord server and you can play with us next playtest session

  • @yousset808
    @yousset808 Před 2 lety +1

    please upload vedio for player name in unet

  • @troublebub8475
    @troublebub8475 Před 2 lety +2

    First

  • @BruceTheShark7
    @BruceTheShark7 Před 2 lety +1

    Bro

  • @troublebub8475
    @troublebub8475 Před 2 lety +2

    Hi hbi

  • @jadelinliske371
    @jadelinliske371 Před 2 lety +1

    second

  • @wolf_ro3660
    @wolf_ro3660 Před 2 lety +1

    Make it mobile

    • @xzippyzachx
      @xzippyzachx  Před 2 lety

      I don't think performance would be good on mobile