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

Поделиться
HTML-код
  • Опубликовано: 6 авг 2023
  • 🌍 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...

Комментарии • 199

  • @NachitenRemix
    @NachitenRemix 10 месяцев назад +62

    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 10 месяцев назад +5

      lmao u gifted £0.55

    • @jpmallick367
      @jpmallick367 10 месяцев назад +19

      ​@@killerekswhat did u gift?
      Try to appreciate people who give rather than whine and criticise

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +22

      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 10 месяцев назад +5

      @@killereksHe did give him something which counts for something. You, on the other hand...

    • @NachitenRemix
      @NachitenRemix 10 месяцев назад +2

      @@Blinkers2007GameDev Yea, it's easy to criticize without doing their part xD

  • @mrtanaka475
    @mrtanaka475 10 месяцев назад +8

    And that's how CodeMonkey turns into Dani

  • @upsidegaming7134
    @upsidegaming7134 10 месяцев назад +45

    Yes. Yes you can.

  • @Banaaani
    @Banaaani 10 месяцев назад +10

    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.

  • @chuckdude514
    @chuckdude514 10 месяцев назад +38

    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 10 месяцев назад +13

      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 10 месяцев назад +2

      ​@@Blinkers2007GameDevwell said, I agree

    • @Blinkers2007GameDev
      @Blinkers2007GameDev 10 месяцев назад +2

      @@AlexGorskov thanks!

    • @JohnDoe-bo5yk
      @JohnDoe-bo5yk 10 месяцев назад +1

      Depends on your goals, my main focus is programming, I wanna learn how to make it

    • @BoltRM
      @BoltRM 10 месяцев назад +3

      @@JohnDoe-bo5yk How old are you? I'm in my 60s so time is precious & limited. =:P

  • @ov3roger
    @ov3roger 10 месяцев назад +3

    Man you really are amazing, I hope you never loose this philosophy of sharing and teaching without almost any cost, this is really respectable

  • @alec_almartson
    @alec_almartson 10 месяцев назад +5

    This is a very nice summary on how to quickly add Multiplayer to our Videogames. 💯👍🏻
    Thank you.

  • @calvinms7503
    @calvinms7503 10 месяцев назад +4

    this is a good summary from you previous 6 hours lecture :D I love it

  • @systematic_god6849
    @systematic_god6849 10 месяцев назад +1

    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 10 месяцев назад +1

    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 10 месяцев назад +2

    NOW THIS IS INTERESTING

  • @AndersBergh
    @AndersBergh 10 месяцев назад +1

    [Stands up and applauds] .... Very well done!

  • @Huyuimu
    @Huyuimu 10 месяцев назад +2

    we need more of this!

  • @learnsmtheveryday01
    @learnsmtheveryday01 10 месяцев назад

    Love the thumbnail, Dani style, thank you for content

  • @makra42069
    @makra42069 10 месяцев назад +1

    Like these new devlog style videos!!

  • @-OmShinde
    @-OmShinde 10 месяцев назад +1

    Really like these type of videos.
    Please make a car game tutorial.(Pick up/drop game,race,)😄🙏

  • @PatrickEn
    @PatrickEn 10 месяцев назад +1

    After 6 Months of learning Unity my next project will be a multiplayer game. This video gives me hope :D

  • @MangoPulver
    @MangoPulver 10 месяцев назад

    Absolute legend 😤😤

  • @PeterSedesse
    @PeterSedesse 10 месяцев назад +1

    We are getting close to the mythical ' convert to mmorpg' button.

  • @Viski982
    @Viski982 10 месяцев назад

    We love you man love you so much ❤❤❤

  • @MarushiaDark316
    @MarushiaDark316 10 месяцев назад +8

    Anyone else curious what the FloatingPointFix script does?

    • @TrentSterling
      @TrentSterling 10 месяцев назад

      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  10 месяцев назад +3

      It's from the Gaia asset that I used to make the world, it helps avoid floating point issues on huge worlds

  • @MrMattyMoses
    @MrMattyMoses 10 месяцев назад

    That was impressive!

  • @Btmodz
    @Btmodz 10 месяцев назад

    I really like your new style with green screen and microphone.

  • @frogmasto1316
    @frogmasto1316 10 месяцев назад +3

    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  10 месяцев назад +1

      Thanks for the kind words, I'm glad you like it!

  • @SMORIGINALS
    @SMORIGINALS 10 месяцев назад +3

    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.

  • @MiDnYTe25
    @MiDnYTe25 10 месяцев назад +1

    I love how the characters have 3 feet wide shoulders lol

  • @GlassVaultStudio
    @GlassVaultStudio 10 месяцев назад +3

    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  10 месяцев назад +3

      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 10 месяцев назад

      @@CodeMonkeyUnity true!

  • @marveII0us
    @marveII0us 10 месяцев назад +2

    Interesting title

  • @Chobi01
    @Chobi01 10 месяцев назад

    Best channel in the world ❤❤

  • @ekzac
    @ekzac 10 месяцев назад +1

    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  10 месяцев назад +2

      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 10 месяцев назад +1

    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  10 месяцев назад +1

      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

  • @RM-lh7on
    @RM-lh7on 10 месяцев назад +1

    Please make a video about Unity Urp optimization/improving performance. Thanks!

  • @Arab_GameDev
    @Arab_GameDev 10 месяцев назад

    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  10 месяцев назад +1

      Nice! Best of luck with that project!
      For my game Dinky Guardians I am indeed using Unity's Lobby and Relay

  • @SwatHound
    @SwatHound 10 месяцев назад +6

    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  10 месяцев назад +5

      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

  • @skillmastersgames
    @skillmastersgames 10 месяцев назад +1

    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 10 месяцев назад

      Then do spanish English voice. Can fit in to certain games. Or just adapt your voice

    • @skillmastersgames
      @skillmastersgames 10 месяцев назад

      @@Blinkers2007GameDev Not about games, just for the videos showing progress of games

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      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 10 месяцев назад

      @@CodeMonkeyUnity thank you! And thanks for your content too, inspired and helped me a lot in this travel

  • @canerkaska8355
    @canerkaska8355 9 месяцев назад

    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  9 месяцев назад

      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.

  • @Damian_h
    @Damian_h 10 месяцев назад +2

    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  10 месяцев назад +2

      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 10 месяцев назад

      @@CodeMonkeyUnity god bless you man im gonna go check it out.

  • @MrOmega-cz9yo
    @MrOmega-cz9yo 10 месяцев назад

    I agree with other commenters, CM is awesome! 👍👍

  • @user-qk1zq9gf3t
    @user-qk1zq9gf3t 10 месяцев назад +1

    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

  • @DaElfer
    @DaElfer 9 месяцев назад

    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 10 месяцев назад

    damn i need to start to learn multyplayer

  • @georgedowell7747
    @georgedowell7747 10 месяцев назад +2

    I want to be like Code Monkey, when I grow up, except I m already a grown up 😂😂😂😂😂😂

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      heh it's never too late to start learning!

  • @1MrHam
    @1MrHam 10 месяцев назад

    Wow That's awesome! One question, it works with a dedicated server or is local multiplayer? Keep the good work!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      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 10 месяцев назад

      @@CodeMonkeyUnity Thank you so much for the responses!

  • @rapidstress2008
    @rapidstress2008 10 месяцев назад +2

    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  10 месяцев назад

      Sure! Feel free to use all the tools I mentioned in the previous video to make something similar

  • @XAyaDubX
    @XAyaDubX 10 месяцев назад

    Hi Code Monkey, are you going to release an updated DOTS tutorial video? Like ECS or Job system. Thanks! :)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      Yeah I definitely want to, just need to find the time, I'm hoping to cover it this month

    • @XAyaDubX
      @XAyaDubX 10 месяцев назад

      That would be so awesome. Thank you so much! Take your time. You produce amazing content. @@CodeMonkeyUnity

  • @reetuverma5501
    @reetuverma5501 10 месяцев назад +1

    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

  • @NeleN_Games
    @NeleN_Games 10 месяцев назад

    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  10 месяцев назад +1

      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

  • @thanhtruongcong9175
    @thanhtruongcong9175 10 месяцев назад

    That was amazing video. But can I ask you how can I remove delay when using relay Unity pls ?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +2

      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

  • @lgent2435
    @lgent2435 10 месяцев назад

    Will you make tutorial about FishNet? I really need it

  • @iiropeltonen
    @iiropeltonen 10 месяцев назад

    Idea: 500 thousand sub special: Finally a tutorial on pen spinning 😊

  • @ZahoorAhmad-tc8ev
    @ZahoorAhmad-tc8ev 10 месяцев назад +1

    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  10 месяцев назад +1

      I have thought about doing something like that but it would be really tricky to organize and manage, maybe one day!

  • @MaxDolotboy
    @MaxDolotboy 9 месяцев назад

    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  9 месяцев назад

      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 9 месяцев назад

      @@CodeMonkeyUnity I understand, doesnt it requiere to StartHost, Have à NetworkManager to spawn the Player and etc ?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  9 месяцев назад

      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 9 месяцев назад

      @@CodeMonkeyUnity Ok, big thanks for the help !

  • @DMIyce
    @DMIyce 10 месяцев назад

    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  10 месяцев назад

      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

  • @0darkwings0
    @0darkwings0 10 месяцев назад

    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  10 месяцев назад +1

      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 10 месяцев назад

      @@CodeMonkeyUnity Thank you for the links, but unfortunately it not helping :(

  • @Etercy
    @Etercy 10 месяцев назад

    u can !

  • @zrizzy6958
    @zrizzy6958 10 месяцев назад +1

    greate video, but the green screen has some stuff to improve

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      Yeah I think it's the camera which is just a basic webcam, need to upgrade to something better

  • @JrBrown-zo4fx
    @JrBrown-zo4fx Месяц назад

    I want to add multiplayer to Universal truck simulation can you help me out on that

  • @jpmallick367
    @jpmallick367 10 месяцев назад

    Can u make a 3d(maybe not open world) game with only free assets

  • @grak1396
    @grak1396 10 месяцев назад

    Dude could make it VR in 2 more hours 😂

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +3

      heh that's one area I still haven't touched! Need to find the time to research it

  • @-Bill-Clinton-
    @-Bill-Clinton- 9 месяцев назад

    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  9 месяцев назад

      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- 9 месяцев назад

      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  9 месяцев назад +1

      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- 9 месяцев назад

      Ok, thanks for the help!

  • @Stefan-fg4tt
    @Stefan-fg4tt 10 месяцев назад +1

    Can you host with netcode over steam? So that you don't need a server and there are no costs?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +2

      Yes you can replace the Unity Transport for the Steam Transport

    • @Stefan-fg4tt
      @Stefan-fg4tt 10 месяцев назад

      @@CodeMonkeyUnity great.. Thx

  • @GameDevGarage
    @GameDevGarage 10 месяцев назад

    Can we create game on one of the clients? Without a dedicated server?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      Yes, you can make one player be the Host and the others Clients

    • @GameDevGarage
      @GameDevGarage 10 месяцев назад

      @@CodeMonkeyUnity That's really cool 👍 I'll try it asap 🥳

  • @rickyfreddy6963
    @rickyfreddy6963 10 месяцев назад

    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  10 месяцев назад +2

      That is indeed something I'd like to cover, it should be pretty simple, turn based games would mostly be just RPCs

    • @rickyfreddy6963
      @rickyfreddy6963 10 месяцев назад

      @@CodeMonkeyUnity for me pretty simple is OK, a better starting point to learn multiplayer then immiately going Far Cry 6 on it haha

  • @YoussefGamerYT
    @YoussefGamerYT 10 месяцев назад

    0:44 timelapse its just him doing pen tricks

  • @suicune2001
    @suicune2001 10 месяцев назад

    Oh wow! With these tools, do you have to worry about hackers/cheaters?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +2

      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

  • @Anvelir
    @Anvelir 10 месяцев назад

    Why do you use A*, not built-in NavMesh in your project?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      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 10 месяцев назад

      @@CodeMonkeyUnity thank you for the answer!

  • @iiropeltonen
    @iiropeltonen 10 месяцев назад

    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 10 месяцев назад

      Smoke and mirrors. You spawn dummies on the clients.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +3

      Yup correct just like this there is indeed input lag, that's where client side prediction comes in

    • @iiropeltonen
      @iiropeltonen 10 месяцев назад +1

      @@CodeMonkeyUnity Did I hear: "Multiplayer Smoke and Mirrors - Tutorial"?

  • @mikhailhumphries
    @mikhailhumphries 10 месяцев назад

    Do you need to pay monthly for a server?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      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

  • @EnderElohim
    @EnderElohim 10 месяцев назад

    so is this unity's solution vs mirror?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      Yes NGO is a networking toolset just like Mirror, Fishnet, Photon, etc

  • @silentwarrior600
    @silentwarrior600 6 месяцев назад

    Code monkey I want to buy classes, teach me please 😂

  • @MaxDolotboy
    @MaxDolotboy 10 месяцев назад

    Can someone explain me why in the NPC script the part where if its not host then return has been added ?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      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 10 месяцев назад

      @@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  10 месяцев назад +2

      If the Host quits the server quits, there needs to always be a Host or Server connected

    • @MaxDolotboy
      @MaxDolotboy 10 месяцев назад

      @@CodeMonkeyUnity Thx for your answers, really usefull, keep doing what you are doing, you're the Best !

  • @NickPBond
    @NickPBond 10 месяцев назад

    How many players would you use Netcode for? Will it cope with 4v4, 8v8, 12v12 ?

    • @tobias9790
      @tobias9790 10 месяцев назад

      Depends on what kind of game too...

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      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 10 месяцев назад

      @@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 10 месяцев назад

      ​@@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 10 месяцев назад

      @@ekzac Thanks, that's useful. :D

  • @flyingjudgement
    @flyingjudgement 10 месяцев назад

    Hurray for lazzines! It seems pushing other things instead of mulltiplayer paying off ? Amazzing

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      Uh? Pushing other things?

    • @flyingjudgement
      @flyingjudgement 9 месяцев назад

      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

  • @a1a3a5
    @a1a3a5 10 месяцев назад

    bro is him

  • @mrzi-qu6ki
    @mrzi-qu6ki 10 месяцев назад

    TopG

  • @yusefwilson
    @yusefwilson 10 месяцев назад +1

    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  10 месяцев назад

      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

  • @saimmunir2841
    @saimmunir2841 10 месяцев назад

    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

  • @ninuji69
    @ninuji69 10 месяцев назад +1

    He can

  • @jaredcone
    @jaredcone 10 месяцев назад

    But does it play well at 100+ ms ping?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад +1

      Just like this, no, this is the basics, on top of this you would add client side prediction to make it feel lag free

  • @gustavosalmeron2013
    @gustavosalmeron2013 10 месяцев назад

    DAMN you're handsome

  • @micaiahstevens8840
    @micaiahstevens8840 10 месяцев назад

    ... 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 10 месяцев назад

      Looks like it was fixed, I would guess it was when he added the network animation component.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      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

  • @TheCoolestCrocodileEver
    @TheCoolestCrocodileEver 10 месяцев назад +1

    Can you add an inventory in a week?

    • @xwcott
      @xwcott 10 месяцев назад

      he can do that in less than a day

    • @TheCoolestCrocodileEver
      @TheCoolestCrocodileEver 10 месяцев назад

      @@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  10 месяцев назад +2

      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 10 месяцев назад

      @@CodeMonkeyUnity omg I should’ve expected that a tool could make the trick

  • @containedhurricane
    @containedhurricane 10 месяцев назад

    I think Unity Relay/ Lobby is expensive compared to Epic Online Services and PlayFab

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      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 10 месяцев назад

      @@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  10 месяцев назад

      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 10 месяцев назад

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

  • @Caphalem
    @Caphalem 10 месяцев назад

    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  10 месяцев назад +1

      heh I'd love to try that! It's a fun genre, I hope someday I can explore it!

    • @Caphalem
      @Caphalem 10 месяцев назад

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

  • @HaeriStudios
    @HaeriStudios 10 месяцев назад

    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  10 месяцев назад

      Which is perfectly fine in co-op games, just not in competitive games

  • @danellboy5757
    @danellboy5757 10 месяцев назад

    Nah, he can do it within 7 minutes

  • @GameDevGarage
    @GameDevGarage 10 месяцев назад

    I really love productivity but the "in 4 hours" like unnecessary pressurized things not my way. Sorry bro ♥️

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      It was not a time limit, I tried doing it and that's how long it took

    • @GameDevGarage
      @GameDevGarage 10 месяцев назад

      @@CodeMonkeyUnity Congrats 🤘

  • @Algost_
    @Algost_ 10 месяцев назад

    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  10 месяцев назад +2

      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

  • @kylopootis6489
    @kylopootis6489 10 месяцев назад

    MAKE THIS A FULL GAME ( or you cant?)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 месяцев назад

      heh if I wasn't already busy working on my Steam game maybe I would!

    • @kylopootis6489
      @kylopootis6489 10 месяцев назад

      @@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 10 месяцев назад

    will it take 4 hours? lol

  • @hamsterbyte
    @hamsterbyte 10 месяцев назад

    first

  • @jud.su.5developer895
    @jud.su.5developer895 10 месяцев назад +1

    Yes You can because only legend can do it. 🫡