Can I add MULTIPLAYER to my Open World Game in 4 HOURS?

  Рет қаралды 25,116

Code Monkey

Code Monkey

11 ай бұрын

🌍 Unity Dev Days Sale! assetstore.unity.com/?aid=110...
👍 Check out the Synty Sale! cmonkey.co/syntystore
🎮 Wishlist my Steam game! cmonkey.co/dinkyguardians
❤️ Watch my FREE Complete Course • Learn Unity Beginner/I...
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
🎮 Get my Steam Games unitycodemonkey.com/gamebundle
🔴 RELATED VIDEOS 🔴
Can I make an OPEN WORLD Game in ONE WEEK? • Can I make an OPEN WOR...
Learn Unity Multiplayer (FREE Complete Course, Netcode for Game Objects Unity Tutorial 2023) • Learn Unity Multiplaye...
I made a DRAG RACING minigame! (FREE DOWNLOAD) • I made a DRAG RACING m...
💬 I received a comment on my Open World game asking if I could add multiplayer to it in a few weeks.
I'm already pretty familiar with Netcode for Game Objects since that's the toolset that I'm using for my own Steam game Dinky Guardians.
Once again the question comes down to the quality of the tools used, let's see if I can do it!
🌍 Unity Dev Days Sale! assetstore.unity.com/?aid=110...
📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
✅ store.steampowered.com/app/12...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🎮 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
#unity3d #gamedev
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Other great Unity channels:
Unity - / unity3d
Brackeys - / brackeys
Dani - / @danidev
Jabrils - / @jabrils
BlackthornProd - / @blackthornprod
Sykoo - / sykootv
Jason Weimann - / @unity3dcollege
Jonas Tyroller - / @jonastyroller
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Steam: store.steampowered.com/develo...

Пікірлер: 206
@NachitenRemix
@NachitenRemix 11 ай бұрын
Dude it's actually unbelievable how much content and variety you can put out on your channel. It's all very high quality too. I hope you can also get some rest so to not suffer burnout ❤
@killereks
@killereks 11 ай бұрын
lmao u gifted £0.55
@jpmallick367
@jpmallick367 11 ай бұрын
​@@killerekswhat did u gift? Try to appreciate people who give rather than whine and criticise
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Thanks for the super thanks! heh don't worry, I do work a bit too much but not enough to burnout, I definitely plan to keep doing this for a very very long time!
@Blinkers2007GameDev
@Blinkers2007GameDev 11 ай бұрын
@@killereksHe did give him something which counts for something. You, on the other hand...
@NachitenRemix
@NachitenRemix 11 ай бұрын
@@Blinkers2007GameDev Yea, it's easy to criticize without doing their part xD
@mrtanaka475
@mrtanaka475 11 ай бұрын
And that's how CodeMonkey turns into Dani
@upsidegaming7134
@upsidegaming7134 11 ай бұрын
Yes. Yes you can.
@SimonHailemariam
@SimonHailemariam 11 ай бұрын
Again
@Banaaani
@Banaaani 11 ай бұрын
I remember learning to create multiplayer in school few years ago. It was quite difficult. Really glad to see that its this easy now! I will be adding multiplayer to my own game too, when it is closer to being done.
@ov3roger
@ov3roger 11 ай бұрын
Man you really are amazing, I hope you never loose this philosophy of sharing and teaching without almost any cost, this is really respectable
@chuckdude514
@chuckdude514 11 ай бұрын
That's just impressive, gamedev tools really have evolved a lot throughout the years, now haven't they? Sometimes I feel a bit guilty for skipping so many complex problems that took many years and teams to be solved, but at the same time, we *must* use these if they are available, as it saves literally years of development time lol
@Blinkers2007GameDev
@Blinkers2007GameDev 11 ай бұрын
Yeah why not. If they help me make games and in the future create a game dev company or atleast a big name for myself, why wouldn’t I use these? Games like super Mario galaxy would never be created in the 1940s because they didn’t have enough tools. But we do, so why not use them to create even better games? We make childhoods and, at the same time, we make money. Win win
@AlexGorskov
@AlexGorskov 11 ай бұрын
​@@Blinkers2007GameDevwell said, I agree
@Blinkers2007GameDev
@Blinkers2007GameDev 11 ай бұрын
@@AlexGorskov thanks!
@JohnDoe-bo5yk
@JohnDoe-bo5yk 11 ай бұрын
Depends on your goals, my main focus is programming, I wanna learn how to make it
@BoltRM
@BoltRM 11 ай бұрын
@@JohnDoe-bo5yk How old are you? I'm in my 60s so time is precious & limited. =:P
@alec_almartson
@alec_almartson 11 ай бұрын
This is a very nice summary on how to quickly add Multiplayer to our Videogames. 💯👍🏻 Thank you.
@calvinms7503
@calvinms7503 11 ай бұрын
this is a good summary from you previous 6 hours lecture :D I love it
@systematic_god6849
@systematic_god6849 11 ай бұрын
truly impressive what netcode for gameobjects is able to do, but just as impressive is the depth of knowledge you have behind it to be able to implement multiplayer in just 1 day. Great videos keep it up!
@Director414
@Director414 11 ай бұрын
Wow so awesome! As always, great video! If possible, make more videos on this topic! I would watch everything!! :) I thought multiplayer was basically impossible for an indie dev like me!
@rid6233
@rid6233 11 ай бұрын
NOW THIS IS INTERESTING
@learnsmtheveryday01
@learnsmtheveryday01 11 ай бұрын
Love the thumbnail, Dani style, thank you for content
@-OmShinde
@-OmShinde 11 ай бұрын
Really like these type of videos. Please make a car game tutorial.(Pick up/drop game,race,)😄🙏
@Huyuimu
@Huyuimu 11 ай бұрын
we need more of this!
@makra42069
@makra42069 11 ай бұрын
Like these new devlog style videos!!
@AndersBergh
@AndersBergh 11 ай бұрын
[Stands up and applauds] .... Very well done!
@PatrickEn
@PatrickEn 11 ай бұрын
After 6 Months of learning Unity my next project will be a multiplayer game. This video gives me hope :D
@Viski982
@Viski982 11 ай бұрын
We love you man love you so much ❤❤❤
@MarushiaDark316
@MarushiaDark316 11 ай бұрын
Anyone else curious what the FloatingPointFix script does?
@TrentSterling
@TrentSterling 11 ай бұрын
Yeah I feel like that was for the single player open world demo and this multiplayer demo didn't cover an actual big world with multiple players 😮
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
It's from the Gaia asset that I used to make the world, it helps avoid floating point issues on huge worlds
@MangoPulver
@MangoPulver 11 ай бұрын
Absolute legend 😤😤
@GlassVaultStudio
@GlassVaultStudio 11 ай бұрын
This is a good summary for a basic multiplayer foundation. I would not call this multiplayer until you can connect to friends via steam or googlePlay and play a multiplayer game. Still great content, thank you!
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Sure I could work on it for 30 minutes more and implement the Lobby and Relay that I've used previously, just with that it would be fully online unitycodemonkey.com/video.php?v=-KDlEBfCBiU unitycodemonkey.com/video.php?v=msPNJ2cxWfw If you want dedicated servers look into Game Server Hosting unitycodemonkey.com/video.php?v=IvCVFywNXMc
@GlassVaultStudio
@GlassVaultStudio 11 ай бұрын
@@CodeMonkeyUnity true!
@MrMattyMoses
@MrMattyMoses 11 ай бұрын
That was impressive!
@Btmodz
@Btmodz 11 ай бұрын
I really like your new style with green screen and microphone.
@SMORIGINALS
@SMORIGINALS 11 ай бұрын
Dinky Guardian has a bug,when you build something your player inside that object. You have to fix this you know who could be make house by sitting on Bricks.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Oh thanks for the bug report!
@RM-lh7on
@RM-lh7on 11 ай бұрын
Please make a video about Unity Urp optimization/improving performance. Thanks!
@Arab_GameDev
@Arab_GameDev 11 ай бұрын
at the same time which this video uploaded am implementing Multiplayer on my game using your netcode video as a reference a Big thanks for you
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Nice! Best of luck with that project! For my game Dinky Guardians I am indeed using Unity's Lobby and Relay
@Chobi01
@Chobi01 11 ай бұрын
Best channel in the world ❤❤
@SwatHound
@SwatHound 11 ай бұрын
Anyone have any opinions on Network for game objects vs Fishnet vs Mirror? Seeing what you did here makes me want to lean towards network for game objects, assuming Unity isn't going to drop this later... I'm a bit hesitant on diving into one of these networking tools and later realizing I "picked the wrong one".
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
I haven't tried those myself so cannot comment but I've heard great things about all of them so I don't think there's any wrong answer
@XAyaDubX
@XAyaDubX 11 ай бұрын
Hi Code Monkey, are you going to release an updated DOTS tutorial video? Like ECS or Job system. Thanks! :)
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yeah I definitely want to, just need to find the time, I'm hoping to cover it this month
@XAyaDubX
@XAyaDubX 11 ай бұрын
That would be so awesome. Thank you so much! Take your time. You produce amazing content. @@CodeMonkeyUnity
@reetuverma5501
@reetuverma5501 11 ай бұрын
Please tell that how can we make a functional search bar on which if we search then it will show the list of online multiplayers And if we click on any player it will show option "add friend" if we click on add friend it will be added to our friends list
@thanhtruongcong9175
@thanhtruongcong9175 11 ай бұрын
That was amazing video. But can I ask you how can I remove delay when using relay Unity pls ?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
You can't remove delay, it takes time for the bytes to physically go from your PC to the other player's What you can do is implement Client side prediction to make the lag as invisible as possible
@frogmasto
@frogmasto 11 ай бұрын
I always comment it but its true, another code monkey w :D also I love the newer style of talking over the video while on screen, looks good!
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Thanks for the kind words, I'm glad you like it!
@PeterSedesse
@PeterSedesse 11 ай бұрын
We are getting close to the mythical ' convert to mmorpg' button.
@ekzac
@ekzac 11 ай бұрын
Question about safety: with the owner authoritative mode (ClientNetworkTransform) I would be able to modify the assembly of the build and send the character to any position I want, that's right? In this case, what could we do? Would Steam, for example, assure the checksum of the files in a safe way? Should we put some code to check player positions, or change to server authoritative mode and control it there? It would be interesting to see which common problems multiplayer games face, but I don't thing it's an easy thing to do.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yes this has no cheat protection at all, the client can indeed be modified so that a player could move 10x faster. Using client auth is great for co-op games where you don't care about cheating. If cheating is a concern then the general rule is you should never trust the client
@justliketherecord3912
@justliketherecord3912 11 ай бұрын
Will you make a video on syncing projectiles? Looking at the Galaxy Kittens example, you can see that projectiles do not have perfectly synced positions and they don’t hit enemies at the same time and it all looks off. Is that the case with these projectiles or are they actually “perfectly” in sync? This along with client-side prediction is the main blocker for my multiplayer project
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yes exactly that's client side prediction, without it the projectiles will look out of sync since the client will always have some delay That is indeed a topic I'd like to research, basically you need to create a separate dummy visual on the player and spawn it right away then keep track of the state on the server and interpolate the dummy visual
@1MrHam
@1MrHam 11 ай бұрын
Wow That's awesome! One question, it works with a dedicated server or is local multiplayer? Keep the good work!
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
It can work with either, in this case for this simple demo I just made it local but I could have added Relay to make it online unitycodemonkey.com/video.php?v=msPNJ2cxWfw Or Game Server Hosting for dedicated servers unitycodemonkey.com/video.php?v=IvCVFywNXMc The NGO logic is all the same
@1MrHam
@1MrHam 11 ай бұрын
@@CodeMonkeyUnity Thank you so much for the responses!
@marveII0us
@marveII0us 11 ай бұрын
Interesting title
@canerkaska8355
@canerkaska8355 10 ай бұрын
Hey, great content as always! I'm currently working on a simple MMORPG, I haven't done anything about multiplayer and am considering using Fishnet. What would you suggest I do? And is joining players openly in the same server the same as just partying them up and having them join the game? Can every registered player join the game with the same setup? Thanks for your time in advance, Have a great day!
@CodeMonkeyUnity
@CodeMonkeyUnity 10 ай бұрын
I've only ever used Netcode for Game Objects so no idea how it compares with Fishnet although from what I heard it is indeed good. In NGO yes you can join in the beginning or in the middle of a game.
@MrOmega-cz9yo
@MrOmega-cz9yo 11 ай бұрын
I agree with other commenters, CM is awesome! 👍👍
@ZahoorAhmad-tc8ev
@ZahoorAhmad-tc8ev 11 ай бұрын
I have idea for a game jame where the main foucs is to write clean code and you can inspect the code and rate that 😊
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
I have thought about doing something like that but it would be really tricky to organize and manage, maybe one day!
@skillmastersgames
@skillmastersgames 11 ай бұрын
Nice video! Got a question, what is your microphone? I do devlogs with an English IA voice, thinking about start doing it with my real voice, but in spanish because I'm spanish 😅
@Blinkers2007GameDev
@Blinkers2007GameDev 11 ай бұрын
Then do spanish English voice. Can fit in to certain games. Or just adapt your voice
@skillmastersgames
@skillmastersgames 11 ай бұрын
@@Blinkers2007GameDev Not about games, just for the videos showing progress of games
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
I've got a Blue Yeti, it's the same one I've used since the very first video on this channel and still works great!
@skillmastersgames
@skillmastersgames 11 ай бұрын
@@CodeMonkeyUnity thank you! And thanks for your content too, inspired and helped me a lot in this travel
@lgent2435
@lgent2435 11 ай бұрын
Will you make tutorial about FishNet? I really need it
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Sorry but I'm only familiar with NGO
@DaElfer
@DaElfer 10 ай бұрын
Ive been using Pun for my multiplayer setup and when i get the time i need to delve into unitys multiplayer system. It took me a while but i figured out how to do an RPG game with multiple scenes in multiplayer so player 1 leaves the village scene and goes to the forest scene leaving player 2 in the village. Then player 2 can join him. Usually in multiplayer it is 1 big map and all the players are on it. I had to fudge it to get it to work but does unity have a solution to this?
@Injabsful
@Injabsful 11 ай бұрын
damn i need to start to learn multyplayer
@rapidstress2008
@rapidstress2008 11 ай бұрын
Hey, I have a weird want.... My want is that can I take this Idea & build upon it?? I will add more features of course (not as fast as you though XD) I really want to build upon this game with my team members.... And release it! I totally understand if you don't agree, You spend time on this game! Anyways, Love from India ❤❤
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Sure! Feel free to use all the tools I mentioned in the previous video to make something similar
@NeleN_Games
@NeleN_Games 11 ай бұрын
an intersting question in my mind is for a server what specfic needed? I tried make my first multiplayer game with your tutorial about netcode. I had delay for client in my friend`s pc while we were concted with lan. the game was very simple 2 capsul moving around and shoot each other but for client, position of host was different ( about 2 point difference) .why could have delay with netcode while we were lan? ( client transform network used)
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
The NetworkTransform component has interpolation by default, so even on 0 ping it will look like it has a delay If you do a RPC or sync a NetworkVariable you will notice how the delay matches the ping perfectly. You can either use a dedicated server or something like Relay unitycodemonkey.com/video.php?v=msPNJ2cxWfw unitycodemonkey.com/video.php?v=IvCVFywNXMc
@MiDnYTe25
@MiDnYTe25 11 ай бұрын
I love how the characters have 3 feet wide shoulders lol
@Damian_h
@Damian_h 11 ай бұрын
Sup Code im copy pasting this comment from other video(asking for ideas). Me and some friends are working on a game that character is related to fire control. One question how would u tackle a grappling hook that looks like a Fire Hand going to the desired position and grabs the area to get hooked. At first i thought i can animate an arm with a morpher that stretches with a fire shader on the mesh but i realize this way the distance of the hook would always be fixed to the morpher/deformation distance. Another option is using LineRenderer with some kind of woodoo with a renderTrail but the thing is how i can get the initial position of the line renderer to add the hand(mesh) doing the animation. And another is using path creator that trace from point A to B a particle but im not sure whats the correct approach. Any idea?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yeah it sounds like the LineRenderer is the best approach, move the fire hand to the target position and use the LineRenderer to visually connect it to the shoulder You can access the LineRenderer through code to set the points, I did that in the minimap path video unitycodemonkey.com/video.php?v=Foztn0kDM7I
@Damian_h
@Damian_h 11 ай бұрын
@@CodeMonkeyUnity god bless you man im gonna go check it out.
@jpmallick367
@jpmallick367 11 ай бұрын
Can u make a 3d(maybe not open world) game with only free assets
@iiropeltonen
@iiropeltonen 11 ай бұрын
Idea: 500 thousand sub special: Finally a tutorial on pen spinning 😊
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
heh that would be fun!
@DMIyce
@DMIyce 11 ай бұрын
For multiplayer games im now mostly interested in how to sync to different servers i.e. chat servers account servers game servers etc. Do you have anything on this topic?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Hmm that's a tricky topic, I guess the best way is to use some cloud solution like Azure unitycodemonkey.com/video.php?v=qdE01Xg3y2A unitycodemonkey.com/video.php?v=EEQfSmK1nXA That way you can store the persistent data for the entire world and not just per server
@JrBrown-zo4fx
@JrBrown-zo4fx 2 ай бұрын
I want to add multiplayer to Universal truck simulation can you help me out on that
@0darkwings0
@0darkwings0 11 ай бұрын
Hi, I am doing a mini version of Hearthstone as a university project, and I need to build the backend for the multiplayer with .Net Core, do you have any course on how to make a multiplayer with .Net Core? or any suggestions for good tutorials for that?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Hmm I experimented with some C# backend when I researched Azure, but didn't go too deep unitycodemonkey.com/video.php?v=qdE01Xg3y2A unitycodemonkey.com/video.php?v=bVqSLLvao78
@0darkwings0
@0darkwings0 11 ай бұрын
@@CodeMonkeyUnity Thank you for the links, but unfortunately it not helping :(
@rickyfreddy6963
@rickyfreddy6963 11 ай бұрын
Can you make a tutorial on making a multiplayer turn based game? I can only find good ones for realtime games like this and don't know where to start. 😅
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
That is indeed something I'd like to cover, it should be pretty simple, turn based games would mostly be just RPCs
@rickyfreddy6963
@rickyfreddy6963 11 ай бұрын
@@CodeMonkeyUnity for me pretty simple is OK, a better starting point to learn multiplayer then immiately going Far Cry 6 on it haha
@zrizzy6958
@zrizzy6958 11 ай бұрын
greate video, but the green screen has some stuff to improve
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yeah I think it's the camera which is just a basic webcam, need to upgrade to something better
@-Bill-Clinton-
@-Bill-Clinton- 10 ай бұрын
Hi I've got a question. Is it possible to instantiate an object on the client and then spawn that object on the server that way there is no delay for the client when shooting a projectile?
@CodeMonkeyUnity
@CodeMonkeyUnity 10 ай бұрын
Yup that's exactly what you'd do to make it lag free, that's called Client Side Prediction, you spawn a local dummy object instantly so it's visible but you still trust the server to tell you if it hit something
@-Bill-Clinton-
@-Bill-Clinton- 10 ай бұрын
I do actually have one more question though. Do you know if it's possible to have a network transform that can be affected by multiple clients at the same time because currently I only have a server network transform and an owner network transform and they can only be affected by the server/owner even with colliders and rigidbodies.
@CodeMonkeyUnity
@CodeMonkeyUnity 10 ай бұрын
Do you mean like a Ball in a Football game? Yes the host will own the ball and clients need to tell the host to move the ball, you cannot have everyone have ownership over the ball with a NetworkTransform But you could make a NetworkVariable that anyone can write to and use that
@-Bill-Clinton-
@-Bill-Clinton- 10 ай бұрын
Ok, thanks for the help!
@Stefan-fg4tt
@Stefan-fg4tt 11 ай бұрын
Can you host with netcode over steam? So that you don't need a server and there are no costs?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yes you can replace the Unity Transport for the Steam Transport
@Stefan-fg4tt
@Stefan-fg4tt 11 ай бұрын
@@CodeMonkeyUnity great.. Thx
@MaxDolotboy
@MaxDolotboy 11 ай бұрын
I am currently working on an asset to put on the Unity Store. The thing is I would like it to work with multiplayer and without multiplayer. I made it works perfectly with multiplayer (Thanks to you haha). But now it doesn't work without the integration of Unity Netcode and if someone wants to create a solo game, it absolutly require him to "host" a server even tho nobody can join. How would you do it ? I am lost. I was thinking of creating a new namespace for multiplayer function and call them only if the gameObject has a component of Network Transform, but i'm not really sure how I could pull it off. Should I simply manage it as a second asset, or you think it would be possible to achieve what I want to achieve ?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Hmm for the users it might be better to make it as two separate assets, or include two separate packages, just like many assets include packages for URP and HDRP Or leave it like that and just tell the user to StartHost(); it does not require a multiplayer connection to work, the game that I'm working on shares the same code in SP and MP, it just doesn't open any public ports
@MaxDolotboy
@MaxDolotboy 11 ай бұрын
@@CodeMonkeyUnity I understand, doesnt it requiere to StartHost, Have à NetworkManager to spawn the Player and etc ?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yes but that can all work locally, it does not require an internet connection, you can watch my multiplayer course on the Lecture 24 Singleplayer to see how I implemented it unitycodemonkey.com/kitchenchaosmultiplayercourse.php
@MaxDolotboy
@MaxDolotboy 11 ай бұрын
@@CodeMonkeyUnity Ok, big thanks for the help !
@GameDevGarage
@GameDevGarage 11 ай бұрын
Can we create game on one of the clients? Without a dedicated server?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yes, you can make one player be the Host and the others Clients
@GameDevGarage
@GameDevGarage 11 ай бұрын
@@CodeMonkeyUnity That's really cool 👍 I'll try it asap 🥳
@georgedowell7747
@georgedowell7747 11 ай бұрын
I want to be like Code Monkey, when I grow up, except I m already a grown up 😂😂😂😂😂😂
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
heh it's never too late to start learning!
@user-qk1zq9gf3t
@user-qk1zq9gf3t 11 ай бұрын
Me: I tried to add multiplayer 2 times already and it didn't work out. Code Monkey: how easy it is to add multiplayer now
@suicune2001
@suicune2001 11 ай бұрын
Oh wow! With these tools, do you have to worry about hackers/cheaters?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yeah, this simple implementation is client authoritative. Works great for co-op games, but if you're making a competitive game you should never trust the client
@Etercy
@Etercy 11 ай бұрын
u can !
@Anvelir
@Anvelir 11 ай бұрын
Why do you use A*, not built-in NavMesh in your project?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
I don't believe NavMesh supports creating multiple NavMeshes, so with that one I'd need one huge NavMesh for the entire world, whereas with A* I can make a map for the area around each castle
@Anvelir
@Anvelir 11 ай бұрын
@@CodeMonkeyUnity thank you for the answer!
@iiropeltonen
@iiropeltonen 11 ай бұрын
Actual question: If projectiles are spawned only on the server, does every client have input lag from firing to actually seeing the projectiles?
@DMIyce
@DMIyce 11 ай бұрын
Smoke and mirrors. You spawn dummies on the clients.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yup correct just like this there is indeed input lag, that's where client side prediction comes in
@iiropeltonen
@iiropeltonen 11 ай бұрын
@@CodeMonkeyUnity Did I hear: "Multiplayer Smoke and Mirrors - Tutorial"?
@EnderElohim
@EnderElohim 11 ай бұрын
so is this unity's solution vs mirror?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Yes NGO is a networking toolset just like Mirror, Fishnet, Photon, etc
@mikhailhumphries
@mikhailhumphries 11 ай бұрын
Do you need to pay monthly for a server?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Depends on what server solution you use. You can host your own server, or connect the players directly, or use Relay which has a generous free tier unitycodemonkey.com/video.php?v=msPNJ2cxWfw
@silentwarrior600
@silentwarrior600 7 ай бұрын
Code monkey I want to buy classes, teach me please 😂
@andersmalmgren6528
@andersmalmgren6528 11 күн бұрын
So, how about single precision floats? If you take the players out a way from origin. How do you solve that?
@CodeMonkeyUnity
@CodeMonkeyUnity 9 күн бұрын
Gaia has a component to solve exactly that, it teleports objects
@andersmalmgren6528
@andersmalmgren6528 9 күн бұрын
@@CodeMonkeyUnity only on the clients
@andersmalmgren6528
@andersmalmgren6528 9 күн бұрын
@@CodeMonkeyUnity For single player games Yes. But it doesnt work for multiplayer on the server
@CodeMonkeyUnity
@CodeMonkeyUnity 9 күн бұрын
Usually you don't allow players to get too far away from the host. If you want to enable that, then you need some complex logic where you basically have two worlds in one scene that are split apart
@andersmalmgren6528
@andersmalmgren6528 9 күн бұрын
@@CodeMonkeyUnity the host handles all players and they can be on completely different parts of the map. It might work for p2p but no serious shooter uses that because of cheating reasons
@MaxDolotboy
@MaxDolotboy 11 ай бұрын
Can someone explain me why in the NPC script the part where if its not host then return has been added ?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
In multiplayer games you want only one source of truth, so you only want the EnemyAI to run on the server which then is replicated on the clients. If the clients are also running the AI then you will get out of sync quickly because the AI on the server will be doing different things than the AI on client1 and client2, etc
@MaxDolotboy
@MaxDolotboy 11 ай бұрын
@@CodeMonkeyUnityBut if for example, the host leave the game and the game continues, then there is nobody left to run everything has a host. Is there something I am missing there ?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
If the Host quits the server quits, there needs to always be a Host or Server connected
@MaxDolotboy
@MaxDolotboy 11 ай бұрын
@@CodeMonkeyUnity Thx for your answers, really usefull, keep doing what you are doing, you're the Best !
@NickPBond
@NickPBond 11 ай бұрын
How many players would you use Netcode for? Will it cope with 4v4, 8v8, 12v12 ?
@tobias9790
@tobias9790 11 ай бұрын
Depends on what kind of game too...
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
There's no hard limit, depends on how much data you're synchronizing. If you have a 100 network objects you can support fewer players than if you have just 10 network objects
@NickPBond
@NickPBond 11 ай бұрын
@@CodeMonkeyUnity understood. Thanks for the reply. I appreciate it's tricky with all the possible variables to give a definitive answer. In the past with old netcode, I wouldn't even consider it for anything more than prototyping. Now it's clear the new netcode can be used for a publishable game. I'm just trying to get an idea of it's threshold. I'm wanting to attempt a FPS of the order of 12 v 12 with x6 locational hits on the avatars, but minimal other netobjects. And while I'm here ... just want to say Thankyou for this excellent channel. Top job sir!
@ekzac
@ekzac 11 ай бұрын
​@@NickPBond I've not used netcode myself, and I've used UNET in industry for controlled environments (not internet game). But it sucks anyway. Netcode, in other hand, seems much more reliable. Considering old games, I would not say 12v12 is too much if implemented properly, but it depends on the server as well, and there are other things like, if it's internet there are ping, services, plans, etc..
@NickPBond
@NickPBond 11 ай бұрын
@@ekzac Thanks, that's useful. :D
@jaredcone
@jaredcone 11 ай бұрын
But does it play well at 100+ ms ping?
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Just like this, no, this is the basics, on top of this you would add client side prediction to make it feel lag free
@grak1396
@grak1396 11 ай бұрын
Dude could make it VR in 2 more hours 😂
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
heh that's one area I still haven't touched! Need to find the time to research it
@YoussefGamerYT
@YoussefGamerYT 11 ай бұрын
0:44 timelapse its just him doing pen tricks
@saimmunir2841
@saimmunir2841 11 ай бұрын
Are you on discord? I'm looking for communities to expand my connection and learning process. If any of you know any community then please do share
@flyingjudgement
@flyingjudgement 11 ай бұрын
Hurray for lazzines! It seems pushing other things instead of mulltiplayer paying off ? Amazzing
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Uh? Pushing other things?
@flyingjudgement
@flyingjudgement 10 ай бұрын
I wanted to learn Multiplayer Just when Unity Deprecated it. So I been holding off waiting for Unity to release the "new" Mulltiplayer module. In the mean time, I learned so many things about: Game Development, Math, Bussines and Managment. Its unreal how much a person can change and grow in 6 years. Off topick I realised I watched soo many of your videos ower the last 6 years that I picked up your accent a little... Really apreciate all your videos and hard effort. Thanks a lot! Good luck with your new release! @@CodeMonkeyUnity
@mrzi-qu6ki
@mrzi-qu6ki 11 ай бұрын
TopG
@TheCoolestCrocodileEver
@TheCoolestCrocodileEver 11 ай бұрын
Can you add an inventory in a week?
@xwcott
@xwcott 11 ай бұрын
he can do that in less than a day
@TheCoolestCrocodileEver
@TheCoolestCrocodileEver 11 ай бұрын
@@xwcott yeah but what about the items making the inventory is a thing creating the thing an id for every item it’s not gonna take him just an hour I’m pretty sure
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
I've actually been meaning to remake my old Inventory tutorial in a better way, but yup it can definitely be done unitycodemonkey.com/video.php?v=2WnAOV7nHW0 NGO automatically handles creating unique id's for any object
@TheCoolestCrocodileEver
@TheCoolestCrocodileEver 11 ай бұрын
@@CodeMonkeyUnity omg I should’ve expected that a tool could make the trick
@Caphalem
@Caphalem 11 ай бұрын
Wait wait wait. I've seen this before. Let me try something real quick. why you dont try make a survival game (or you cant do that)
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
heh I'd love to try that! It's a fun genre, I hope someday I can explore it!
@Caphalem
@Caphalem 11 ай бұрын
@@CodeMonkeyUnity Same :P I think this project could even be a good starting point although I'm not sure how it looks like under the hood
@ninuji69
@ninuji69 11 ай бұрын
He can
@a1a3a5
@a1a3a5 11 ай бұрын
bro is him
@gustavosalmeron2013
@gustavosalmeron2013 11 ай бұрын
DAMN you're handsome
@containedhurricane
@containedhurricane 11 ай бұрын
I think Unity Relay/ Lobby is expensive compared to Epic Online Services and PlayFab
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Is it? The free tiers are extremely generous, unless your game is a mega hit you don't have to pay one cent
@containedhurricane
@containedhurricane 11 ай бұрын
@@CodeMonkeyUnity I heard a game monthly API consumption is around three million API calls for 1000 daily active users, but UGS free tier only allows one million API calls per month. Maybe a game developer that has used UGS, EOS and PlayFab can clarify this
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Not sure what you mean, neither of those tools is paid on API call usage, they're based on Bandwidth and CCU unity.com/solutions/gaming-services/pricing
@containedhurricane
@containedhurricane 11 ай бұрын
@@CodeMonkeyUnity Unity mention about API call limits on that pricing page. Cloud Save has monthly 1,000,000 writes and reads limit, Economy has monthly 100,000 writes and 1,000,000 reads limit, Cloud Code has monthly 1,000,000 invocations limit
@micaiahstevens8840
@micaiahstevens8840 11 ай бұрын
... its easy to fool the masses. Did anyone else notice that when they cast a spell, the other hand did as well? It sounds easy and flashy, but little things like this, make it more difficult.
@micaiahstevens8840
@micaiahstevens8840 11 ай бұрын
Looks like it was fixed, I would guess it was when he added the network animation component.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
You mean before I implemented the shoot particles? Yes before that I hadn't added the IsOwner check so the input was running on every player
@HaeriStudios
@HaeriStudios 11 ай бұрын
Well this is fine as long as the game is intended to be played in a private lobbie because in a public lobbies you would instantly have people cheating since the player movement is not server authoritative.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Which is perfectly fine in co-op games, just not in competitive games
@yusefwilson
@yusefwilson 11 ай бұрын
It is slightly unfair to say you have actually added multiplayer to your game without going into detail about hosting solutions and multiplayer game architecture (peer-to-peer vs dedicated server, etc.) I agree that NGO is a great tool but to truly make and release a multiplayer game it’s not as easy as it seems in this video. Did you decide on a hosting solution for this game? If so, which one? Great video either way but I thought those points were worthy of clarification.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Sure I could work on it for 30 minutes more and implement the Lobby and Relay that I've used previously, just with that it would be fully online unitycodemonkey.com/video.php?v=-KDlEBfCBiU unitycodemonkey.com/video.php?v=msPNJ2cxWfw If you want dedicated servers look into Game Server Hosting unitycodemonkey.com/video.php?v=IvCVFywNXMc
@Algost_
@Algost_ 11 ай бұрын
Yeah Indeed it work but you're not using à client-server architecture so cheating is rly easy, i don't know if it's à good lesson to teach "Yeah you can make multi easy" when it can be in the wrong way (if your game is competitive, with a ladder and rank system) but for proto can be usefull
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
NGO is primarily meant for co-op games where cheating is not a factor. If you're concerned about that then yes never trust the client
@GameDevGarage
@GameDevGarage 11 ай бұрын
I really love productivity but the "in 4 hours" like unnecessary pressurized things not my way. Sorry bro ♥️
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
It was not a time limit, I tried doing it and that's how long it took
@GameDevGarage
@GameDevGarage 11 ай бұрын
@@CodeMonkeyUnity Congrats 🤘
@kylopootis6489
@kylopootis6489 11 ай бұрын
MAKE THIS A FULL GAME ( or you cant?)
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
heh if I wasn't already busy working on my Steam game maybe I would!
@kylopootis6489
@kylopootis6489 11 ай бұрын
@@CodeMonkeyUnity i really wanted to fly that airplane✈️✈️:( but ill be looking forward to your steam game too! ill wishlist it rn! love your videos thank you!
@JarppaGuru
@JarppaGuru 11 ай бұрын
will it take 4 hours? lol
@danellboy5757
@danellboy5757 11 ай бұрын
Nah, he can do it within 7 minutes
@hamsterbyte
@hamsterbyte 11 ай бұрын
first
@jud.su.5developer895
@jud.su.5developer895 11 ай бұрын
Yes You can because only legend can do it. 🫡
7 Game Dev Mistakes that DESTROY your Games!
12:44
Code Monkey
Рет қаралды 33 М.
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 15 МЛН
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
Can I make an OPEN WORLD Game in ONE WEEK?
12:43
Code Monkey
Рет қаралды 72 М.
Take your Skills from Beginner to ADVANCED in 20 HOURS!
9:11
Code Monkey
Рет қаралды 23 М.
Unity Multiplayer in 3 minutes
3:01
Rootbin
Рет қаралды 3,8 М.
I added online multiplayer to my game
8:04
Watt Designs
Рет қаралды 133 М.
PRACTICAL plan to make your FIRST GAME!
8:42
Code Monkey
Рет қаралды 34 М.
coherence | Single-player to multiplayer in 5 minutes
6:51
coherence
Рет қаралды 13 М.
I added MULTIPLAYER to my GAME in 7 days
8:31
AIA
Рет қаралды 91 М.
My Wife and I Made an Indie Game and it Made Millions!
14:45
Eastshade Studios
Рет қаралды 1,1 МЛН
Adding MULTIPLAYER to my Game! (ONE WEEK LEFT!)
13:00
Code Monkey
Рет қаралды 15 М.
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 15 МЛН