This Is Why You Get Bad Hit Registration - Unity Multiplayer Game Development
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
I like it. also thank you for replying to my comment last vid! made my day.
No problem!! Glad you like it!
Great explanation for collider rollback. I've always wondered how it was done.
Thanks! Glad you liked it :p
Nearly 20k subscribers
:D
Great job
🎉 Almost there!
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! :)
Yeah it really is! Glad I could help you understand a bit more about how its done :p
Ooh I like the new scoreboard a lot! All these improvements are great.
Thanks Rug!
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!
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
@@xzippyzachx Sensing a recurring theme, especially with your last video on CSP - You're great at it!
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.
Thanks! :p
Yay, I'm so glad there is another one!
Me too! :p
Great work Zach
Thanks!
Can’t wait for the game it’s gonna be so cool
Nice!
Yes . A now video!
I love your videos
Glad you like them!
It's really cool to see these new changes! It's cool that the lag compensation is here!
Thanks Jay!
@@xzippyzachx Always there!
you could maybe implement a friends list so when the game releases you can play with friends!
Yeah probably, or I will implement steam integration or something like that to invite your friends
If you have friends
Cries
Really interesting!
Glad you liked it!
Thank you bro!
:p
Lessgoooo. New recoil system looks a lot better too. I wonder how you get all this stuff done while also doing uni work.
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
Thanx to you and other coders I am interested in coding
Great!
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?
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
Congrats on getting the lag compensation working! Did you apply it to the knife as well or just the guns?
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.
@@xzippyzachx I'd probably use an OverlapSphere instead of a SphereCast
Recoil is much better. Gud job
Thanks!
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...
Cool!
Thanks!
i love your videos. May i suggest you to add some kind of additional items or abilities, like granades
Yes, there will me a lot more content added in the future. Grenades are on my list.
Nice
very epic.
Thanks!
Strong
💪
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
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.
@@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!
0:36 damn he cracked
I wish CZcams compression didn't make it so blurry but yeah I may have snuck a few of my Val plays in :p
Hey man, you should add odball mode from halo. Also, when is this gonna be out?
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.
@@xzippyzachx ok cool
Here is an idea: why not implement a weapon customization (If you have time)
Yeah both weapon and player customization is on my long list of features to implement :p
I think that the recoil going back to the start should be with sniper rifles only but you do you
I think you should add a feature where during capture the flag when you got the flag you can use it as a weapon
Like a melee weapon? Interesting idea :p
Amazing, is there anyway i can apply collider rollback with photon?
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.
@@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?
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........
Yeah, that's the way it works in every FPS game though. Its called the peakers advantage.
@@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
@@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
you should make a story mode for multi player, and solo
Maybe...
you should add waves to the ship map water
There are very small waves right now. I might make them bigger
@@xzippyzachx cool
I think you should add a map maker feature
Maybe eventually :p
Yay
Thank you
1:25 If we shoot a little bit further than it moves, can we kill the enemy then?
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.
@@xzippyzachx So we can think like csgo has wind :D
when this game fullly release
yeah
No clue, when its ready. And I don't know when that will be :p
Can you please add and improve that cops vs bad guys mode?
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.
Yes
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)
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
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
I asked for permission to use their video and its linked in the description :p
@@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
When can I play this I can’t wait !!
join the discord and give yourself the playtester role. Next time we playtest you will be pinged.
@@xzippyzachx ok i did ill wait
can you add explosives to break walls.
with that i mean: 5 years of making games in unity 8:40
Yeah I might add that to this game eventually
Are you gonna add story mode
Maybe, but for now I will be focusing on the multiplayer aspect
You should see with getting it on console it's really good
Maybe, but focusing on PC first
cracked valorant player
Yeeeeeeeeeeeeeeeee
What happens when you have an unstable connection??
An unstable connection would make the hit registration even worse.
@xzippyzachx yeah it's really difficult for me to play online fps, I got fiber but still sucks
If I play this game I fell like it would be to easy to shoot for the head, it looks so big tho
Yeah thats why I am not sure if head shots should do more damage or not.
I download your game ,but i don't know to how to join the server?
Servers are only running during playtests. If you are on my Discord server you will be notified when there is a playtest.
@@xzippyzachxi just joined your discord server
I don't know how to make your own server?Just like the old one
You cant host your own servers in my new multiplayer game yet.
bro i love ur game were can i download it
Become a playtester on my Discord server and you can play with us next playtest session
please upload vedio for player name in unet
First
Yep!!
Bro
Bro x2
Hi hbi
👋
second
👀
Make it mobile
I don't think performance would be good on mobile