Hiding Client - Server Latency?

I am making a magic based game. Different keys correspond with different skills, pretty basic stuff.

Steps:

  1. Player presses a key that has a spell attached.
  2. RemoteFunction is invoked verifying the player can use desired spell.
  3. If the player can use the spell, the RemoteFunction returns true.
  4. The client and server communicate and create the spell.

This system works, however there is definitely a bit expected lag between the server and client communication. Other games that I test out still have this but it is not as noticeable. How can I mask the slight client - server latency?

To get instant feedback, you’d need to do the spell stuff on the client.

Best solution to this, I think, is to localize all of the spells (since they’re mostly effects, right?), and just send barebones info to the server to verify.
If it wasn’t allowed, the server can simply refrain from sending any data to the other players, making the effect only happen for the exploiter.

7 Likes

Yup, thats how all modern games do it.
Let the client do whatever it wants
correct it if it gets out of sync with the server

3 Likes

Use RemoteEvents instead, create all effects locally then tell the server that the player has used a spell, confirm it on the server then tell all other clients that the player has used the spell so they could create their own effects locally.

1 Like

Adding on to this, only very important stuff like hitboxes should be on the server.

2 Likes