How to revert invalid logic that happened on client in multiplayer game?

Currently trying to make grabbable objects for a multiplayer game. Basically what I have right now is I have the client actually running the logic to grab and then notifying the server that the object was grabbed. This does two things, 1: it runs the grab logic again so it replicates all the necessary values to all the clients and 2: it checks whether it was actually a valid grab or not. Basically doing this so that grabbing objects are responsive but my code is still server authorative.

Right now if it’s a valid grab on the server it just proceeds with replicating the state of the grab to all the other clients. However, if the grab isn’t valid I will need to detach the grabbed object. I don’t want to use the Client RPC because I’ve read that it should only be used for transient purposes.

Is there a way for me to resync the offending client in some sort of way to the server?

Client interacts → If Valid obj → RPC server to interact → Play a montage (e.g. pick up).
Server interacts → If Valid obj → spawn real actor → attach, set states → destroy pickup item.

Both actors (world pickup item & attached item) need to be replicated actors.

Clients should never undertake authoritative only actions. Reversing them is always twice the work and would involve excessive rpc’s to fix.

Consider you attach, the server says no. The Server has to send you an rpc that tells you this. Now consider you have packet loss and never receive the msg. Now you need a dedicated ACK setup to guarantee that eventually you’ll get the msg.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.