How to Make a Multiplayer Game in Unity | Connecting Clients to a Server - Part 1

  Рет қаралды 153,225

Tom Weiland

Tom Weiland

Күн бұрын

Пікірлер: 951
@tomweiland
@tomweiland 2 жыл бұрын
*Riptide v2.0.0 is out now:* riptide.tomweiland.net/manual/updates/release-notes/v2.0.0.html Quite a few things have been renamed in v2 which will make it slightly more difficult to follow along with the video, so I recommend using v1.1.0 while watching the tutorials and then updating your project afterwards with the help of the upgrade guide (on the NEW docs site): riptide.tomweiland.net/manual/updates/guides/update-to-v2.html Part 2: kzbin.info/www/bejne/qoq3pKqHm5iKodk *Links to stuff in the video:* Source code ► github.com/tom-weiland/RiptideSampleFPS/tree/part1 Discord server ► tomweiland.net/discord RiptideNetworking repo ► github.com/tom-weiland/RiptideNetworking Riptide's Steam transport repo ► github.com/tom-weiland/RiptideSteamTransport Commonly used ports list ► en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers Check out my devlogs ► kzbin.info/aero/PLXkn83W0QkfmQI9lUzi--TxJaOFYIN7Q4 Support me via GitHub Sponsors ► github.com/sponsors/tom-weiland *Other FAQ* Does this work for 2D games? _Yes. The network code works independently of how many dimensions your game has._
@NapkinHolder_AH
@NapkinHolder_AH 2 жыл бұрын
Thank you so muchhh
@fortnitegiftcard8541
@fortnitegiftcard8541 2 жыл бұрын
Is making a server better using riptide or using your old networking tutorials code?
@enderduck4253
@enderduck4253 2 жыл бұрын
@@fortnitegiftcard8541 definitely Riptide. It's like he mentioned in the video. Riptide is cleaner and easier to work with. And a test conducted a while ago showed it to be 10 times more resource efficient than the previous solution.
@hassananwar2431
@hassananwar2431 2 жыл бұрын
Please show client and server prediction It'd be soo helpful
@fortnitegiftcard8541
@fortnitegiftcard8541 2 жыл бұрын
@@enderduck4253 thanks
@spacecatsfilms3955
@spacecatsfilms3955 2 жыл бұрын
The constant reminders of which file you're editing is a big step up from your older videos, looking forward to see more from you
@tomweiland
@tomweiland 2 жыл бұрын
Definitely, and they're essential if I want to have the footage zoomed in like that 😅
@NapkinHolder_AH
@NapkinHolder_AH 2 жыл бұрын
Omg I'm so excited for this. I've been waiting for a brand new networking system to use without money. I thank you so much!!
@tomweiland
@tomweiland 2 жыл бұрын
Yeah Riptide is free to use, but keep in mind that renting servers (which you'll need to do for any sort of public release) will still cost you money, regardless of what networking system you use.
@Kristopher_Logan
@Kristopher_Logan 2 жыл бұрын
@@tomweiland I have been having trouble with that. I rented a VPS but I do not think it is publicly accessible from the internet, I uploaded my server to it, fired it up but could not connect
@subarunatsuki1902
@subarunatsuki1902 2 жыл бұрын
Did you make it?
@adicardrz
@adicardrz 2 жыл бұрын
Cheers man, I am into netcode & backend development for multiplayer games. I cannot thank you enough for how your library is a golden learning-source for me. Hopefully, I will be able to contribute your netcode too!
@tomweiland
@tomweiland 2 жыл бұрын
Glad to hear it's been helpful :D
@Looneybat
@Looneybat 2 жыл бұрын
I knows it's been said a lot but you really are amazing, thank you for putting your time and effort into these great videos
@tomweiland
@tomweiland 2 жыл бұрын
Thanks for the kind words 😅
@KunamyMC
@KunamyMC 2 жыл бұрын
Hey Tom, I've been following you for 2 years now and your content just keeps getting better and better! Whether the videos, or the multiplayer solutions! Riptide is fucking awesome!
@tomweiland
@tomweiland 2 жыл бұрын
Thank you! I'm always looking to improve the work I do-glad you like it :D
@spidernh
@spidernh 2 жыл бұрын
I like how this solution seems like a balance between your old solution, where you had to write everything and I didn't understand it, and Mirror, where I could understand it easily but didn't know exactly what was going on since I wasn't controlling everything. I'm excited to see more of this series!
@tomweiland
@tomweiland 2 жыл бұрын
Yeah, I feel like Riptide is a good middle ground between the two. It saves you the pain of writing the really low level network code (which you most likely wouldn't ever need to modify anyways), but leaves the higher level stuff up to you so that you're fully in control of what's going on.
@FlubsYT
@FlubsYT 2 жыл бұрын
No way you have just uploaded this right before I wanted to come back to your tutorials as my programing knowledge got better since I first found your channel. I'm really looking forward to this tutorial series!
@tomweiland
@tomweiland 2 жыл бұрын
Impeccable timing 👌
@lowearthsurfer
@lowearthsurfer 2 жыл бұрын
This video covered all the bases and went even further beyond. I want to extend my deepest gratitude in how much effort you've put into the tutorial, material and production of this video. This boosted my confidence in applying this new concept to my unity project.
@tomweiland
@tomweiland 2 жыл бұрын
Thanks for the kind words, glad you liked it :D
@almond_robin
@almond_robin 2 жыл бұрын
THANK YOU SO MUCH. I followed your old tutorial to make some multiplayer games and I'm so excited about Riptide. Makes it much easier.
@tomweiland
@tomweiland 2 жыл бұрын
It's _sooo_ much better :P
@CodemasterJamal
@CodemasterJamal 2 жыл бұрын
The graphics for your game are amazing. I was wondering when Riptide came out and so far, I'm very impressed.
@tomweiland
@tomweiland 2 жыл бұрын
Glad you like it :)
@CodemasterJamal
@CodemasterJamal 2 жыл бұрын
@@tomweiland Yeah, some parts of it kind of reminds me of DarkRift but, it's greatly simplified.
@Kristopher_Logan
@Kristopher_Logan 3 ай бұрын
I got my ServerClient Configuration working, and trasmitted by first message to the server. I already had a setup going called UML that I am using for Educational Content. You tutorial really helped me alot - now I just need to set things up so there are two message types, client and server. messages from clients need to be blocked from accessing server functions. since it all uses my UML system, I just need to setup a dictionary that checks for keywords that clients are not allowed to use - such as shut down server commands and whatnot. I already have most of the stuff done, its just networking that needs to be completed, and thanks to this, I am way farther ahead. I had used riptide in the past in an effort to make an RPG maker with online features. the rpg maker failed, but riptide did not. hence why I am coming back here again to use it. Thank you for such a great tool.
@tomweiland
@tomweiland Ай бұрын
Glad I could help :)
@RugbugRedfern
@RugbugRedfern 2 жыл бұрын
Very cool! Can't wait to see what people make with this!
@SirJustinn
@SirJustinn 2 жыл бұрын
Hey rudbugg thank you for your tutorials alsooo
@tomweiland
@tomweiland 2 жыл бұрын
Yes, that'll be interesting to see...
@NewbNinjas
@NewbNinjas 2 жыл бұрын
I love it when people go above and beyond like this .... you sir are a gent and have earned a Ko-Fi on me.
@tomweiland
@tomweiland 2 жыл бұрын
Glad you found it useful! I appreciate any and all support, but if it's all the same to you, I think I prefer GitHub Sponsors over Ko-fi 😅
@zehsofficial
@zehsofficial 2 жыл бұрын
Perfect timing for starting up this new multiplayer networking series! I recently built my gaming pc so I'm back up with Unity game dev. I can't wait to see what you'll make with it. Good touch on showing if you're either working on the Server or Client project/code. Huge improvement in quality compared to your previous tutorial series!
@tomweiland
@tomweiland 2 жыл бұрын
Yeah, it's an upgrade on all fronts. The code is better and so are the videos :P
@K3rhos
@K3rhos Жыл бұрын
Exactly what I needed, I'm coming back after like 3 years without working with Unity, and I recently wanted to do some networking, I just took my old networking code from your old tutorials and slowy tried to remake everything properly, fixing issues and stuff, and I quickly became to conclusion: "This thing is garbage lol !" I have a lot of performance issues and everything with the old net code, issues when disconnecting, time out issues and more. Since I'm making a complexe game that manage a lot of entities at the same time, I need something stable and efficient ! And I just saw your new tutorial, and I don't wanted to go with Mirror or other stuff like that, Riptide seems to be exactly what I wanted.
@tomweiland
@tomweiland Жыл бұрын
Nice, welcome back to game dev :D
@donavilon
@donavilon 2 жыл бұрын
Nice tutorial bro, really well explained and with a simple tag reminding you in what script are you working, so simple, so clean, so effective. Really good bro thanks a lot!
@tomweiland
@tomweiland 2 жыл бұрын
Glad it helped :)
@lucadifelice3479
@lucadifelice3479 2 жыл бұрын
I remember watching your old multiplayer tutorial almost 2 years ago when I was in grade 8!
@tomweiland
@tomweiland 2 жыл бұрын
Haha yeah it was about time for an upgrade :P
@lucadifelice3479
@lucadifelice3479 2 жыл бұрын
@@tomweiland you are really talented with this stuff, keep it up!
@ataz1522
@ataz1522 2 жыл бұрын
Simply lovely, muchly needed. Thank you, Tom Weiland.
@tomweiland
@tomweiland 2 жыл бұрын
No problem :D
@phee3D
@phee3D 2 жыл бұрын
even the tutorial itself makes a lot more sense than your previous series. What I mean is, in the previous tutorials it was more of a "follow what I'm doing" kind of thing with explanations sprinkled in here and there and many people who weren't interested in understanding how the code works or didn't have enough knowledge to understand how it works didn't have a great time. This makes a lot more sense because now you're just showing how to use your multiplayer system instead of building it and anyone interested in understanding how it works can just read the source code. Big brain move right there
@tomweiland
@tomweiland 2 жыл бұрын
Yeah, I didn't do a great job of explaining things in the old tutorials, and they (especially the earlier ones) were much too fast. This is definitely a major improvement on all fronts 😅
@vintoncerf7562
@vintoncerf7562 2 жыл бұрын
Note to all new viewers: Server.Tick() method was replaced with Server.Update()
@tomweiland
@tomweiland 2 жыл бұрын
Yes, in v2.0.0, which is why I recommend using v1.1.0 while watching the tutorials, and then using the upgrade guide to update your project afterwards: riptide.tomweiland.net/manual/updates/guides/updating-to-v2.html
@ikhwanmz
@ikhwanmz 2 жыл бұрын
@@tomweiland how about for client?
@immysoun
@immysoun 2 жыл бұрын
This is going to be my favourite series of all time
@tomweiland
@tomweiland 2 жыл бұрын
How can you tell so soon 😅
@_Jam1
@_Jam1 2 жыл бұрын
Personally, i think a video explaining the methods that rapid uses in detail would be really cool. It will definitely help with solving more complex problems.
@tomweiland
@tomweiland 2 жыл бұрын
You mean you want an explanation of Riptide's internals? That's unlikely to happen-it'd take forever and most people wouldn't really benefit much from that knowledge (because they just want to get on with making their game). The source code _is_ pretty well commented though, so I think you could probably make sense of the majority of it without a video explaining it all.
@_Jam1
@_Jam1 2 жыл бұрын
@@tomweiland yeah i didnt think many people would be interested. Its more i was interested in the steps you took with riptide compared to your original tutorial
@laval_70
@laval_70 2 жыл бұрын
I gotta say this new networking solution i miles better than the old one. I previously used the old one and had several problems. Looking forward to more of this series!
@tomweiland
@tomweiland 2 жыл бұрын
I agree. For the last few months I've been so over how bad the old code is that every time someone asked for help with a problem they were having I just wanted to tell them to use Riptide, but until now that wasn't feasible because there was no tutorial 😅
@tiagomartins5487
@tiagomartins5487 2 жыл бұрын
I've seen all your videos about networking, I'm so looking forward to it. Are you going to cover important topics like client side prediction or lag compensation in your video series? I really hope so. thank you tom i love your channel
@tomweiland
@tomweiland 2 жыл бұрын
I've got making a client prediction tutorial set as a "reward" for hitting the current goal on GitHub Sponsors, so yes, that will probably happen eventually.
@tiagomartins5487
@tiagomartins5487 2 жыл бұрын
@@tomweiland glad to hear that, thanks for the tutorials, they are very useful
@cradle_of_chaos
@cradle_of_chaos 2 жыл бұрын
Good to see you back on KZbin Tom!
@tomweiland
@tomweiland 2 жыл бұрын
It's good to be back 😅
@suprecam9880
@suprecam9880 2 жыл бұрын
Tom, just had to leave a comment and say thank you for the videos. You’re the only person on KZbin who has ever covered this topic, authoritative multiplayer, in a way that not only makes sense, but does it right and feels professional. So many have tried. You are making a great contribution to the indie MP game developer community. Would love to hear about how you managed to learn all of this, are you self taught, did you work for a studio, or is it from schooling? Just curious. Thanks again, keep making great tutorials!
@tomweiland
@tomweiland 2 жыл бұрын
Thank you for the kind words, I'm glad you've found the videos helpful :D I'm entirely self-taught-I got started with networking through some videos that no longer exist, and after that I just spent a lot of time working with this stuff, googling things I didn't know/understand and reading a _lot_ of documentation.
@PrzygodazUnity
@PrzygodazUnity 2 жыл бұрын
Holy shit, Your TPC/UDP connection series was first thing i tried to do when i started using Unity! Now you give something like this for free. Thanks a lot!
@tomweiland
@tomweiland 2 жыл бұрын
No problem :)
@chrisfonte4987
@chrisfonte4987 2 жыл бұрын
Interesting. I’ve been following your other networking tutorials, is this going to be a similar series? And if so do you think the previous tutorials are going to be helpful still?
@tomweiland
@tomweiland 2 жыл бұрын
The previous tutorials might be beneficial because you'll be writing all the low level code yourself. On the other hand, I didn't do the greatest job at explaining all that so it may not actually help you learn anything. In this series we don't write the super low level stuff and just stick to what applies to the process of setting up mechanics in a multiplayer environment, so these videos will probably also be more beginner friendly.
@santiferreyra3104
@santiferreyra3104 Жыл бұрын
Flaco no te conozco, vi literal medio video tuyo, ya te envíe guita. Sos todo un profesional. Da gusto ver tutoriales así. Da gusto todo el trabajo que haces con la libreria Riptide !
@tomweiland
@tomweiland Жыл бұрын
You sent me money? When? On what platform? I don't think I got anything... Glad you like the tutorials though!
@hansa5867
@hansa5867 Жыл бұрын
This makes me very happy as I from the get go made my game with online as a potential feature. So modifying my game to support this should be very simply.
@tomweiland
@tomweiland Жыл бұрын
👌
@gordonbeeman5387
@gordonbeeman5387 Жыл бұрын
This is lovely, I love this way of networking things. Thanks really much for bringing this to Unity.
@tomweiland
@tomweiland Жыл бұрын
Glad you like it :D
@Rahat2056
@Rahat2056 2 жыл бұрын
I literally just subscribed minutes ago. The timing is impeccable.
@tomweiland
@tomweiland 2 жыл бұрын
Epic :D
@tsunamidev
@tsunamidev 2 жыл бұрын
damn. i learned from photon tutorials so far AND THIS IS SO MUCH CLEARER AND BETTER. (the photon ones were good too, they just werent what im looking for) Your explanations are great, and this system really solves a lot of problems i had before and for the first time i feel like in the future id be able to expand upon the tutorial to make a good game id be proud of. thank you so much for developing and preparing riptide for us, and when ill have the money you can bet ill support you. good job man!
@tomweiland
@tomweiland 2 жыл бұрын
Thank you for the kind words! I'm glad you've found Riptide/these tutorials helpful :D
@imgekko4142
@imgekko4142 2 жыл бұрын
Nice step up in production quality for this video, top job Tom!
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, glad you like it :D
@RobLang
@RobLang 2 жыл бұрын
Not used RipTide but you're absolutely spot on with Mirror. Looking forward to seeing how this tutorial series progresses, great job, Tom!
@tomweiland
@tomweiland 2 жыл бұрын
Glad to hear I didn't say anything dumb about Mirror 😂
@ruhitrai6015
@ruhitrai6015 2 жыл бұрын
@@tomweiland bro can you teach slowly :((
@dumbdev9795
@dumbdev9795 2 жыл бұрын
Idk how i could have missed this vid, but damn nice api. Having so much fun with it. In comparison to mirror its way easier to understand aswell. I know exactly what each method does and know exactly what my possibilities are with this. Thanks a lot.
@tomweiland
@tomweiland 2 жыл бұрын
I tried to name and structure everything as naturally and logically as possible, so it's great to hear you're finding it easy to understand :D
@teomanefe
@teomanefe 2 жыл бұрын
I'm really looking forward to this series. My goal is to build a small MMO game, but I never know where to start. This seems perfect!
@tomweiland
@tomweiland 2 жыл бұрын
Good luck :)
@teomanefe
@teomanefe 2 жыл бұрын
@@tomweiland Thank you!
@MaxIzrin
@MaxIzrin Жыл бұрын
Works well, thank you. Couldn't get the Message Handler to work, kept saying there's no handler for the given ID. Got around it by using the message received event, on client. Nice and simple over all.
@tomweiland
@tomweiland Жыл бұрын
If it's complaining that there's no handler for an ID despite you definitely having a handler method set up for that ID (with the attribute), the method's parameters are probably incorrect. Server-side message handlers are defined by having two parameters (a ushort and a Message instance) and will only be detected/used by Server instances. Client-side message handlers are defined by having only one parameter (a Message instance) and will only be detected/used by Client instances. What probably happened is that your handler method was supposed to be for the client side (or vice versa) but didn't have the appropriate parameters and was therefore not used.
@Ferenc-Racz
@Ferenc-Racz 2 жыл бұрын
I really enyoed your older networking tutorials as well, and I will follow this series also. Thank you for your knowledge sharing. respect! :)
@tomweiland
@tomweiland 2 жыл бұрын
Glad you've found them helpful :)
@extream_salty-_-7711
@extream_salty-_-7711 2 жыл бұрын
Hi i've used ur old network solution and found it very nice and handy!! Good to see that there is way more to do. Scince you had anounced an a devlog that u are working on an updated verion ive waited every day till it is out now
@tomweiland
@tomweiland 2 жыл бұрын
Haha yeah it's finally here :P
@radishmouse22
@radishmouse22 2 жыл бұрын
OMG, I love this new solution and how easy it is to use. This is so cool and I can tell how much you worked on it. I would definitely recommend this solution to others in the multiplayer game dev scene. I used your old solution in a game before and this is a HUGE step up. Can't wait for the future tutorials!
@tomweiland
@tomweiland 2 жыл бұрын
You, sir, sound like you understand Riptide's supremacy on a spiritual level 😂
@radishmouse22
@radishmouse22 2 жыл бұрын
@@tomweiland also, I love the convenience of adding to unity’s package manager. Just a one click update!
@lukass1604
@lukass1604 2 жыл бұрын
I don't know if you've already done this in newer versions of this framework but you could wrap your Client.Connect method which takes a string with another method. Then you would avoid the exposed string parameter. Something like this: public void ConnectClient(ushort ip, ushort port) => Client.Connect($"{ip}:{port}); then only expose this method.
@tomweiland
@tomweiland 2 жыл бұрын
I mean you can wrap it yourself if you like, but Riptide's connect method won't receive a wrapper like that as not all transports take an IP and port as the host address. For example, the Steam transport needs a Steam ID to connect to-a wrapper that takes an IP and port wouldn't work for that at all.
@potsaenamo714
@potsaenamo714 2 жыл бұрын
Real thanks to Tom :3. I'm utterly exasperated on making multiplayer, and now. I found Tom. Everything works!!! You're a good teacher UwU.
@potsaenamo714
@potsaenamo714 2 жыл бұрын
Better and the best :3
@tomweiland
@tomweiland 2 жыл бұрын
Glad to hear it :D
@TheIronicRaven
@TheIronicRaven 2 жыл бұрын
You're the best and your videos are making my dream game a reality! Thank you so much!
@tomweiland
@tomweiland 2 жыл бұрын
Awesome :)
@ActiveYellow1
@ActiveYellow1 2 жыл бұрын
I just wanted to say thank you for your hard work and for this tutorial. It is really appreciated.
@tomweiland
@tomweiland 2 жыл бұрын
Glad it's been helpful :)
@calcumalations1235
@calcumalations1235 2 жыл бұрын
Cant waiit for episode 2, i really want to try making a FPS, ive got my ideas down but i want to make a base before i implement them
@tomweiland
@tomweiland 2 жыл бұрын
Hopefully this weekend 🤞
@calcumalations1235
@calcumalations1235 2 жыл бұрын
@@tomweiland that makes me lucky lol, if I can get the basic things ready I think I can try do it solo for learning purposes, weekends are basically the only time I can code properly
@eboatwright_
@eboatwright_ 2 жыл бұрын
This is awesome! I don't use Unity anymore, but still checking out your videos. :D
@tomweiland
@tomweiland 2 жыл бұрын
What are you using now? Unreal?
@eboatwright_
@eboatwright_ 2 жыл бұрын
@@tomweiland Nah, the Rust programming language with a few libraries called Macroquad, and HECS :D
@vakqdev
@vakqdev 2 жыл бұрын
The return of the king…
@tomweiland
@tomweiland 2 жыл бұрын
😳
@milosancheztv8432
@milosancheztv8432 Жыл бұрын
These tutorial are so good it is almost a crime
@tomweiland
@tomweiland Жыл бұрын
😅
@milosancheztv8432
@milosancheztv8432 Жыл бұрын
@@tomweiland And easily adapble to personal projects. Really loving it.
@tomweiland
@tomweiland Жыл бұрын
Glad you like it :)
@457Deniz457
@457Deniz457 2 жыл бұрын
Wow Unity should really send you some money. Awesome what u just released here❗🔥👌🤩
@tomweiland
@tomweiland 2 жыл бұрын
That would be nice 😂
@btarg1
@btarg1 2 жыл бұрын
Your tutorials are great, I would love to see even more!
@tomweiland
@tomweiland 2 жыл бұрын
There will definitely be more at some point :)
@colin529
@colin529 2 жыл бұрын
Dude I love all of your videos! You're doing a great job and I'm honestly surprised how good you are at this networking stuff. Keep up the good work!
@tomweiland
@tomweiland 2 жыл бұрын
Haha thanks 😅
@MSCardinal
@MSCardinal 2 жыл бұрын
The Return of the King!
@tomweiland
@tomweiland 2 жыл бұрын
😳
@MSCardinal
@MSCardinal 2 жыл бұрын
@@tomweiland Thx for the heart and your content! You have literally the most helpful videos when it comes to networking with Unity. Keep it up! 😊
@larner6903
@larner6903 2 жыл бұрын
Hi Tom, thank you i have been waiting on your Riptide tutorials with great anticipation and i can say going through this part i am really looking forward to the next :) keep up the outstanding work.
@tomweiland
@tomweiland 2 жыл бұрын
Glad you liked it :D
@dyconcz
@dyconcz 2 жыл бұрын
If I wanted to have more servers in my game that would host more PCs, would I just duplicate the script and change the IP address and port?
@tomweiland
@tomweiland 2 жыл бұрын
No, you'd run multiple server applications. Look into devops, Docker containers, and Kubernetes.
@ZaneyOG
@ZaneyOG 2 жыл бұрын
Truly man, thank you. A couple of friends and I are making a first person survival game in the vein of DayZ and Deadside. However, we want to make it open source and implement multiplayer while keeping the complexity elsewhere to a minimum. I genuinely can't express my gratitude enough for making this incredible video and not just allowing others to benefit off of your hard work and talent, but teach them to implement it themselves! I am on the edge of my seat waiting for another video and am excited to learn more!
@tomweiland
@tomweiland 2 жыл бұрын
I'm glad you've found it helpful! Hopefully the next one will be out within the next 2 weeks-good luck with your project :)
@MapleBaconator
@MapleBaconator 2 жыл бұрын
for those of you copying the code. Make sure you call the Connect method in the Start method
@MapleBaconator
@MapleBaconator 2 жыл бұрын
If you are copying and not putting in UI
@tomweiland
@tomweiland 2 жыл бұрын
🤔
@MapleBaconator
@MapleBaconator 2 жыл бұрын
@@tomweiland Sorry. I should really look at what I'm doing before I post something
@RasmusLeonid
@RasmusLeonid 2 жыл бұрын
For some reason, I was skeptical at first, but I'm glad I started using riptide instead of the old solution. it's so much better to work with. Also, I noticed if I had two clients/projects running at once with the old solution, if I wasn't tabbed in, the game would run at like 1FPS, which made testing on one machine very annoying. Idk if that was caused by the networking, but one of the first things I noticed after implementing riptide, was that I no longer had this issue. Also nice that you're working on a transport for steam. Another cool thing would be a transport for epic online services, since(if I understood it right) they offer pretty much the same features as steam, but it works independent from epic launcher and is designed to work on literally every platform.
@straightafitness
@straightafitness 2 жыл бұрын
i have a question: is there a player that has a specified client that is host and not a server?
@tomweiland
@tomweiland 2 жыл бұрын
I'm glad you're enjoying Riptide! I've added the Epic transport to my things-to-look-into-eventually list, but I have no idea how soon I'll get around to that. I'm also not sure how that would work considering Riptide is built in C#-is there a C# API/wrapper for their online services stuff? _"if I had two clients/projects running at once with the old solution, if I wasn't tabbed in, the game would run at like 1FPS"_ That's very strange...my initial thought was that maybe you had the Run in Background option disabled in one/both of your projects, but if that was the case it should stop completely when you tab out, not run it 1fps 🤔 The old networking solution is/was substantially slower than Riptide, but unless you've got quite an old computer, I don't think the networking solution alone (in otherwise equally performance-intense projects) would make a large enough performance difference to go from 1fps to no noticeable lag...
@RasmusLeonid
@RasmusLeonid 2 жыл бұрын
@@tomweiland Sweet! EOS has a C# SDK but their documentation is far worse then the one from streamworks, and there is way less information about it from what I could see. Maybe that's just because I'm somewhat used to the steamworks stuff now though. About the 1fps thing, I'm also having my doubts that it was caused by the networking alone, but at least I don't seem to have the issue at the moment.
@rgwritescode809
@rgwritescode809 2 жыл бұрын
Niiiice! New series! Keep up the good work man!
@tomweiland
@tomweiland 2 жыл бұрын
Yeah, and this time it's not at light speed 😂
@rgwritescode809
@rgwritescode809 2 жыл бұрын
@@tomweiland I really want to thank you for the before series on multiplayer setup, you taught me a lot! Can't wait to see how this series goes, for sure I will learn a lot from this too.
@tomweiland
@tomweiland 2 жыл бұрын
Glad to hear it! I'm hoping to get into some more advanced stuff in this series, seeing as how Riptide takes care of most of the basics.
@fluffypancakes1281
@fluffypancakes1281 2 жыл бұрын
So, the way this networking solution works, is it run on the creator's router and computer? Or is it run on specific servers, or by the computer which is hosting the room?
@tomweiland
@tomweiland 2 жыл бұрын
That's entirely your choice, but if you're publicly releasing your game you probably don't want to be running the server on your personal computer.
@maddocksjos
@maddocksjos 2 жыл бұрын
Hey nice. Been waiting to see what you were working on. You have not disappointed
@tomweiland
@tomweiland 2 жыл бұрын
Glad to hear it 😅
@bakerfx4968
@bakerfx4968 2 жыл бұрын
Thank you! Looks great! I can’t wait to get into it tonight!
@tomweiland
@tomweiland 2 жыл бұрын
Awesome :)
@joshuafhiggins
@joshuafhiggins 2 жыл бұрын
POGCHAMP, I would totally donate to keep this project running if I could!
@tomweiland
@tomweiland 2 жыл бұрын
Don't worry about it if you can't, and definitely don't give me money you need for yourself :P
@GodBurstPk
@GodBurstPk 2 жыл бұрын
Anyone who installed the package through git and is using vscode but RiptideNetworking namespace is not recognized: In unity open "Edit -> Preferences" select the "Extenal Tools" section and click the "Regenerate project files" button.
@tomweiland
@tomweiland 2 жыл бұрын
Yeah, regenerating project files seems to solve a lot of issues related to packages :P
@GodBurstPk
@GodBurstPk 2 жыл бұрын
@@tomweiland yeah recently had problems with code detection in vscode, installed the package but it wasn't detected, seems most namespace resides there, still more a fan of using actual namespaces but each framework has there negatives
@AkshayGupta-dd4ht
@AkshayGupta-dd4ht 2 жыл бұрын
I think I got what I want because there is some problem with your old code but old is gold I thank you for that too. looking forward to it and very excited, then NO WAY HOME🤣🤣
@tomweiland
@tomweiland 2 жыл бұрын
👍
@resourcezander
@resourcezander 2 жыл бұрын
I thought you had to add 2 scene's but no you have to make 2 projects this is hard for my little brain i will do this tmrw
@tomweiland
@tomweiland 2 жыл бұрын
You can also do it all in one project, and that's probably better for large projects. However, 2 separate projects helps demonstrate the separation between server and client, which I think is useful when you're first getting started with multiplayer.
@resourcezander
@resourcezander 2 жыл бұрын
@@tomweiland but when i make seprate scenes in one project everything i do is done in both scenes plz help:)
@tomweiland
@tomweiland 2 жыл бұрын
Yeah if you want to follow the tutorials, you either need to know enough about Unity/C#/multiplayer to be able to convert everything I do into a single project on the fly, or you need to use two projects (and maybe convert it later).
@resourcezander
@resourcezander 2 жыл бұрын
@@tomweiland got it thanks
@iHouqLF
@iHouqLF 2 жыл бұрын
Great Tutorial, but what theme are you using in VS?
@tomweiland
@tomweiland 2 жыл бұрын
It's not any existing theme-I just manually changed the colors of stuff in the settings.
@blablu2475
@blablu2475 Жыл бұрын
Don’t drop this great serie. Don’t drop this libary 🎉
@tomweiland
@tomweiland Жыл бұрын
I'm not dropping the library but I have no plans to continue this series.
@joeyscott2256
@joeyscott2256 2 жыл бұрын
Wow, Riptide is pretty sweet, great job.
@tomweiland
@tomweiland 2 жыл бұрын
Glad you like it :D
@ImHamsome
@ImHamsome 2 жыл бұрын
Finally very glad to see a new network tutorial looking forward to it :D
@tomweiland
@tomweiland 2 жыл бұрын
Yeah it took a while :P
@ThatGamePerson
@ThatGamePerson 2 жыл бұрын
Wow did you read my mind? I literally just started working on something like this to play around with
@tomweiland
@tomweiland 2 жыл бұрын
I wish I had that ability 😅
@danuvip
@danuvip 2 жыл бұрын
finally another chance to get into multiplayer! thanks god!
@tomweiland
@tomweiland 2 жыл бұрын
😅
@pchead54
@pchead54 2 жыл бұрын
hippity hoppety your code is now my property -Dani
@tomweiland
@tomweiland 2 жыл бұрын
Yoink
@werlog6682
@werlog6682 2 жыл бұрын
I'm not sure if this is already mentioned in the tutorial but in case you are experiencing a bug where the server/client isn't sending messages when minimized just add this line of code in the start method of a script: Application.runInBackground = true;
@tomweiland
@tomweiland 2 жыл бұрын
You can also set this in the project settings and avoid having it in the code. The reason it's not mentioned in the video is because in the version Unity that I was using it was enabled by default-it seems they've changed that in newer version, which is odd.
@CiarantDev
@CiarantDev 2 жыл бұрын
stupid question but is there a way to play with other poeple without using port foward ?
@tomweiland
@tomweiland 2 жыл бұрын
A lot of games run relay servers and have the servers hosting games, so even when you click "host" and it _seems_ like you're hosting the game, you're technically not-you just have get special permissions that allow you to change game settings and stuff. You can also use relay services like Steam's networking.
@phee3D
@phee3D 2 жыл бұрын
Hey Tom, a question: in the rudplistener class I noticed that you are constantly listening for messages in a while loop. I tried to find when you break it but it seems you don't break it as long as the connection is required or if there is an error. If this is true, does it mean that every single player in the game will have its own separate rudp client on the server which is constantly listening for packets from that player, hence having a separate thread for every single player? and if that is also correct, does this mean this only works because you run the Receive packets loop on a separate thread? since otherwise it would freeze the whole application if you do it on the main thread.
@tomweiland
@tomweiland 2 жыл бұрын
No, RudpClient contains client-side logic for clients and is not used at all by any server-related code. An RudpConnection instance is used to represent each client on the server-side, but that doesn't inherit from RudpListener. RudpServer inherits from RudpListener and runs a single receive thread for _all_ connections.
@phee3D
@phee3D 2 жыл бұрын
@@tomweiland ohh, that immediately makes sense. Thankyou!
@GFXGamerGirl
@GFXGamerGirl 2 жыл бұрын
Sorry to bother you. ive finished this first tutorial part for making this mutiplayer game. Everything is working fine but when the client disconnects from the server. The player game object doesnt get destroyed. The code is correct but its only destroying when the server is closed fully. So even if i disconnect on the client version the player gameobject doesnt destroy itself. Any idea why. Also when i put in AddUShort and AddString on the Player Script on the server side it gives me errors so not sure what to do for that.
@tomweiland
@tomweiland 2 жыл бұрын
If I remember correctly we address the player not being destroyed in the second video. As for the errors you're getting, if you need help with those I recommend joining the Discord server and asking there-troubleshooting here in the comments is a pain.
@d0c_dev
@d0c_dev 2 жыл бұрын
hey so my project has got to a point that having 2 separate projects is really hard to maintain, how would i go about merging the server and the client into a single project, how would i go about managing the scenes as the server uses a type of scene and the client another one
@tomweiland
@tomweiland 2 жыл бұрын
If you're building a player hosted game, take a look at the player hosted demo in the repo.
@elaivelite
@elaivelite 2 жыл бұрын
It's amazing to find so quality tutorial! Thank you so much! I have a question: why Riptide, not Photon you choose?
@tomweiland
@tomweiland 2 жыл бұрын
I've never used Photon, but the idea of having an arbitrary CCU limit imposed on me just for using a certain solution (even if you host your own servers) doesn't really appeal to me. Also most of the people I've talked to who have used Photon said they didn't really like it 😅
@arshpreetsingh5186
@arshpreetsingh5186 2 жыл бұрын
Can you please provide documentation for Riptide
@tomweiland
@tomweiland 2 жыл бұрын
In case you don't know, everything _is_ documented and explained via XML doc comments (which should also show up in your intellisense when hovering over stuff), but yes, putting all that onto an actual site is on my list of things to do.
@arshpreetsingh5186
@arshpreetsingh5186 2 жыл бұрын
Thanks 👍
@arshpreetsingh5186
@arshpreetsingh5186 2 жыл бұрын
I have created a fps game and It works really great . Thanks and great work.♥️
@RGGBMGO
@RGGBMGO Жыл бұрын
Hello, I am having a problem connecting by putting an IPv6 address as the client IP. I got this IP by using a script and it gets device IP automatically, but instead of debugging an error, it debugged a message showing "Connection to server failed". Do you know how to fix it?
@tomweiland
@tomweiland Жыл бұрын
Can you connect if you manually enter the host computer's IPv6 address? How does your IP retrieval script work? Are you sure it's retrieving the IP of the host computer and not the IP of the computer it's being run on? I'd recommend joining the Discord server and asking about it there, the KZbin comments section isn't really suited to this kind of question/discussion.
@MrIndiemusic101
@MrIndiemusic101 Жыл бұрын
Out of curiosity does riptide support something similar like fishnet's network animator? How are you using riptide to manage animations of characters or is that handled client side somehow.
@tomweiland
@tomweiland Жыл бұрын
Riptide is a much lower level library than Fishnet, and as a result there are no built in components that "magically" synchronize parts of a project for you. I admittedly also have not dealt with animations _too_ much in my own project, but so far it has been mostly sufficient to ensure other parts of the game state are synchronized (and then the animations can be played based on that), though in some cases I do sync specific animation-related data.
@tp-xk8ns
@tp-xk8ns 2 жыл бұрын
Awesome ❤️❤️, can't wait to see next part 😁
@tomweiland
@tomweiland 2 жыл бұрын
😅
@PowerSkor
@PowerSkor Жыл бұрын
Thanks for the awesome video! Small question, Unity released Netcode for GameObjects, is this a better alternative or when do I want to use this instead of the Unity one? Your solution is a dedicated server instead of the Unity one where it seems that the server is also inside the client project, which is annoying for larger projects? Also how secure is Riptide for eg people trying to hack and send fake messages to the server.
@tomweiland
@tomweiland Жыл бұрын
Riptide and NGO aren't really comparable as they operate at quite different levels of abstraction (NGO is far more similar to Mirror than to Riptide). Riptide can be used to build a dedicated server or a client-hosted game, and as far as I know, NGO is capable of both of those things as well. As for security, Riptide is basically as secure as you make it-out of the box it doesn't deal with session tokens or anything like that.
@mehmetchad
@mehmetchad 2 жыл бұрын
WOHA NEW SERIES LETS GO
@tomweiland
@tomweiland 2 жыл бұрын
🥳
@lgent2435
@lgent2435 2 жыл бұрын
Hello, is there any tutorial to make Riptide's RPC, client-server prediction, lag compesation, and reconciliation?
@tomweiland
@tomweiland 2 жыл бұрын
Not that I'm aware of, no.
@mary-os
@mary-os Жыл бұрын
Hey, just wondering, could people steal all my data -- including IP, location, etc -- with this?
@tomweiland
@tomweiland Жыл бұрын
Anyone who connects would be able to see the IP of the host computer, so yes, if you host the server(s) on your personal computer, people would have access to your IP. However, that's not something you want to do for a released game anyways because then you need to have your computer on 24/7 and eventually (if your playerbase grows) you wouldn't have sufficient processing power to run enough servers. This is just how the internet works though-if you visit a website, you can see the IP address of that website, and the webserver can see your IP too. The solution to this is to use cloud hosted servers so that people can connect without getting access to your personal IP, _or_ if you're releasing your game on Steam, you can take advantage of Steam's free relay system to mask your IP (like a VPN).
@ethankuhrts2799
@ethankuhrts2799 2 жыл бұрын
Seems great so far, one thing I've been wondering since your previous networking solution, is there a way to run a client and a server in the same instance at a time for example someone may want to host and play at the same time and let friends connect to them. are there any big complications to changing to that sort of setup on my project?
@tomweiland
@tomweiland 2 жыл бұрын
I actually just added a player-hosted demo project to the repo the other day: github.com/tom-weiland/RiptideNetworking/tree/main/Demos/Unity/PlayerHostedDemo However, it's making use of a feature (the auto message relay stuff) that will be in v1.2.0 (hoping to release that in the next few days) but which doesn't exist yet in the current version.
@honakna2117
@honakna2117 2 жыл бұрын
I am new into networking in C#. I have only used Photon before and I didn't like it for the same reasons you said, If I want to test it with someone else what will i do with the server? Will i build it or leave it like that and what will the other ones do with server? Sorry for asking a lot of questions but i really don't know😅😅
@tomweiland
@tomweiland 2 жыл бұрын
You can build the server or run it in the editor. In order to have a friend connect from a different network, you'll need to portforward the port that the server is listening on (in your router settings) and then change the IP that clients connect to to your public IP.
@honakna2117
@honakna2117 2 жыл бұрын
Meaning that the server should be always running on my machine right? Cuz i really want to use Riptide
@tomweiland
@tomweiland 2 жыл бұрын
If you release your game, you'll always want a server running (otherwise players wouldn't be able to connect and play), but you definitely don't want to do that on your own computer unless it's only your friends/people you trust playing. Even then, having your computer on 24/7 is suboptimal, so you'd most likely want/have to pay for server hosting.
@honakna2117
@honakna2117 2 жыл бұрын
Thanks alot♥️
@eleocraft278
@eleocraft278 2 жыл бұрын
Is it possible to use riptide to make a localhost game like most multiplayer survival games (and for example muck from Dani)? Or do I need to pay for servers
@tomweiland
@tomweiland 2 жыл бұрын
Yep, you can build lobby based games with it, and if you want to avoid server hosting costs you can use something like Steam's relay services (which is what Muck does). You'll need Riptide's Steam transport if you want to do that though, and like I mentioned in the video, it's functional but still in development: github.com/tom-weiland/RiptideSteamTransport
@eleocraft278
@eleocraft278 2 жыл бұрын
@@tomweiland ok thanks, this is exactly what I wanted to know. Looks like I will be using riptide for the game I am working on 👍
@StarriApps
@StarriApps 2 жыл бұрын
This is really awesome! Really looking forward to the complete series! Is this udp or tcp based or both? 🌟
@tomweiland
@tomweiland 2 жыл бұрын
Riptide's default transport uses only UDP.
@enderduck4253
@enderduck4253 2 жыл бұрын
It's RUDP or Reliable UDP, so you're retaining UDP's speed but you can still send information reliably if you need to.
@Nervniyak
@Nervniyak 2 жыл бұрын
How would you proceed with making Host&Play option? A lot of players have no idea what dedicated server is or how to run it. How do we implement it while having client and server as 2 different projects?
@tomweiland
@tomweiland 2 жыл бұрын
You can combine the client and server code into one project if you want to allow players to host games.
@Nervniyak
@Nervniyak 2 жыл бұрын
@@tomweiland But how would you do that, if you already have dedicated server project built with it's own "mindset". Are games really built as one project for host&play and dedicated? I saw that unity's sample FPS has custom tools to create different builds for client and dedicated server from one project. But it was beyond my comprehension. And I remember Unet which allowed to host and join out of the box. Because general gamer doesn't know anything about hosting dedicated server all they want is to buy game in Steam, launch it and press Host (to Host & Join via Steamworks). Dedicated is good for games where regular players are not supposed to host lobbies.
@tomweiland
@tomweiland 2 жыл бұрын
Take a look at the PlayerHostedDemo in the RiptideNetworking repo, or at the example scene in the RiptideSteamTransport repo.
@ndrcreates_per
@ndrcreates_per Жыл бұрын
You're a real genius
@tomweiland
@tomweiland Жыл бұрын
I'm not sure about that 😅
@matheusdev726
@matheusdev726 2 жыл бұрын
Could you please add a matchmaking system to Riptide Networking?
@tomweiland
@tomweiland 2 жыл бұрын
That's kind of out of the scope of a networking library like this, so most likely not (at least not any time soon).
@matheusdev726
@matheusdev726 2 жыл бұрын
@@tomweiland It is a room system where only players who are in the same room will have the data synchronized 4 years ago Kevin Kaymak posted a video showing this matchmaking system
@Errors404
@Errors404 2 ай бұрын
What type of game is Riptide best for? Will it work well with fast pace shooting game efficiently? Should i learn the previous tutorial which is said to be outdated to know the inner workings in case i wanna tweak or make my own? or is this tutorial enough for any customization?
@tomweiland
@tomweiland Ай бұрын
Because of how low level it is, Riptide doesn't really have any particular strengths or weaknesses when it comes to game genres. You can pretty much use it for any type of game. Riptide was a full rewrite of the internals, so while the old networking tutorials may teach you a thing or two about socket networking in general, it's not exactly going to give you a thorough understanding of "the inner workings" of Riptide (could still be helpful though). This tutorial series will show you how to use Riptide-if you want to understand the internals you'll have to dive into the source code but everything is pretty well documented/explained, if I do say so myself 😅
@Errors404
@Errors404 Ай бұрын
Thanks man. I really appreciate you replying to every comment here and clearing doubts (I personally wouldn't be able to😂)
@famoviem4157
@famoviem4157 2 жыл бұрын
Yeahh ❤️ Thanks tom. Quick question, in this series you'll implement create room? if don't, it possible to implement create room using this series? anyway thanks for this 🙏
@tomweiland
@tomweiland 2 жыл бұрын
I don't think I'll cover lobby systems in this series, but it's definitely possible to implement that with Riptide.
@danielspears5984
@danielspears5984 2 жыл бұрын
Can’t wait for next video Tom
@tomweiland
@tomweiland 2 жыл бұрын
Soon...
@EwrybodyTube
@EwrybodyTube 2 жыл бұрын
I like it a lot. I definitely will use that in my feature projects
@tomweiland
@tomweiland 2 жыл бұрын
Awesome :)
@indiangamerafraz5402
@indiangamerafraz5402 2 жыл бұрын
i was waiting for 3 years
@tomweiland
@tomweiland 2 жыл бұрын
That's a long time!
@indiangamerafraz5402
@indiangamerafraz5402 2 жыл бұрын
Yup
Adding Player Movement | How to Make a Multiplayer Game - Part 2
14:37
Why Making Multiplayer Games SUCKS
6:46
Tom Weiland
Рет қаралды 434 М.
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 18 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,2 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 36 МЛН
P2P or Dedicated Servers? What's the best for your unity game?
7:35
Jason Weimann (GameDev)
Рет қаралды 10 М.
How to: Unity Online Multiplayer
24:47
Tarodev
Рет қаралды 238 М.
How I Fixed the Ocean in My Pirate Game
6:04
Tom Weiland
Рет қаралды 84 М.
Recreating Balatro's Game Feel | Mix and Jam
7:21
Mix and Jam
Рет қаралды 65 М.
Multiplayer Game Architecture in Unity
15:21
Shrine
Рет қаралды 156 М.
7 DEVS Make a GAME without COMMUNICATING! (we never saw this coming)
20:12
How to Make a Multiplayer Game with DOTS - FULL COURSE
5:52:22
Turbo Makes Games
Рет қаралды 28 М.
Why Unreal Engine 5.5 is a BIG Deal
12:11
Unreal Sensei
Рет қаралды 1,2 МЛН
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 18 МЛН