Godot Version
4.3
Question
I’m having trouble finding out what I’m doing wrong regarding RPCs. I got a much better understanding from one of my previous posts:
However, when trying to synchronize my move and jump functions, it doesn’t work. This confuses me, because the multiplayer synchronizer works and that uses RPCs.
I could use the multiplayer sync node. However, I need more fine control of what is being replicated and when. Plus, I’ll need to be able to fine tune around additional network features like client prediction, rollback, etc.
So, here are my specific questions (The relevant code is below):
- Why doesn’t my
jump.rpc()
event work? I’d love some insight so I can implement RPCs properly. - Can you use RPCs to sync player movement? I’d love to for the reasons above.
- A little unrelated, should I disable the
_process()
and_physics_process()
nodes on the player if they aren’t the authority over their player character? Will this cause and potential issues? - Very unrelated, do you guys have any other misc networking tips from your own experiences?
Main Script
Dedicated Server Creation (From the same project): [This Works]
Client Creation (It automatically connects to my own server instance): [This Works]
Server Signal Connections: [This Works]
Player Spawning Function (I’m not sure if the RPC does anything) [This Works]:
Player Despawning Function: (I’m not sure if the RPC does anything) [This Works]
Player Script
Give Client Control Over Their Player: [This Works]
_process(): [Not sure if this works over the network]
_physics_process(): [Not sure if this works over the network]
Jump RPC: [Does NOT work over the network]
Movement RPC: [Does NOT work over the network]