godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.94k stars 3.22k forks source link

Plan improvements for the networking documentation #4160

Open NathanLovato opened 4 years ago

NathanLovato commented 4 years ago

Feedback from @menip: had a bad experience getting started with networking in Godot, following the docs. This needs investigation. He wrote MIT-licensed tutorials and a general overview here: https://gitlab.com/menip/godot-multiplayer-tutorials/-/blob/master/NetworkingBasics.md

jonbonazza commented 4 years ago

I've read through the linked document and personally, find it less useful as a tutorial than the existing official docs. It reads more as a more detailed class reference for a few different classes than it does as a getting started guide for the multiplayer api as a whole--useful once you already understand the fundamentals, but not so much to a complete beginner.

That's not to say the existing documentation isnt also less than ideal, however.

While I also have the general impression that the existing networking docs could be improved, other than a few specific items already called out as issues, I'm not getting a lot of ideas on how it can actually be improved. I think part of what makes documenting the multiplayer api so challenging is that it depends on a solid understanding of the fundamentals of network programming and computer networks, which are vast topics in and of themselves.

As such, one thing I'd like to do is make a clear distinction between network programming in Godot, and the godot multiplayer api. That is, pull multiplayer docs out into a completely separate section in the Tutorials category from Networking.

Additionally, while the multiplayer api docs are fairly comprehensive (though still can be improved a lot imo, as ill get to shortly), the basic networking docs pale in comparison. I think that if we spend some time improving the core networking docs, it will make understanding the multiplayer api docs significantly easier. The question is however, how much prior knowledge do we assume and how much do we rely on linking to external literature here?

Lastly, in regards to the multiplayer api docs, I think that in addition to improving the existing docs however we can, I suggest we also create supplemental documentation on, and examples for common techniques and strategies employed by industry professionals to solve well known problems in the multiplayer space. These docs would be specific to the context of Godot, which is where most users fall flat when finding existing literature on these topics.

These are the ideas I've been able to come up with and will probably take a stab at addressing them this weekend, but I'm open to feedback and other ideas as well.

AaronRecord commented 3 years ago

A few weeks ago I tried to make a game with networking for a week-long game jam to learn how to use Godot's networking API. I've never done any networking before so I read the godot documentation on high-level multiplayer very thoroughly but I wasn't able to figure it out. I mostly got the stuff about network ids, RPCs, naming the node's their network ids, UDP vs TCP, the server should be authoritative over the clients, implementing a basic lobby. The part that confused me most was the concept of network masters. The docs say "The network master of a node is the peer that has the ultimate authority over it.". To someone who's never done networking before that description wasn't very helpful. What does "ultimate authority" mean? And if the server should be authoritative, then why is it recommended to set players' network master to the client they belong to? Also, should the same scene be used for the local player/the player you control and the puppet players, or should they be separate? If you're using the same script for both, then won't the script have to constantly check if it's a puppet player or the player you control? That feels really messy to me.

I do feel like the documentation was helpful, but it wasn't enough for someone who's a beginner to networking. There were also some tutorials by GDQuest that I watched but they didn't really answer any of my questions.

I think what would have been helpful is a tutorial that goes through step by step for how to make a basic multiplayer game that explains and shows the concepts in practice, and why they do things a certain way, preferably in a way that people new to networking can understand easily. I understand networking is a complex topic and as such it's not always easy to explain some of the concepts, but I think there is definitely a fair bit of room for improvement in the documentation.

Edit: A full tutorial might be too much to ask, but I think clarifying the parts I mentioned I was confused about might be enough