Let's build a 4-Player Networked Game LIVE - Online Shooter (with Mirror & Unity)

  Рет қаралды 117,792

Jason Weimann

Jason Weimann

3 жыл бұрын

We'll build a 3d multiplayer game live, starting from the game built during the last stream..
Copy (or view) the Existing Code: game.courses/3d-shooter/
Cyber Monday Bundle: game.courses/checkouts/cyber-...
Check out the Course: game.courses/programmer
I just converted my beginner video into a little micro course, if you're interested in 2d or general game code, check it out here (free):
game.courses/birds/

Пікірлер: 102
@RS3helper
@RS3helper 3 жыл бұрын
Just so people know, Client Authority is what allows hackers to teleport around in your game. You most definitely don't want this setting for any type of competitive game. Alternatively you would want to send the server the clients input & have the server determine the users position. You never want to trust client data. This tutorial is really great for just starting out!
@BlizzardZGaming
@BlizzardZGaming 2 жыл бұрын
Correct but you would need to implement lag compensation otherwise the input will feel laggy
@RS3helper
@RS3helper 2 жыл бұрын
@@BlizzardZGaming Yeah if anyone is looking for guides on how to take care of that search, "client server reconciliation". Basically the client calculates where it should move before the server tells the client where it has moved. Eventually the server sends the client the correct positioning and the client uses that to "reset" the positioning.
@BlizzardZGaming
@BlizzardZGaming 2 жыл бұрын
@@RS3helper I just implemented that into my game, was definitely a massive head ache to add it correctly haha
@MosleyC92
@MosleyC92 2 жыл бұрын
so what do you suggest to counter act it?
@RS3helper
@RS3helper 2 жыл бұрын
@@MosleyC92 tldr; not "Client Authority". Look into "client server reconciliation" and never trust client data. read @Blizzardz comment above.
@ThoughtShare
@ThoughtShare 3 жыл бұрын
your live streams are life savour and quick learning place. Love!!
@blue_lobster_
@blue_lobster_ 3 жыл бұрын
Thanks man, it means a lot for the community!
@aldigangster123
@aldigangster123 3 жыл бұрын
Master Jason, nice stream! Really enjoyed it. Would love to see some dedicated videos on Mirror. And maybe even Steamworks? E.g. how to enable connecting via Steam Friends. How to set up and connect your build to Steamworks, for testing. Achievements, Lobby, Chat. In general, how to use Mirror so it communicates and works correctly with Steamworks.
@pakarpintu4917
@pakarpintu4917 2 жыл бұрын
Youre tutorial is so good Jason, Well Done
@pauld1241
@pauld1241 2 жыл бұрын
Awesome, great tutorial! You helped me a lot
@user-zp6ff2gr4n
@user-zp6ff2gr4n 2 жыл бұрын
You have some of the best tutorials on KZfaq, and I'm sure you know that. However, starting with a developed project was daunting to follow. Basic implementation of Mirror + Unity would be very helpful. Thank you, either way.
@mattice9083
@mattice9083 3 жыл бұрын
Hope you wrote down the reminder to consider that 2d smash bros networking vid ;) glad you do all this for us. Youre really helpful
@davidson2727what
@davidson2727what 3 жыл бұрын
I know this is like 5 months late but this is the coolest thing I've seen in my life! I think I'm going to make multiplayer tic-tac-toe to get going with networked games
@diliupg
@diliupg 2 жыл бұрын
This is so cool that it's hot!
@yudanaim6849
@yudanaim6849 3 жыл бұрын
Love what's you doing. Good job.
@yesquen9856
@yesquen9856 2 жыл бұрын
Thanks for the tutorial, it helped me a lot
@seppukun208
@seppukun208 2 жыл бұрын
Thanks for the video. Just giving you feedback that this was very hard to follow for a noob to multiplayer like me and in this format where you’re also kinda learning mirror as well.
@Ivcifer
@Ivcifer 3 жыл бұрын
thanks jason, we love you man!
@nikilkumar1000
@nikilkumar1000 3 жыл бұрын
Everyone trying multiplayer. Download and install "parallel sync", and create a clone. No need to build and run after every change.
@CalicoArchives
@CalicoArchives 3 жыл бұрын
link?
@4g3v
@4g3v 3 жыл бұрын
@@CalicoArchives github.com/VeriorPies/ParrelSync
@Briglair
@Briglair 3 жыл бұрын
that asset has been a true life saver for me
@shivanshsaini1
@shivanshsaini1 3 жыл бұрын
Holy fuck. I finished my card game prototype today and I wish I knew this before. Fuck. It could have made my work 1.5 times faster
@cradle_of_chaos
@cradle_of_chaos 3 жыл бұрын
That 3-part series was very cool. I'm hoping to see some more of those! Maybe something on implementing upgrades properly for units in an RTS or towers in a TD game would be nice
@ankitmehrotra6104
@ankitmehrotra6104 3 жыл бұрын
kzfaq.info/get/bejne/iKmFdphe0cjGYps.html
@ankitmehrotra6104
@ankitmehrotra6104 3 жыл бұрын
kzfaq.info/get/bejne/b6h6n9Fpyd_YfYE.html
@ankitmehrotra6104
@ankitmehrotra6104 3 жыл бұрын
These one bro na ?
@jasongilley70
@jasongilley70 3 жыл бұрын
Unless I am misunderstanding the framework, the drop bomb routine, and others like it that are [Command]'s have to pass in the player and have a time check per player, otherwise the time delay is for all players because the _nextDropTime is the servers version of that variable. If player 1 drops a bomb, player 2 cannot drop one until the time delay is up because the both use the same variable. The reason for this is that the [Command] attribute causes the server's version of that routine to be executed when called, not the client version.
@TheUncutAngel
@TheUncutAngel 2 жыл бұрын
48:30 what probably happened is they were prefab variants of the object you added the net identity and transform to. When you add the components to the original prefab, it auto adds them to the prefab variants. Since you also had the variants selected, it added two to them, but only one to the original prefab.
@johnnyblomgren480
@johnnyblomgren480 2 жыл бұрын
To bring webGL support into the mix you use a multiplexer for the network manager and connect kcp and socket transport to the multiplexer
@andythedishwasher1117
@andythedishwasher1117 2 жыл бұрын
This was very instructive, but I'm having all kinds of headaches implementing player-controlled cameras across the network. I wonder if you might be able to do something on the topic of camera management.
@IMR_Seb
@IMR_Seb 3 жыл бұрын
Any chance of you doing one of these game builds for a simple top down 2D game? New to all this and really interested in how you’d get it done
@bradbernia2373
@bradbernia2373 3 жыл бұрын
Hey Jason, been watching your videos off and on for a while and I really love multiplayer games so this video series was awesome for me! I was inspired to build a multiplayer game for me and my friends as a simple top down 2D game and would really like to see a video going over how to use the network animator. I've tried to set up a separate sword game object that the player picks up and it animates a swing, but I've struggled getting it to sync over the network and haven't found any good references on how to make it work (there seems to be an issue with what authority level my objects have). Just a thought, keep up the great work!
@Skyjengi
@Skyjengi 2 жыл бұрын
Have you figured it out yet?
@fongaming101
@fongaming101 5 ай бұрын
Jason is the man and also helped build Unity documentation/ Quizzes, am I right Jay?
@Unity3dCollege
@Unity3dCollege 5 ай бұрын
I did work on a few of the programmer certifications. Don't think anything I did went into docs, but there may be a video here or there that got posted to them.
@uilregit
@uilregit 3 жыл бұрын
Having trouble connecting on android devices over wifi, are there extra steps for that? Thanks for the tutorial!
@CalicoArchives
@CalicoArchives 3 жыл бұрын
Would be awesome to see a lobby and matchmaking tutorial too
@sharpcode3595
@sharpcode3595 3 жыл бұрын
1:11:00 Lie combo :) Amazing anyway. Thanks!
@KDSBestGameDev
@KDSBestGameDev 11 ай бұрын
You modified the base prefab and the variant prefab and added it to both. So it got added to the base prefab and inherited down to the variant prefab and also added it there too. This is why there are two times in the variant ones. I'm at 48:28 if you might find out yourself down the line.
@infinitplay6233
@infinitplay6233 3 жыл бұрын
Pls, someone to help me! I made a simple game and work perfect multiplayer on my computer but when I try to play online (not in local network) is not working and I don't have the button for matchmaking. Do U know what I do wrong? Thank you.
@peny1981
@peny1981 2 жыл бұрын
Hi, how to send / sync texture or png from server to client using mirror ? Texture/png is only present on server side and need to be send to clients.
@wonderingpixel
@wonderingpixel 3 жыл бұрын
Love you love youuuu thx(not in an odd way)
@snakeplisken4278
@snakeplisken4278 3 жыл бұрын
Did you fix the SCORE system please?
@jmichealdesigncom4731
@jmichealdesigncom4731 2 жыл бұрын
are you able to use a sever like northwestern with mirror?
@jayantbarthwal4470
@jayantbarthwal4470 3 жыл бұрын
Hi what if in a 4 vs 4 shooting game (unity+mirror), someone kills the host in start then he have to leave the game as he is dead , then game will stop for everybody as there is no host migration in mirror , what is the solutions , can you help me, I am new
@lora6938
@lora6938 Жыл бұрын
HELLO! As I understand it, the mirror is only for a local connection? Have you tried connecting to other computers?
@snakeplisken4278
@snakeplisken4278 3 жыл бұрын
I heard Unity is going to use MLAPI to replace UNET. Thoughts?
@mananbohra6003
@mananbohra6003 3 жыл бұрын
Does this work for android?
@newbiegeek8407
@newbiegeek8407 3 жыл бұрын
Sir can you please make a complete tutorial on how to make a 2d top down shooter
@RoffeDH
@RoffeDH 3 жыл бұрын
A wild Vaush appears at 31:52
@jarekshark1356
@jarekshark1356 2 жыл бұрын
awesome
@cubeflinger
@cubeflinger 3 жыл бұрын
hey jason. i'm just getting started with unity and am having real trouble understanding the new input system. Holding down buttons seems like a pain. Do you use this system?
@Unity3dCollege
@Unity3dCollege 3 жыл бұрын
Nope. I still have a hard time with it. Waiting until its easy for normal ppl to get started with it personally
@cubeflinger
@cubeflinger 3 жыл бұрын
Wish I knew that before. So much wasted time. Thanks for the response. Love the channel.
@RickyWiild
@RickyWiild 3 жыл бұрын
are you using PUN2 for this? because i've been looking at using C# sockets. I ask this only 6 mins in. EDIT: scrap that, you said already, Mirror
@roydorombozi7065
@roydorombozi7065 2 жыл бұрын
In a larger game, with say more levels more weapons more monsters/bosses would you need to add potentially hundreds of prefabs to the network manager or would you create more generalized 'enemy' type prefabs that know how to build themselves up in a more datadriven way?
@mpascari
@mpascari 2 жыл бұрын
I was asking myself the same thing. I can't imagine adding hundreds of networking prefabs there.
@FoxApo
@FoxApo 2 жыл бұрын
Have you found any useful information about this topic? I'm also asking myself, how to achieve some modular spawning system to spawn multiple definitions of Items from i.e. DB. There is an issue with multiple meshes that they have no NetworkIdentity, I would need to set Prefab after spawning to have some dynamic approach.
@hosseinse4079
@hosseinse4079 2 жыл бұрын
i watch and download all of them .. lol
@ShivamKumar-ly4pg
@ShivamKumar-ly4pg 3 жыл бұрын
Sir How can I develop a team in my game, Each team has 4 players in it?
@iamfunny2155
@iamfunny2155 3 жыл бұрын
Pls how can i convert a single player game on unity into a multi player game 🙏
@seanpapanikolas6043
@seanpapanikolas6043 Жыл бұрын
Is final code available?
@bornthrupiecesiosandroidga1932
@bornthrupiecesiosandroidga1932 9 ай бұрын
I am having an issue making client shoot client when I shoot at clients it reflects the hit on player rather than client… and also when I pick a weapon it disappears on player screen but not on client screen… why… we need a tutorial on this please
@duramirez
@duramirez Жыл бұрын
You didn't do the Score System hehehe cool video tho ^^
@AG-pz5eo
@AG-pz5eo 3 жыл бұрын
Is Mirror a good solution if you want authoritative server hosted on something like PlayFab?
@XboxPlayerPL
@XboxPlayerPL 3 жыл бұрын
Yes.
@pranavraja8296
@pranavraja8296 3 жыл бұрын
Crud I missed the stream nooooooooooooooo
@mo-zh2mf
@mo-zh2mf 2 жыл бұрын
you did get above 1k likes XD
@CityOn360
@CityOn360 2 жыл бұрын
01:50:00 😁🤝
@snakeplisken4278
@snakeplisken4278 3 жыл бұрын
How about usernames and passwords to allow only 'known clients'? Also how can you profile to see the network traffic flowing/volume for optimization?
@serefk.6693
@serefk.6693 3 жыл бұрын
dude dont feel bad about.making mistakes, sure dozens of people learn with the mistakes you make and not complaining. Is it possible to do the same arrangements then connect with facebook friends or we need different arrangements for that ? maybe can record a video on a multiplayer game connecting with Facebook friends ? Thanks
@RussmanDesignHD
@RussmanDesignHD 3 жыл бұрын
Why no dark mode lol!
@user-xy1rg2xl2g
@user-xy1rg2xl2g Жыл бұрын
40:32
@bhautikranpara7664
@bhautikranpara7664 3 жыл бұрын
Sir i didn't understand which one is best mirror or photon?
@aldigangster123
@aldigangster123 3 жыл бұрын
Go with Mirror
@bhautikranpara7664
@bhautikranpara7664 3 жыл бұрын
@@aldigangster123 yes bro but i need reason why i should
@aldigangster123
@aldigangster123 3 жыл бұрын
@@bhautikranpara7664 its free
@bhautikranpara7664
@bhautikranpara7664 3 жыл бұрын
@@aldigangster123 😂😂 means i need proper reason like which server has good network without lag like this lol..
@aldigangster123
@aldigangster123 3 жыл бұрын
​@@bhautikranpara7664 are you not able to do your own research? If you send me 100$, I will look into it
@gamedevdemonold
@gamedevdemonold 3 жыл бұрын
Hi
@aaronthearle5613
@aaronthearle5613 3 жыл бұрын
ey
@bgxs2253
@bgxs2253 2 жыл бұрын
This is so disappointing, Mirror has no option to spawn objects only to specific clients.
@RawSiafu
@RawSiafu 3 жыл бұрын
Why are you using Visual Studio instead of Rider?
@Hakohn2511
@Hakohn2511 3 жыл бұрын
why are you using Rider instead of Visual Studio?
@augustodapino7759
@augustodapino7759 3 жыл бұрын
why are you using visual studio or rider instead of visual studio code
@RawSiafu
@RawSiafu 3 жыл бұрын
I prefer vs code but he usually uses rider and even had a video about it. So curious why no rider here instead.
@_CloudyBunny
@_CloudyBunny 3 жыл бұрын
@@RawSiafu He actually said the reason before.
@RawSiafu
@RawSiafu 3 жыл бұрын
@@_CloudyBunny Said what reason? Why he switched to Visual Studio from Rider? I remember a video about why he switched to Rider and how "great" it is for Unity. Rider is great but I also find it annoying without a lot of custom settings.
@a.b.g9755
@a.b.g9755 3 жыл бұрын
Please make free fire clone game.
@Krockodil12
@Krockodil12 Ай бұрын
too many words without means((
@atarada7886
@atarada7886 2 жыл бұрын
So he make game but without programing. Trash
@Cadaverine1990
@Cadaverine1990 Жыл бұрын
Isn't that the dream, add assets and everything just works?
Make Unity Dev Easy with these..
12:54
Jason Weimann
Рет қаралды 3,1 М.
Which Unity is Fastest? (Results Inside!)
4:40
Jason Weimann
Рет қаралды 3,5 М.
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 7 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 33 МЛН
Non-Compete Banned - What's it mean for GameDevs?
2:29
Jason Weimann
Рет қаралды 17 М.
Top Game Development Tools for Solo Devs | Must-Haves for Unity
10:02
Unity's New Camera System! (And Mario Galaxy Character Controller)
3:48
Dots On 3D Model Using Unity URP
2:13
Panorama Studio
Рет қаралды 13
Instant Code Changes in Unity with HotReload
4:31
Jason Weimann
Рет қаралды 5 М.
SearchGPT - OpenAI's attempt to copy Perplexity
8:03
David Ondrej
Рет қаралды 2,8 М.
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 7 МЛН