Thank you so much for these tutorials! Networking tutorials are rare but so important.
@DapperDinoCodingTutorials3 жыл бұрын
No problem :) It is sadly true that they are rare, so I'll keep trying my best with producing tutorials to help those who are interested!
@OnFight19973 жыл бұрын
This is very cool, because after getting the principle of Client/Server Side data sync, the sky is the limit, always incredibly didactic, thanks for the video. My next request would be syncing data in projectiles, (assuming there will be a lot of players and projectiles are costly in terms of size of data to send back and forward).
@DapperDinoCodingTutorials3 жыл бұрын
Thanks for the kind words! I'm sure projectiles will be coming up in many tutorials that I'll be making so stay tuned :)
@manvondarten26323 жыл бұрын
Loving these tutorials, you make it seem so simple even we can do some networking now. Would love to see how to instantiate and destroying objects.
@DapperDinoCodingTutorials3 жыл бұрын
Thanks for the kind words! Instantiating and destroying will be coming soon for sure :)
@Robertganca3 жыл бұрын
Love this series already. I can’t for a video showing how to use it with Steam.
@walterh21133 жыл бұрын
This definitely takes some getting used to, but it's a lot less boilerplate than having to do all of it yourself every single time.
@DapperDinoCodingTutorials3 жыл бұрын
Good luck with it all! I'm sure you'll be a master in no time :)
@charlesmctavish51883 жыл бұрын
I absolutely love your videos, very informative, and there is a lot of content. I’m new to C# and unity and networking as a whole. I’m trying to make a simple 2 player online game. Any recommendations on which series to watch? Your mlapi or mirror ones?
@DapperDinoCodingTutorials3 жыл бұрын
Both are completely fine to watch though I will be moving forward using MLAPI from now on since it is the officially supported solution (even though it is still experimental, aka, the API is subject to change) so I think I'd recommend this to someone who's starting to learn and isn't necessarily releasing a commercial game any time soon.
@fatguystudios0com3 жыл бұрын
Great video as always! I'm having some trouble connecting to a friend that is on a different network. A tutorial on this would be awesome! Keep up the good work.
@DapperDinoCodingTutorials3 жыл бұрын
Thanks! Since they are on a different network you'll need to look into how to port-forward for the host's router to allow external connections to the port that the game server is using on the transport component (7777 by default). I have considered making a tutorial for this but at the end of the day, it's going to be different for everyone so I don't think it would actually work as a tutorial.
@Blitz09093 жыл бұрын
@@DapperDinoCodingTutorials I think that this would still be a great video to make since there doesn't seem to any other tutorials on it. Even if it's going to be a little different for everyone, it would still be good to have some sort of an idea of what to expect! Also, I'm loving this series! This new API has convinced me to update my Unity game to be networked before it gets too far into development. It's still going to be a ton of work at this point, but these videos are a great start
@Moonz973 жыл бұрын
Thanks! It doesn't seem that hard and actually looks like it's enjoyable to work with.
@DapperDinoCodingTutorials3 жыл бұрын
It is enjoyable :) Good luck with it!
@marian34762 жыл бұрын
Great work! I Really love your tutorials. Besides explaining very clearly, I love how expressive the names for your variables are. There is nearly no need for commenting the code! Can you maybe do a tutorial on how to measure and debug the traffic that goes across the network? Currently I am facing an issue, where I spawn two players in the scene and share their transforms with a NetworkTransform. On the Host it is working all fine, but on the Client I am experiencing a very high lag. Both instances run on the same computer. Surely I have some very inefficient code, but I have not idea on how to find out, where all the communication happens that leads to the lag. Alternatively, i would love to see how you have done your character controller for your WizardsInTraining game. Especially the synching of the rotation of the players, since this might change and needs to be updated every frame.
@RiorXD3 жыл бұрын
Oh. A new tutorial. Finally some good f'in code
@DapperDinoCodingTutorials3 жыл бұрын
Hope you enjoy!
@Salmonman06043 жыл бұрын
Definitely gotta do a tutorial on their NetworkList
@cheekz70823 жыл бұрын
Hi, amazing Vid, keep up the great work! And would you suggest to use NetworkVariables for shooting or what should been used for that? Would love to see a Tutorial about it
@enumerodev2 жыл бұрын
Hello Dino, really nice tutorials! :) I was wondering if you could help me real quick, I'm getting the "ConnectedClients should only be accessed on server" error when changing color on my charater as the client. However, the particle scripts works on both server and client. Let me know if you have any ideas! cheers
This all works nice and well, but this project is using a local server (only accesed by your own device) Any help on how to switch it to multiple devices and stuff?
@gopalpedersen93383 жыл бұрын
Awesome tutorials! Just what i was looking for. I'm having trouble figuring out how to have a Spawner that spawns enemies which can then be killed by the players, and all of this replicated properly on all clients. Any tips or tutorials you could offer or something you might cover in the future? Thanks!
@stefan4293 жыл бұрын
finally someone using bytes in network methods xD
@DapperDinoCodingTutorials3 жыл бұрын
I had originally used an int but then when reviewing the code before making the tutorial I thought I might as well optimise a bit and get people (including myself) into good habits for optimisation.
@RohitSharma-zy9yd3 жыл бұрын
Hi Dapper, I love your tutorials regarding multiplayer. Can you try for voice sync and lobby with MLAPI?
@nathanbarraud43493 жыл бұрын
I'm a very early beginner with multiplayer so sorry if my question is stupid, how do you use rigidbody in multiplayer ? How to sync the movement of 2 objects falling and colliding ?
@DapperDinoCodingTutorials3 жыл бұрын
It depends on your use-case but a good place to start would be having the rigidbody simulate physics on the server only and then use the NetworkTransform component to sync its position to all the clients.
@voltototo3 жыл бұрын
I had the same issue and solved it by letting some player who wants to do something with a rigidy body send a serverRPC and in that ServerRpc call a clientRpc, which tells the clients to do the phyiscs.
@sathyarajshettigar3 жыл бұрын
Please make a tutorial of Unity MLAPI with Photon realtime transport and hosting it.
@arnaucs15343 жыл бұрын
First of all, thanks for your tutorials, you are amazing. I have a question. I am making an android game but to create a server build I have to switch to pc, which messes up all my project. I tried to follow your playfab & mirror tutorial but I faced this problem. Is there a way to solve it? Can I make a server build with a separate project that has nothing to do with my game?
@lightphoenix15223 жыл бұрын
I’m trying to show a list of joined players. In the lobby but strugling a bit. I’m also curious in switching scènes and assigning player prefabs.
@gamedevdanny3 жыл бұрын
Thanks for the tutorial? Could you do a video on a Tickbased (and/or turnbased) asynchronous game? Where each tick is like 1-3 seconds and the server broadcasts the game state every tick for the clients to simulate (movement, actions, etc.)?
@Veevslav13 жыл бұрын
Hey Dapper any chance of a basic tutorial on networking basic terrain that is generated at runtime? I think it would require an array of terrain heights combined with a client side painter that paints based on Mesh angles and height. BTW thanks for the videos.
@DapperDinoCodingTutorials3 жыл бұрын
That might be quite the challenge :) There are plenty more basic/intermediate things to cover being getting to something that advanced so I may cover it, but it will be a while, sorry. Good luck!
@Veevslav13 жыл бұрын
@@DapperDinoCodingTutorials No problem. Just an interesting idea for a video that I have not seen covered yet.
@lgdcompany81513 жыл бұрын
Can you please create a video about foot placement using Animation Rigging
@whoaluis70123 жыл бұрын
will you be making a udemy tutorial series on MLAPI?
@VyvyanTheGreat3 жыл бұрын
Any idea where the "NetworkVariableSettings" went in 1.0.0?
@niekzandt69293 жыл бұрын
No documentation doesn't say anything about it either, did you find a solution?
@DavidZobristGames3 жыл бұрын
liked it first, than watched it
@derekdecramer29193 жыл бұрын
Next mirror video when?
@hakanviajando3 жыл бұрын
Hi, thanks for the video. Old Unity user here, didn't the MLAPI die? Do they update it and is it usable for a real project, without needing Photon etc.?
@JIN-TECH3 жыл бұрын
Can you write a motion controller actor with a prediction? Or maybe there is a standard built-in engine?
@SpaceKebab Жыл бұрын
an AI responds to how it thinks your code works: The TeamPlayer class derives from the NetworkBehaviour class, which is provided by Unity Netcode and allows this component to interact with the network. It has a serialized field teamColourRenderer that references a renderer component attached to the same game object, and an array of colors called teamColours. It also has a NetworkVariable called teamIndex of type byte, which is used to store the team index of the game object over the network. The TeamPlayer class has a method called SetTeamServerRpc, which is marked with the [ServerRpc] attribute. This indicates that it is a remote procedure call (RPC) that can be invoked by clients, but will only be executed on the server. The RPC sets the value of the teamIndex NetworkVariable to the value of the newTeamIndex parameter, but only if the value is less than or equal to 3. The TeamPlayer class also has an OnEnable and OnDisable method, which are Unity messages that are called when the component is enabled or disabled. In these methods, the OnTeamChanged method is registered or unregistered as a delegate for the OnValueChanged event of the teamIndex NetworkVariable. Finally, the OnTeamChanged method is called when the value of the teamIndex NetworkVariable changes. It updates the color of the teamColourRenderer based on the new team index. However, this is only done on the client, as indicated by the check for IsClient. tell me what you think
@tomsmith97073 жыл бұрын
Can you make a unity tutorial on volumetric raymarching?
@aumpalosa2 жыл бұрын
Is this still relevant with NetCode? I can see that NetworkVariable is in a different namespace.
@SociopathDev3 жыл бұрын
Will this work to transfer realtime player positions? I mean while they are moving you send the position like that and others recive it to see where is the player moving
@harshjain42563 жыл бұрын
Will this work on android devices too can i connect two android devices using hotspot will it be synced in android too?
@willurquhart3D3 жыл бұрын
How would I go about making a variable that only the host can change? I tried using the IsHost boolean in the TeamPlayer script but it only then it only updates the variable for the host instead of only letting the host update the variable. I originally tried on my TeamPicker script but it won't allow me to have MLAPI.Connections and MLAPI.Messaging on the same script. Any work arounds?
@whoisgliese3 жыл бұрын
Hey man, can you answer something for me please? I'm trying to play an fps game that's already finished by me with my family. Now I only have two pcs, so I want to find a way to have two players on each pc. Is this possible?
@caranjeetkumar69863 жыл бұрын
when i join from 3 build and I leave the host then the third players panel didnt updates
@DapperDinoCodingTutorials3 жыл бұрын
Thanks for mentioning that, I'll have a look into that for myself when I get some free time to see if I can replicate it.
@caranjeetkumar69863 жыл бұрын
@@DapperDinoCodingTutorials I am a big fan and i am making this game too, The game is running fine accept this problem that i have written in the comment. Please see the problem if you have time.Niceeee to talk to you.
@rucesocial80043 жыл бұрын
Mirror or MLAPI ?
@navinkumar73703 жыл бұрын
Shooting mechanism?
@DapperDinoCodingTutorials3 жыл бұрын
I'll definitely be covering shooting/fps mechanics at some point once I've finished covering the basics
@lilbayg98643 жыл бұрын
hi , i searched a lot to find out what this "-= " does in your scripts,i know what it does with ints and floats but you used that between voids, i'll be thanks full if u help me with this :)
@aimojorma76743 жыл бұрын
it starts and stops listening to things, it reads in his script's comments
@lilbayg98643 жыл бұрын
@@aimojorma7674 thank u alot
@whatamiwitnessing10033 жыл бұрын
How about saving data on the server?
@DapperDinoCodingTutorials3 жыл бұрын
Do you mean persistent storage outside of the game itself?
@whatamiwitnessing10033 жыл бұрын
@@DapperDinoCodingTutorials Yes.
@DapperDinoCodingTutorials3 жыл бұрын
You can either use PlayerPrefs (very simple but not recommended for complex data), saving a file locally on the server (would only work if that is the only server there is), or using a database/3rd party service like playfab that the server can read to/write from
@whatamiwitnessing10033 жыл бұрын
@@DapperDinoCodingTutorials I was thinking about a database, preferably MySQL with unity stand-alone server in place of client hosted. Do you have any courses on this? I don't mind paying if that course is available on a platform.
@cho.gath7893 жыл бұрын
Hey Dapper Dino
@DapperDinoCodingTutorials3 жыл бұрын
Heya
@coreyduncan34272 жыл бұрын
Having an issue with updating sprite renderer for 2D game, code is virtually the same besides targeting sprite renderer instead of Renderer but I'm getting an error saying the function should only be called by the server, not connected clients, any thoughts? Thanks... works fine for host but clients aren't updating/getting an error, also doesn't sync on re-entering game
@coreyduncan34272 жыл бұрын
most likely because it's breaking at line 12 in teamPicker
@coreyduncan34272 жыл бұрын
@PACeMIKE4EVER thanks, i forgot all about this comment. Thankfully got unstuck long ago :p
@_MauMau_ Жыл бұрын
@@coreyduncan3427 I currently have the same problem. How did you fix it? I sadly cannot see the comment from PAceMIKE4EVER.
@zakku16533 жыл бұрын
what means subscribing and unsubscribing beacause i dont get this part
@ZoidbergForPresident3 жыл бұрын
I know it's not important here but wouldn't it work if the team colours were a ScriptableObject instance? So, no need to copy the list of colours and make sure they are identical and also no need to hardcode the maximum index.
@mickmickymick69273 жыл бұрын
Didn't work. If I change the variable, then a client connects, the client doesn't see the new variable. Anyone else have this problem? Edit: I got it, by subscribing to the event in Start() and not unsubuscribing. I look forward to seeing what future hidden errors I have caused myself by doing this
@cuentaprueba83322 жыл бұрын
What event??
@rafaeldicker36443 жыл бұрын
Can i also change player's movement and it will sync with everyone else?
@wiljagerhardt12193 жыл бұрын
whats with the other patrons, no thanks?
@felipeliberado3 жыл бұрын
can i create a multiplayer 2D game just like a 3D game? With the new unity multiplayer
@ZiplawDev3 жыл бұрын
why do you do your if statements backwards? you always return after them, why not just plop the logic inside the ifs?
@samochreno3 жыл бұрын
too much brackets
@samochreno3 жыл бұрын
cleaner this way
@ZiplawDev3 жыл бұрын
@@samochreno you say that, but this is a tutorial, and a reverse if statement is harder to read and comprehend than a normal one
@samochreno3 жыл бұрын
@@ZiplawDev i dont really think they are tho, i think its just preference
@Mukna1322 жыл бұрын
@@ZiplawDev This is generally considered best practice. It's something called a guard clause. It makes sure it has what it needs before running any 'real' logic. For example, if you have an if statement with a large amount of logic inside it and then waaaaay down inside that, you have another if statement that fails and all it's doing is checking if something is of a certain value. You have wasted cpu time by running all that logic beforehand. Guard clauses will return you from the function well before it would have failed otherwise. Does that make sense?