Making this system more responsive

Hey, so I’ve created this server authoritative system where I hold values for this object like the position. velocity and gravity and calculate physics for it the have the clients render the object and interpolate it’s position, and this works great but the thing is players can also interact with this object and then send information about this interaction to the server so obviously the problem I’ll have is that players with higher ping will obviously not have the best time…

So what could be a potential solution without opening up too much vulnerabilities that would make the object interact happen instantly?

Call the information once. Load up server side table variables. Work with them. When they exit the game then update the datastore. That way you minimalize datastore reads and writes. Good for your game in everyway. You can also use setup variables like the kind you manually add with .value could even put them client side with a hacker check on them being switched from server side checks. only need one mistake from the hacker to know what you’re dealing with and a permeant ID ban. Myself I don’t even bother with this until I see the game is doing well and needs more attention. At that point you can see what needs to be tighten up and what don’t.

I don’t think this problem has anything to do with Datastores. It sounds like he’s using RemoteEvents and sending the data to the client. I think, for something like this, you should just use serverside for everything, as it will then automatically replicate to each client
and you can have each client send a modification to the server, like velocity, angularvelocity, etc and update it accordingly. But this could be avoived entirely using a pure serverside implementation.

Yeah I’m using my own physics calculations to calcuate the bew position, and then having the client render and interpolate; but the problem is that its server authoritative so the client says I want to hit the ball, I send that to the server and after however many ms of delay, the serer will finally use that data the client sent to update the ball’s state

I guess I’m just wondering the best way to implement client side prediction and just lag compensation; because I really want the players to have an enjoyable experience even on higher ping