Godot 4 Makes Multiplayer EASY!
HTML-код
- Опубликовано: 7 июл 2024
- Creating multiplayer games has never been easier! Godot 4 has made some changes and new additions that make it mega simple to prototype a multiplayer game. I built a quick project in 3 hours, here's what I learned!
Resources:
Replication: godotengine.org/article/multi...
RPC's: godotengine.org/article/multi...
Tank model: sketchfab.com/3d-models/styli...
Chapters:
0:00 Intro
0:23 MultiplayerSpawner
1:50 MultiplayerSynchronizer
3:50 RPC's
5:18 Outro Игры
I think a tutorial series would be great for the community!
Agreed!
+1
Yes please!
Yes please!! I cannot for the life of me learn enough to make my prototype for a networked game.
ya
As someone who's preparing to make their first multiplayer game in Godot, I would love an in-depth tutorial series!
Thank you for covering the new multiplayer! would love to see more!
Yes I would love to see a tutorial, trinkle in essential concepts to networking or link resources/articles to begin grasping concepts so that we can use the tutorial as a reference for future use on these concepts.
Love the multiplayer stuff! Great video!
I've got the notifications ON waiting for that step by step tutorial hahaha. Thanks in advance!
Just starting with Godot but this tutorial makes it seem pretty intuitive, I'll try it out. Would love additional tutorials regarding online multiplayer, but the other content you have is great from what I've seen too. Thanks!
I'd love to see a step by step tutorial! I'm very interested in both 3D and Multiplayer in Godot! 👍
Would absolutely love a tutorial series for this type of game!
I would definitely love to see more on this.
I would LOVE to see a step-by-step guide for a multiplayer game in Godot 4!!
Godot and your tutorial are both awesome.
I would love a step by step tutorial! I really appreciate your videos!
this is an interesting and welcomed change to godot, can't wait to try it out
Love to see a tutorial using this tank game as the example
Of course I want a tutorial. Godot 4 is awesome.
Thanks man. I am just starting to get into network coding and the video was very helpful. I personaly would love a video explaining how to connect to a different player. So a simple peer to peer connection. The host generates a room code and other player can join the lobby by entering the code,
I really want to make a multiplayer game to play with my friends, so yes, I tutorial series would be extremely helpful.
Subscribed 🎉
I would love a tuorial series on this, especially for local multiplayer
I'd love to see a basic tutorial on how to make a small toy game like this in Godot with multiplayer
I would absolutely like a tutorial. Yes please :)
Would also love to see a Multiplayer/Networking tutorial
i browsed my way to this vid, i would love to see a step by step, even for something as simple as a rock paper scissors sim. both prototyping and polishing for production on multiplayer.
Yes, please! godot 4 multiplayer step by step tutorial.
As someone who is just starting to check out Godot I'd definitely be interested in a tutorial for multiplayer!
damn dudes, i've been working with godot engine multiplayer for a quite long time and seeing THIS is omega pog! I can't believe my eyes!
just for the record you'll probably want to use the `Callable.rpc(...)` syntax instead of the `Node.rpc(StringName, ...)` one shown at 4:30 , to save on sanity, just like `Signal.connect` and `Callable.call_deferred`.
PLEASE do a tutorial series on it!
yes a MP tutorial would be great!
actually annotations are a thing in godot 3 as well. you can add master, mastersync, puppetsync, puppet before a function or a variable to configure it
I find this tutorial very good if you just want to copy-paste everything shown without asking questions... But I can't find a single tutorial that explains the developers' goals and how they implemented it to understand the overall functioning scheme instead of just copy-pasting from all the videos currently available on the internet about multiplayer with GODOT 4.
multiplayer tutorial? YES PLEASE
I am certainly interested in step to step multiplayer tutorial in godot 4.
Could you do a tutorial or give an example, how to do scene switching in multiplayer? Mainly some sort of lobby, when switch scene to some main game scene and spawn all players
A little more in depth would be really really great. You explain things really well.
Yes Plz!
Are you ever going to make the tutorial series?
If you do, I hope you do it with a game type like an FPS game.
good tutorials
I'm trying to synchronize an Item list such as the one in the old multiplayer websocket demo. I have no idea whether to use a synchroniser or a spawner because the items in the list are generated by the node itself
A tutorial on this topic would be greatly appreciated
How did you spawn in projectiles? I'm currently having a lot of trouble with this and some help would be greatly appreciated.
A tutorial would be very nice! On the point of authority, isn't it safer to have a server be the authority instead of all the peers for themselves? Doesn't that cause issues with RPC's? Is that why you use any_peer for the rpc call?
Absolutely, it's easier to just let players be responsible for their own character, but definitely not the safest. If you're working on a game where you don't want it to be easy for players to cheat, you'll want the server to have authority over everything.
@@crigz Hey, I know this was a year ago but would it be possible to have a client-sided character on the player's side that isn't replicated and use a server-side copy so that there is less chance of cheating and just correct the player's client view character as needed? (ex. Desync due to latency)
Great video, thank you!
Can these new multiplayer nodes also synchronize (custom) resources across the network?
You probably could if you exposed it as a property on your node! I've not tried it though.
A tutorial would help so much!!
please can we have the repo for this project? It would help me tremendously to actually look at a working example with all the setup and scripts instead of just some small snippets and explanations.
Please make this project available to everybody, that would be so awesome! :)
tutorial series would be awesome on myltiplayer
An in depth one owuld be great . I'm still having issues while allowing players disconncet and come back to a session . I end up with the old ghosts being sync'ed on all subsequent new players ?
I much have some thing wrong in the disconnect and dropped connection some place.
MOAR
How did you get rid of the bullets? I'm having an issue where I can create objects just fine, but removing them isn't going so well! I'm trying to use queue_free() from the server but it's causing desync issues on the peers!
Wondering what the thoughts are in making a Godot 4 multiplayer tutorial 👀
Sometimes it sounds simple to build a multiplayer, but i dont get how to transfer data from server to client or something like that.
So i would love to see an in-depth tutorial
Hey, I can't seem to get the same child replication behaviour you have with the shield. The player nodes are replicated correctly with their position but if I instantiate something under the player and add it as a child it doesn't get replicated to the peers. I have the scene added to the MultiplayerSpawner. I've created a separate node and spawner at a higher level and added to this instead as a test and this will replicate correctly to all peers, but because the ability should ideally be a child of the player it's not the solution I wanted. Any idea what I could be missing get get child nodes to replicate? Thanks
how do you manage spawning different players in different locations? for me, the client side position returns to the default node position, instead of the spawn position i am trying to asign
3:09 line 30 and 76, what addon are you using to display the not-equal, less-than-or-equal operators as their equivalent unicode characters (≠, ≤)?
I think Its font ligatures some fonts have them some does not
hey thx for the tuto. I have a little problem, i dont have any error, but when i launch the exported game, and i host, the mouse is not captured, and i can't move. Instead i can do it when im in godot, do you know where is the problem ?
Tutorial for how to make a multiplayer game pls🥺
Can you go into more detail on the players creating bullets?
I got it! Instead of using the multiplayer synchronizer, I had to use RPC calls only in order to replicate the bullets across the scenes.
good to know!@@coltr1
Quick question, what if I have 10 different bullet types that inherit from one class should I add them all to the multiplayer spawner or can I only use the base class ?
You'd have to add the 10 different scenes, the multiplayer spawner works on scenes rather than classes.
@@crigz hmmmm ok thats a shame then why cant we declare a scene as synchronized it could scale better
do you have a github where the code for this lives? I'd love to take a look at it, that's the easiest way for me to learn
1:42 is this actually true? This doesnt seem to work for me. I instantiate my scene under the spawn path node (not a direct child, but somehwere further down the hierarchy) and add it to the auto spawn list, yet still I am getting errors...
I'm experience this behavior too. In my current version(4.1.1), spawn_path property description read "Spawnable scenes that are added as *direct children* are replicated to other peers". I'm not sure if dev change this along the way and this is intended.
Sorry if this is a dumb question, but in this implementation is this "MutliplayerSpawner" node running on its own dedicated server or is it just "owned" by the first client who connects?
I think I saw you indirectly answer this in someone else's comment. (Answer being this is other clients connecting to the first client (host) and not a dedicated server). Though it sounds like that could be possible too?
Is there any chance you'll post the source code for this project? It would be very much appreciated.
Low level info please!
Can anyone tell if this is a tutorial for multiplayer that can be played in different devices??
Tutorial please!!! 😍
question, how to open godot 4? I downloaded it and it gives a vulkan error
Any chance of this tank game tutorial?
Great video. Trying to impl simpliest multiplayer project, and running into some issues like: get_node: Node not found: "Main/World/Player_504642280/MultiplayerSynchronizer" (relative to "/root"). , no idea how it works and how to fix it. The best part i take this from like 3rd tutorial, step by step and it still doesn't work. Please make a tutorial with a simpliest example. Tahnk you,
Maybe it's because you didn't add is_force_read arg in add_child (), or you didn't spawn this in a multi-player spawner (which makes multi-player syncing more consistent ). There a lot of ways to have these bugs, but if these only happen once pee each node then I think thats normal (atleast it happens in my game and doesnt break something big)
Low level stuff please
A tutorial would be great
While this advanced engine-specific stuff is really cool, how do you even let people connect to a game you made at all? In the age of IPv6, port forwarding is no longer possible for many people, and buying server space online costs real money that not everyone is willing to spend on a silly leisure project. How to get online functionality off the ground to begin with is the most interesting and least discussed subject of all.
Hmm port forwarding might be not the easiest thing to do but there are workarpunds. I used to host minecraft/terraria (etc.) server to play with friend by using things like ngrok or playit gg which are free. So while I wasn't able to unlock ports (because ISP probably) I was able to use these solutions.
That's not very disgust because it's hard. I don't know what kind of plugins are available to support online services in Godot.
What your are really working with are online systems like the steam sdk for a game only on steam or the EOS sdk for cross platform and cross store play.
In ue4 there is even a basic online subsystem that you can use to connect to your own servers on AWS and ignore steam or whatever storefront you are using. You can look at the source code in the engine to see how it handles the nat punch through and all that stuff
I imagine Godot has their own implementation of this to support modern multiplayer but even then integrating it with a storefront or other game services is still hard work.
how do you have theese nodes called by default "Main", "SpawnRoot" etc?
idk if im doing stuff correct because of this to be fair :/
Would it be possible to get this working with steam?
yes tutorial pls
the project in a repo anywhere?
am still using godot 3.5 :(
can these work with steamwork?
Not that I know of
and all this will work if all of the players uses the same router, right?) How to connect them via the Internet?
Nope! All of this was recorded with friends over the internet.
The key is the host needs to have their ports forwarded / UPnP enabled.
@@crigz ahh got it. thx. The only problem is UPnP... not all users has access to their routers or knowledge how to configure it.
Yeah, only real way around that is to use Nat Punch-through, were you essentially have a publicly hosted rendezvous server the clients connect to.
@@crigz could u make a video of that? I know all external IPs of host and client, also i've heard that UDP allows to connect peer-to-peer. But how to make it w\o using third-party services? I have web-server and VPS... but can't get what data i should pass and get on it to connect 2 players(
Tutorial please
everyone keeps saying multiplayer in godot is easy but im trying to do a simple thing and it wont work
what's that intro song? :0
bit late but its Golden Goose by Harris Heller
There's still no step-by-step-tutorial, or?
Pls a cpmplete tutorial
Is is still working today?
music sauce?
700th like
Are you kidding, right? this is looking awful. Unreal is easier
we know ?