Hi and welcome!
I think your best bet will be official documentation: https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html
It goes over the things you listed.
Hi and welcome!
I think your best bet will be official documentation: https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html
It goes over the things you listed.
LoipesMas Oh Awesome! Thanks! I figured there would be some kind of documentation like this, I'll give some time and energy and go from there. Thanks!
CorvaNocta Is there a place to check out the basics of networking for Godot 4?
If you want simple low-level raw byte (or text) communication, check out the WebSocketClient and WebSocketServer examples.
They might be slightly outdated already, but should work fine for Godot 4.X. (maybe minor adjustments are needed)
Godot 3.X had a even simpler WebSocket implementation, but it was replaced with the examples I linked for some reason.
It's pretty much as simple as creating a server, calling server.listen(port) and polling for events such as incoming data or a new client attempting to connect.
Same on the client: create it, call client.connect(url) and poll for events such as disconnect or received data.
What exactly you send and receive that way is up to you then.
LoipesMas I got to give them a quick try and it all seems to be working! Only small question now is sending data. It seems the tutorial uses RPC calls, which are great, but they seem to be based on the same program being used for both server and client. But I want them to be completely separate projects! Are there any articles that delve into this? That show how to send data to separate programs?
Armynator oh awesome! Thanks! I'll give them a look over. The other articles were a good start, but I think their system is slightly different than what I am looking for (or maybe just what I'm used to)
CorvaNocta If you want a separate client and server project, make sure that the names of the nodes, and the rpc method names (and parameters), and amount of them on each node are the same.
GodaddyGameEngineUser Sounds pretty similar to the system I was using back in Unity, thanks for the tip!
If I want to send data, and I required to use RPC? Or are there other ways to send data?
I'm starting out super simple right now, just trying to send a string "hello world" from client to server after connecting. I can get them to connect, which is fairly simple with the documentation. Now I am trying to get a func to send a string. Still working out exactly how it needs to be written, but at the most basic level its just an RPC func right?
CorvaNocta I think you should be able to do an rpc function which takes the string as an argument.
If you want more low-level approach, you can do TCP/UDP/WebRTC/WebSocket connections, but they require more setup.
There are also a few nodes that might be helpful: MultiplayerSpawner and MultiplayerSynchronizer
I also found this official blogpost, which shows how to use these nodes and other new features.
Changed the tags to the more appropriate ones as this is more about asking for help .
You still need a backend application if you want to separate server and client.
Godot's high-level multiplayer only supports object attributes synchronization, for game logics you still need a gds backend as authority server, then use rpc to call server functions, or you could just use low level enet wrapper to communicate with server application in any language.
MagickPanda that should be OK for what I need. Is a Gds server just a gcode version? Like a headless server?
CorvaNocta I think a gds server with GUI won't hurt either.
But for server on cloud vps etc, headless is a betterchoice.