The amount of time i spent figuring out how to do this on my own is a crime... Thank you for this golden gem, I almost gave up working on my dream game because of multiplayer complications if it was not for you...
Thank God I found this channel, for the local to the steam servers.This channel is must watch for any Godot programmer looking to delve in multiplayer and I love it. My motivation for making games just sky rocketed. You better make a multiplayer tutorial for making dedicated servers for android ,if you do that ...oh my God.I really need it for android though.
Haha thanks! Glad it is helping! This should work for android, you can just hardcode the DNS of your server in the app. There are some improvements to that, like maybe you can have a "lookup" service that returns your active server DNS, but that's getting into production architecture...
Dude you’re such a beast. I love the incremental building method you’re doing where you’re slowly teaching methods by building on previous stuff. Going to finish video later but wanted to note that 5 minutes in and you’re already impressing me by teaching a very basic idea of how to do a dedicated server
@@BatteryAcidDev This video was really good! I think what could’ve been a nice in-between before jumping to AWS is showing how the server build could’ve been run on your machine and port forwarding could’ve been an option with playing with your friends but comes with the problem of not being a *dedicated* server that runs always unless you want to run your machine 24/7 (hence the AWS option comes to fix that). I understand though the scope is more oriented to dedicated servers in particular and honestly this is probably something I can figure out myself with the foundation you gave in this video. But just something I thought about as I went through this video! Keep doing what you’re doing cause I love the production quality and educational value of your videos :)
I love where you went with this video, maybe also adding splitscreen and a mixed mode where splitscreen and network are combined would be interesting to see
This was a great intro to dedicated servers! Never actually got around to implementing one. Really looking forward to the improvements video and all that is to come!
super interested in seeing what was done to improve latency. I'm not familiar with godot at all, but every time I see one of your videos, it pushes me more and more towards it! It seems really nice to work with in multiplayer situations these days! Keep up the amazing work!
I'm struggling through the latency issues as we speak, it is not an easy task! I think there's only so much you can do before you just have to spin up a new server closer to the player! But yea, I'm also excited! Thanks for watching!
Hey quick question, when you exported the dedicated server, you built the server logic into the client app? I always thought you'd build them separate with a shared library between them for assets.
You CAN do that - each approach (and there are a few) has it's own set of challenges, but for these beginner videos, I'm going to keep everything in one project. I don't want to deviate too far away from the original Brackeys project.
Hello, thank you very much for this explanation. This is going to help me a lot. I'm very curious how you will tackle latency issues. 👍👍 In addition, I may have some inspiration for future projects: - create a lobby (with a list of active servers to join) - Working with different levels. (only see players who are in your level) - Saving player states (also regristration / login page)
You're welcome! Yea I'm going to work on the lag issues soon! Thanks for the feedback! I already have a whole series on creating lobbies (not Steam, coming soon!) but the rest of those are in the queue! Thanks for the inspiration! ruclips.net/p/PLOtt3_R1rR9WrcyDRsRF3oSrzffmBtJbu
Loved this video, definetely feels like an improvement on the last one. I'm just coming back to game dev after a year or two of mostly doing art but I'd be glad to help you out, already joined the discord.
You should spend some time chatting about how to do a Graviton build for the dedicated server. That will make this the best video ever! Probably would have been good to do this with CDK as opposed to having people logging into a server and ssh'ing to the remote linux server and all that.
I think the Graviton route would be interesting to look at! This is an introductory video and having beginners go through the CDK process would be a bit advanced for this stage, but it’s definitely a powerful tool!
@@BatteryAcidDev Don't disagree, but there are so many more steps to get wrong doing it in the console. Especially making sure everything is undeployed or that you aren't creating multiple EC2 instances. Would gladly create a video or work with you on one that can do this in a container and all that.
Haha there's no silver bullet for fixing latency, as most gamers will have experienced that even on the biggest titles... However, I hope to look at some strategies to make it a little more tolerable! Thanks for feedback!!
Yeah, that's far out of scope for this particular topic. What I think you would be interested in is net coding, which isn't specific to Godot but just general coding philosophy. You can't really "fix" latency, but what you can do is program FOR it, if that makes sense. I obviously won't dive too deep in a comment & i'm not super confident in my knowledge with it yet but the idea is that you just code everything around the idea that the internet isn't perfect. Simplify as much as possible, rely more on signals & pure data server side, and anything and everything you can get away with pushing to the client, should probably be handled on the clients end. Etc. For example Client side: renders anims, graphics, handles input, handles logics, etc., Server side: only takes the outputs of client side's data & updates server side to match it, and sends simply that information to the rest of the players, then making their clients do all the hard logic to update to the new information set. Using prediction methods for the most part with controlled update-sync intervals type thing that just occasionally makes sure everything matches, and if not, quickly interpolates between them or what have you. It's more about making sure what happens client side simply matches what happens server side, because you cant fix latency.
Can you please make a tutorial about how this dedicated server has multiple instances ? Maybe orchestrating with swarm or k8s etc. THAT WILL MAKE MY DAY :)
I don't have plans to do that right now, but that is in the pipeline. I'm focused more on beginner friendly content but I do see that as an ultimate goal, to get to that level of scaling/clustering. There are various services out there you can use to achieve this, probably look at a Dockerized build of your game's backend and leverage some service to handle that for you. I know AWS/Google/Microsoft has that, but there are also game engine specific implementations: W4 (Beta), OpenGB (Just found them).
Friend of Brazil? I'm also from Brazil! (if the translation is bad, sorry 😂) For you promised and brought. I'm not a professional programmer, but I started a project with my brothers. An online MMO RPG, with just 5 players at the start. A game focused on traditional tabletop RPG but in 3D and active combat, where each campaign would be unique thanks to a huge probability options. All of this created in Godot if everything goes well. However, I admit to being sad when I couldn't make the multiplayer actually work and you made me hope again! If you want help, with online testing or whatever comes up, it will be a pleasure to collaborate and learn! You've already helped a lot and I'm sure that when my ambitious and giant project progresses I won't forget the initial encouragement to continue with the dream!
@@Olixis Salve cara! Ainda estamos em desenvolvimento e decisão de mecânicas, mas assim que concluirmos nosso primeiro grande mapa lançaremos o Alfa 1.0 e te dou acesso para teste e dicas é claro! Assim que dominar o multiplayer lançaremos o beta! Esse projeto é gigante, será um prazer ter sua participação logo nas primeiras campanhas teste!
Yes we had people around the world helping me test, including Brazil! Glad you were able to be inspired by these videos! Please join the discord if you want to participate in my journey! Thank you!
with your networking skills you should make a small but scalable 2d mmorpg template for godot4. with a dedicated server and player data persistence and chat window. That would be a precious resource for beginners.
Well, I'm kinda working towards supporting those things you mentioned, but it could be used in any game type (2D, 3D, etc). It just takes time to get through all those things a week at a time! So stay connected!
and about database connection...? usually this is the hardest content to find about engines and frameworks. if you find how to do it, bring to us, please!
Glad to hear! Well that's two different approaches. Steam networking is using their networks and is going to be P2P. I'm not 100% if they have a dedicated server host, I'm doubtful, but the approach in the video will be a dedicated server approach, so no P2P. You CAN use Steam to setup your lobbies and then once ready to play you can probably send them the IP to connect to your dedicated server. I'm going to research that some more and see if it's possible. I would be surprised if it wasn't. I'll put out a video on this once I can get to it!
id be curious how character data and items like inventories and player login and signups could work. been googling around for this a bit and there is some stuff out there but nothing very cohesive.
Hey BAD, awesome tutorial. Thank you very much. I was wondering how could this be more scalable? I mean, this way, we have a player limitation defined by the MultiplayerSpawner, and also all players will be playing the same game. How would it work to have multiple instances of the game, so a thousand of players could play with their friend different instances? I guess we would need the dedicated server to be a matchmaking and electing one of the players to be the server, but then the code of the server would be completed different from the client. Would be nice a tutorial showing that.
Thanks for watching! Yea that's a whole other discussion - scaling for games - which greatly depends on your game's requirements. It's hard to make a generic video on things like that. I do plan to work my way through some scaling techniques, but that's a bit off into the future... Stay Connected!
*EDIT: I was not using the correct command, Battery Acid Dev helped sort me out though. Gonna leave my comment up in case anyone else makes the same mistake I did* One nasty little hang up that I ran in to that I want to share with fellow Windows users. Sometimes when you try to login with SSH even after you have changed permissions on your keypair file it will still deny you. Turns out that it can also be really picky about which user name you are logging in with. So my final command I used to login to the linux server ended up being: ssh -l ec2-user -i So basically what the -l flag does if I understand correctly is it changes your login name, and by default I think that the cloud is looking for ec2-user. Hope this helps someone!
Thanks for the tip! I'm suprised my command with appending ec2-user@ didn't work the same way. I thought it would essentially be the same command... but Windows is funny like that 🤷♂️
@@BatteryAcidDev you know what, now that I am looking back at it I did not notice you appending ec2-user in your command that was my bad, just an oversight on my part. Now that I tried it with the correct command as demonstrated by you in the video it works perfectly. 👍
Question for you. Do you think in the future that you will be making a video where you can have a server and client in the same program. This is needed if you want to have a server with a gate way and authentication server that they all connect to. game development center made a video set on it but it's for Godot 3 and not Godot 4.
All my videos so far have client/server in the same project... There are several ways to setup authentication, just depends on what your requirements are. Can you link to that video here so I can take a look to have a better idea? Thanks!
Save! Great work. I have a project already underway, but I would like to make use of multiplayer (to make it possible to play with friends from other networks), I've seen the possibility of using "Firebase", do you know that? But following your tutorials, which video should I start with? What was the best method you found so far?
Thanks! I don't have much experience with Firebase (maybe I'll dive into it soon!), but as far as I can tell, it's for web hosting, so not this. Dedicated servers are for deploying a server build of your game. If you wanted to make a web based game, you could host it there. I believe Firebase offers support for database functions and other things, so if you are looking to host a web game, you may be able to get everything you need there, but again, not 100% sure. Maybe someone else can chime in.
@@BatteryAcidDev Got it. Of all the methods you use, including some information about Steam and more, which one do you think is best? Do you have a video tutorial? If you do, please send it to me so I can follow it. Thank you very much for your attention.
@@BatteryAcidDev 3D adventure and combat game, which requires something like creating a lobby that has capacity for a maximum of 4 or 6 players. Can you understand me?
How does the export as dedicated server work? While working on my game, i have everything set as two different projects (clint and server). So when i saw thought i was very confused. Also, is tour first multiplayer video p2p?
If you have two separate projects, you only need to export your server one as a dedicated server. Most devs will start out with everything in a single project (client/server). All of these videos are p2p enabled, meaning, you operate one of the peers as a host and have other clients connect to it. However, the first video out-of-the-box only really supports p2p locally or on a LAN. So you'd have to make some adjustments to make it p2p to the outside world. I do have a couple videos later on that details how to do that with Steam.
Thank you for this great tutorial. What if I need to make a simple 2d online multiplayer game that runs on my website without this host button? I mean all players are connected to a server like AWS instance you created. Would you give me the steps to do this? Also, could I use AWS as you used? I am new to multiplayer game development and I don't know much or how things work.
Browser based games have their own set of challenges! Sounds like you want to host your game where there's an index.html as an entry point. You could do that in a similar manner as this video but instead, you'd just need to start a local webserver (or nodejs or whatever you're using) to run it on the instance. The host button in this example is not relevant, it's just there from the last video. Players would then just go to the DNS of your server running the game. There are several ways to tackle this but that's the gist of it!
lets say your server reached maximum capacity and you made the server expand dynamically in the future if you add chatting system how do you link between the two server chats to make it global? or do you make a standalone chat server and players write [msg,id,player_name] to it and then the server rewrite it in the other servers box chat? sry if my english is bad 😔
I would make your chat system separate, independent of your game servers. It may be a more complicated setup to manage addition components of your architecture, but I would do that for a production game. You could leverage their user_id or whatever you use to identify them. Your example data structure sounds like a good start! Yes, that's how I would do it. A Websocket is a really nice way to make a chat server, I have several videos on that: ruclips.net/video/9_HFMulPNls/видео.html ruclips.net/video/P-1oD2R3HYE/видео.html
If collecting money is event based, like with an RPC, then they may not see it if they join after the event has passed. However, if you are synchronizing a variable for money that you update, when a new player joins, they should get the latest amount.
Dedicated servers and web(html5) builds are two different things. You can build your game to run on a server (linux) and act as a "backend" server for your game. A WebGL build (web) is hosted on an http server, basically anywhere you can host webpages. I think if you want your game to be web based, you'd have to use different technology like WebSockets for communication. So I guess you could build a dedicated server as a WebSocket server for your front end game. But I would probably use some other tech at that point, like Nodejs or something.
Yea mean like this: docs.godotengine.org/en/stable/classes/class_ip.html Also check this out: forum.godotengine.org/t/how-to-get-local-ip-address/10399
@@BatteryAcidDev Thx just what I needed, and please go on with info about networking in game development, especially Godot because Iwill not return to Unity. I develop for handicaped people and they will be thrilled when I let them play in a network. A big THX from me and my clients (human 🤗) !!!!...
That can happen if you are far away from the server. Also, this current setup hasn't been optimized for lag compensation. I plan on covering that soon, so stay connected!
Yes that video has been viewed almost a million times, I think it’s smart to build on top of that success and bring more attention to the power of Godot!!
please make and post the improvement video too!!! This stuff is gold! please continue making such awesome videos
Working through it now! Thanks for tuning in!
The amount of time i spent figuring out how to do this on my own is a crime... Thank you for this golden gem, I almost gave up working on my dream game because of multiplayer complications if it was not for you...
Glad it helped! 👍
Never be ashamed of trying to figure out something on your own
this is the best godot multiplayer tutorial i've seen
Happy to hear that! Thanks for watching!
This channel is actually a gold mine, you are criminally underrated sir, don’t stop doing what you’re doing it’s awesome
haha thank you!
Thank God I found this channel, for the local to the steam servers.This channel is must watch for any Godot programmer looking to delve in multiplayer and I love it. My motivation for making games just sky rocketed. You better make a multiplayer tutorial for making dedicated servers for android ,if you do that ...oh my God.I really need it for android though.
Haha thanks! Glad it is helping! This should work for android, you can just hardcode the DNS of your server in the app. There are some improvements to that, like maybe you can have a "lookup" service that returns your active server DNS, but that's getting into production architecture...
@@BatteryAcidDev thank you but could you maybe explain and do it in like a 5 min video, would really appreciate it.
Dude you’re such a beast. I love the incremental building method you’re doing where you’re slowly teaching methods by building on previous stuff.
Going to finish video later but wanted to note that 5 minutes in and you’re already impressing me by teaching a very basic idea of how to do a dedicated server
I appreciate that! Let me know what else you'd like me to cover!
@@BatteryAcidDev This video was really good!
I think what could’ve been a nice in-between before jumping to AWS is showing how the server build could’ve been run on your machine and port forwarding could’ve been an option with playing with your friends but comes with the problem of not being a *dedicated* server that runs always unless you want to run your machine 24/7 (hence the AWS option comes to fix that).
I understand though the scope is more oriented to dedicated servers in particular and honestly this is probably something I can figure out myself with the foundation you gave in this video. But just something I thought about as I went through this video!
Keep doing what you’re doing cause I love the production quality and educational value of your videos :)
I'll probably circle back to this approach ...
This is amazing, you’ve explained how dedicated server works perfectly, looking forward for more advanced features
Thank you! That's the goal!
You are doing such a good job educating new developers. Im not at a level where this is useful yet, but I watch them anyways. Thank you for the effort
I appreciate that! Thank you for watching!
I love where you went with this video, maybe also adding splitscreen and a mixed mode where splitscreen and network are combined would be interesting to see
Thanks, I appreciate the feedback!
Wow,. I didn't realize the multiplayer tools that Godot had. That's really easy to create a cloud server,
Yea to get something up and running is fairly easy!
super underrated tutorial thanks a lot
Glad it helped!
Dude thanks, i been learning Godot and knowing it can be used for multiplayer games is great.
Yea and it's only going to get better!
This was a great intro to dedicated servers! Never actually got around to implementing one. Really looking forward to the improvements video and all that is to come!
Thanks! It may be a couple weeks but I’ll get there
super interested in seeing what was done to improve latency. I'm not familiar with godot at all, but every time I see one of your videos, it pushes me more and more towards it! It seems really nice to work with in multiplayer situations these days! Keep up the amazing work!
I'm struggling through the latency issues as we speak, it is not an easy task! I think there's only so much you can do before you just have to spin up a new server closer to the player! But yea, I'm also excited! Thanks for watching!
Hey quick question, when you exported the dedicated server, you built the server logic into the client app? I always thought you'd build them separate with a shared library between them for assets.
You CAN do that - each approach (and there are a few) has it's own set of challenges, but for these beginner videos, I'm going to keep everything in one project. I don't want to deviate too far away from the original Brackeys project.
This is what I'm trying to find from 3 mi!!! Sir you are amazing ❤
Glad I could help!!
Hello, thank you very much for this explanation. This is going to help me a lot. I'm very curious how you will tackle latency issues. 👍👍
In addition, I may have some inspiration for future projects:
- create a lobby (with a list of active servers to join)
- Working with different levels. (only see players who are in your level)
- Saving player states (also regristration / login page)
You're welcome! Yea I'm going to work on the lag issues soon! Thanks for the feedback! I already have a whole series on creating lobbies (not Steam, coming soon!) but the rest of those are in the queue! Thanks for the inspiration! ruclips.net/p/PLOtt3_R1rR9WrcyDRsRF3oSrzffmBtJbu
Loved this video, definetely feels like an improvement on the last one. I'm just coming back to game dev after a year or two of mostly doing art but I'd be glad to help you out, already joined the discord.
Awesome, thank you!
you are my god now
🧖♂️
You should spend some time chatting about how to do a Graviton build for the dedicated server. That will make this the best video ever!
Probably would have been good to do this with CDK as opposed to having people logging into a server and ssh'ing to the remote linux server and all that.
I think the Graviton route would be interesting to look at! This is an introductory video and having beginners go through the CDK process would be a bit advanced for this stage, but it’s definitely a powerful tool!
@@BatteryAcidDev Don't disagree, but there are so many more steps to get wrong doing it in the console. Especially making sure everything is undeployed or that you aren't creating multiple EC2 instances.
Would gladly create a video or work with you on one that can do this in a container and all that.
Wow this is exactly what I was looking for. Thanks!
Great to hear!
These vids are great, would love to see you fix latency issues.
Haha there's no silver bullet for fixing latency, as most gamers will have experienced that even on the biggest titles... However, I hope to look at some strategies to make it a little more tolerable! Thanks for feedback!!
Yeah, that's far out of scope for this particular topic. What I think you would be interested in is net coding, which isn't specific to Godot but just general coding philosophy.
You can't really "fix" latency, but what you can do is program FOR it, if that makes sense. I obviously won't dive too deep in a comment & i'm not super confident in my knowledge with it yet but the idea is that you just code everything around the idea that the internet isn't perfect. Simplify as much as possible, rely more on signals & pure data server side, and anything and everything you can get away with pushing to the client, should probably be handled on the clients end. Etc.
For example
Client side: renders anims, graphics, handles input, handles logics, etc.,
Server side: only takes the outputs of client side's data & updates server side to match it, and sends simply that information to the rest of the players, then making their clients do all the hard logic to update to the new information set. Using prediction methods for the most part with controlled update-sync intervals type thing that just occasionally makes sure everything matches, and if not, quickly interpolates between them or what have you.
It's more about making sure what happens client side simply matches what happens server side, because you cant fix latency.
Super excited to see the next video!
Thank you! I'll probably need a little more time on the lag compensation but hopefully soon!
Fantastic video! Really helped me get things going!
Can you please make a tutorial about how this dedicated server has multiple instances ? Maybe orchestrating with swarm or k8s etc. THAT WILL MAKE MY DAY :)
I don't have plans to do that right now, but that is in the pipeline. I'm focused more on beginner friendly content but I do see that as an ultimate goal, to get to that level of scaling/clustering. There are various services out there you can use to achieve this, probably look at a Dockerized build of your game's backend and leverage some service to handle that for you. I know AWS/Google/Microsoft has that, but there are also game engine specific implementations: W4 (Beta), OpenGB (Just found them).
Thank you so much for sharing this knowledge in so much accessible way
You are very welcome!
U're beast! AMAZING!
This is really good content i ever watch thank man
I appreciate it! Thanks!
Friend of Brazil? I'm also from Brazil! (if the translation is bad, sorry 😂) For you promised and brought. I'm not a professional programmer, but I started a project with my brothers. An online MMO RPG, with just 5 players at the start. A game focused on traditional tabletop RPG but in 3D and active combat, where each campaign would be unique thanks to a huge probability options. All of this created in Godot if everything goes well. However, I admit to being sad when I couldn't make the multiplayer actually work and you made me hope again! If you want help, with online testing or whatever comes up, it will be a pleasure to collaborate and learn! You've already helped a lot and I'm sure that when my ambitious and giant project progresses I won't forget the initial encouragement to continue with the dream!
opa, o projeto tem discord? gostaria de conhecer
@@Olixis Salve cara!
Ainda estamos em desenvolvimento e decisão de mecânicas, mas assim que concluirmos nosso primeiro grande mapa lançaremos o Alfa 1.0 e te dou acesso para teste e dicas é claro!
Assim que dominar o multiplayer lançaremos o beta! Esse projeto é gigante, será um prazer ter sua participação logo nas primeiras campanhas teste!
Yes we had people around the world helping me test, including Brazil! Glad you were able to be inspired by these videos! Please join the discord if you want to participate in my journey! Thank you!
Keep going with these series 👍👍👍
Thanks, will do!
Let me know if there's anything specific you'd like me to look at!
I would be super interested how to run a godot server in a docker / kubernetes cluster.
I have this in the queue, thanks for the suggestion!
Great video! Super unique and useful content! Keep it up!
Thank you! Will do!
with your networking skills you should make a small but scalable 2d mmorpg template for godot4. with a dedicated server and player data persistence and chat window. That would be a precious resource for beginners.
Well, I'm kinda working towards supporting those things you mentioned, but it could be used in any game type (2D, 3D, etc). It just takes time to get through all those things a week at a time! So stay connected!
@@BatteryAcidDev awesome, thanks for the reply! You are doing great work for the Godot comunity!
and about database connection...? usually this is the hardest content to find about engines and frameworks. if you find how to do it, bring to us, please!
Yes that’s the plan! Thanks for the feedback!
Thank you!
This video is awesome 👍🎉.
Waiting for the next video super excited 🔥
Thanks!
Super helpful! What about Steam Networking Messages? Do you think this is needed or is out of the box Godot Networking the way to go?
Glad to hear! Well that's two different approaches. Steam networking is using their networks and is going to be P2P. I'm not 100% if they have a dedicated server host, I'm doubtful, but the approach in the video will be a dedicated server approach, so no P2P. You CAN use Steam to setup your lobbies and then once ready to play you can probably send them the IP to connect to your dedicated server. I'm going to research that some more and see if it's possible. I would be surprised if it wasn't. I'll put out a video on this once I can get to it!
Hey! Incredible job on this tutorial. Do you plan to make one on how to set up a server for a game on Steam?
Thank you! Yes, my plan is to release that in a few weeks, stay connected!
I would be super interested how to run a godot server in a docker / Agones.
I have the Docker thing in the queue... so stay connected!
The only thing I can’t find is where in the previous video you talk about this OS has_feature(“dedicated_server”) setting 😢😅
thanks!
Great stuff!
Glad you enjoyed it
awesome!
Thank you! Cheers!
id be curious how character data and items like inventories and player login and signups could work. been googling around for this a bit and there is some stuff out there but nothing very cohesive.
I'm planning on covering this over the next few months, stay connected! Thanks for watching!
Hey BAD, awesome tutorial. Thank you very much.
I was wondering how could this be more scalable?
I mean, this way, we have a player limitation defined by the MultiplayerSpawner, and also all players will be playing the same game.
How would it work to have multiple instances of the game, so a thousand of players could play with their friend different instances?
I guess we would need the dedicated server to be a matchmaking and electing one of the players to be the server, but then the code of the server would be completed different from the client.
Would be nice a tutorial showing that.
Thanks for watching! Yea that's a whole other discussion - scaling for games - which greatly depends on your game's requirements. It's hard to make a generic video on things like that. I do plan to work my way through some scaling techniques, but that's a bit off into the future... Stay Connected!
I love this!!
Can we go into things like user accounts and saved user data?
Oh! We so are! I've already covered some of that with Unity so it's time to remake some of those with focus on Godot!
*EDIT: I was not using the correct command, Battery Acid Dev helped sort me out though. Gonna leave my comment up in case anyone else makes the same mistake I did*
One nasty little hang up that I ran in to that I want to share with fellow Windows users. Sometimes when you try to login with SSH even after you have changed permissions on your keypair file it will still deny you. Turns out that it can also be really picky about which user name you are logging in with. So my final command I used to login to the linux server ended up being:
ssh -l ec2-user -i
So basically what the -l flag does if I understand correctly is it changes your login name, and by default I think that the cloud is looking for ec2-user.
Hope this helps someone!
Thanks for the tip! I'm suprised my command with appending ec2-user@ didn't work the same way. I thought it would essentially be the same command... but Windows is funny like that 🤷♂️
@@BatteryAcidDev you know what, now that I am looking back at it I did not notice you appending ec2-user in your command that was my bad, just an oversight on my part. Now that I tried it with the correct command as demonstrated by you in the video it works perfectly. 👍
@@olivehillstudios Oh nice! Well, now you know 2 ways of doing it!! Thank you for the follow up!
Question for you. Do you think in the future that you will be making a video where you can have a server and client in the same program. This is needed if you want to have a server with a gate way and authentication server that they all connect to. game development center made a video set on it but it's for Godot 3 and not Godot 4.
All my videos so far have client/server in the same project... There are several ways to setup authentication, just depends on what your requirements are. Can you link to that video here so I can take a look to have a better idea?
Thanks!
Hi, great video! Btw nakama is a good open source serveur to implement. Maybe one day a video? :)
Yes I’ve been getting a few suggestions for them, I will definitely check it out! Thanks!
Great tutorial. Thank you.
You are welcome! Thank you!
Let me know what else you'd like me to cover!
Save! Great work. I have a project already underway, but I would like to make use of multiplayer (to make it possible to play with friends from other networks), I've seen the possibility of using "Firebase", do you know that?
But following your tutorials, which video should I start with? What was the best method you found so far?
Thanks! I don't have much experience with Firebase (maybe I'll dive into it soon!), but as far as I can tell, it's for web hosting, so not this. Dedicated servers are for deploying a server build of your game. If you wanted to make a web based game, you could host it there. I believe Firebase offers support for database functions and other things, so if you are looking to host a web game, you may be able to get everything you need there, but again, not 100% sure. Maybe someone else can chime in.
@@BatteryAcidDev Got it. Of all the methods you use, including some information about Steam and more, which one do you think is best? Do you have a video tutorial? If you do, please send it to me so I can follow it. Thank you very much for your attention.
@Prof_Natanael best for what? What are you looking to make?
@@BatteryAcidDev 3D adventure and combat game, which requires something like creating a lobby that has capacity for a maximum of 4 or 6 players. Can you understand me?
@@Prof_Natanael Yes I have several videos on that including matchmaking. Please look through my playlists!
Nice video
Thanks
How does the export as dedicated server work?
While working on my game, i have everything set as two different projects (clint and server).
So when i saw thought i was very confused.
Also, is tour first multiplayer video p2p?
If you have two separate projects, you only need to export your server one as a dedicated server. Most devs will start out with everything in a single project (client/server). All of these videos are p2p enabled, meaning, you operate one of the peers as a host and have other clients connect to it. However, the first video out-of-the-box only really supports p2p locally or on a LAN. So you'd have to make some adjustments to make it p2p to the outside world. I do have a couple videos later on that details how to do that with Steam.
Thank you for this great tutorial.
What if I need to make a simple 2d online multiplayer game that runs on my website without this host button? I mean all players are connected to a server like AWS instance you created. Would you give me the steps to do this? Also, could I use AWS as you used? I am new to multiplayer game development and I don't know much or how things work.
Browser based games have their own set of challenges! Sounds like you want to host your game where there's an index.html as an entry point. You could do that in a similar manner as this video but instead, you'd just need to start a local webserver (or nodejs or whatever you're using) to run it on the instance. The host button in this example is not relevant, it's just there from the last video. Players would then just go to the DNS of your server running the game. There are several ways to tackle this but that's the gist of it!
lets say your server reached maximum capacity and you made the server expand dynamically in the future if you add chatting system how do you link between the two server chats to make it global? or do you make a standalone chat server and players write [msg,id,player_name] to it and then the server rewrite it in the other servers box chat?
sry if my english is bad 😔
I would make your chat system separate, independent of your game servers. It may be a more complicated setup to manage addition components of your architecture, but I would do that for a production game. You could leverage their user_id or whatever you use to identify them. Your example data structure sounds like a good start!
Yes, that's how I would do it. A Websocket is a really nice way to make a chat server, I have several videos on that:
ruclips.net/video/9_HFMulPNls/видео.html
ruclips.net/video/P-1oD2R3HYE/видео.html
Waiting for the management of entities after join of a player, if a first player collect money the second one will see It right?
If collecting money is event based, like with an RPC, then they may not see it if they join after the event has passed. However, if you are synchronizing a variable for money that you update, when a new player joins, they should get the latest amount.
gold
💚
Prost!
😖💚 Fastest sub button of my life
Haha! Much appreciated!
Is it possible to do this for the html 5
Dedicated servers and web(html5) builds are two different things. You can build your game to run on a server (linux) and act as a "backend" server for your game. A WebGL build (web) is hosted on an http server, basically anywhere you can host webpages. I think if you want your game to be web based, you'd have to use different technology like WebSockets for communication. So I guess you could build a dedicated server as a WebSocket server for your front end game. But I would probably use some other tech at that point, like Nodejs or something.
Imagine turning Brackeys tutorial into a full MMO. lol.
Define MMO…
Now, show how to make a dedicated server on rasberry pi 😊
Hmmm does the distro support the Godot Linux builds? Or Docker? Should be easy if either of those do!!
I think you can Get docker on it.
Thx for this enlightening tutorial, I really appreciate it !!. Can you show us how to get your local ip adres of your server via code, please ?.😃
Yea mean like this: docs.godotengine.org/en/stable/classes/class_ip.html
Also check this out: forum.godotengine.org/t/how-to-get-local-ip-address/10399
@@BatteryAcidDev Thx just what I needed, and please go on with info about networking in game development, especially Godot because Iwill not return to Unity. I develop for handicaped people and they will be thrilled when I let them play in a network. A big THX from me and my clients (human 🤗) !!!!...
Can you make some easy MMO for more than 6000 people this way? 🤔
With this alone, probably not, but it’s heading in the right direction!
My game is so laggy when I play it
That can happen if you are far away from the server. Also, this current setup hasn't been optimized for lag compensation. I plan on covering that soon, so stay connected!
so many people using brackeys stuff
Yes that video has been viewed almost a million times, I think it’s smart to build on top of that success and bring more attention to the power of Godot!!
Is it really that easy? Wtf
Yup!