Godot Version
4.3 Stable
Background
So I’ve been learning the ins and outs of multiplayer development over the past few weeks as I’m developing a MVP. It’s challenging, but fun and fulfilling. However, I’m running into an issue with codebase structure.
You see, the multiplayer synchronizer/spawner are useful nodes, but for me, they reduce codebase readability by a lot.
I like my code to be structured in logical order and have a single use principle. This is so I can troubleshoot issues, remember what my code does, and easily build upon it.
With the multiplayer sync/spawn nodes, I have to go through different menus in order to deduce how something I programmed works. Splitting it between code lines and the GUI.
Example:
I have to manage another menu in order to understand what the function does. The needed info is out of plain sight.
I understand how these nodes work and why they’re useful, but I much prefer having it all in one place.
Then, for the MVP I’m developing, it uses a dedicated server model because it’s a PvP shooter. I need to have the server to have authority at all times. Having to tangle with the multiplayer synchronizer to do this is not ideal for me or the MVP.
The Question
Can I make a multiplayer game without the multiplayer spawner and synchronizer?
What I’m thinking using only RPC called in order to replicate actions, properties, and variables. This sounds cumbersome, but it makes my code way more readable to me.
And for multiplayer authority, I can make 2 separate RPCs. One that the client calls in order to trigger the action, then a second one that calls on the server to check if this action can happen or not.
This (in theory) will allow me to create server-authorities code and have 100% control over what is called where.
I can refactor my entire codebase in 30 minutes because I prioritized implementing all necessary multiplayer functionality before any complex gameplay element.
Let me know what you think about this idea.