Would this setup be good?

Alright, so creating a game with some simple custom physics for objects that will spawn for each player, originally I was calculating the physics on the server and then clients would interpolate the final position, but the problem with this was that there client wouldnt be ableto get immediate feedback after hitting their obejct; so my next thing was to make some sort of instant client feedback for the object so I went ahead and made this system where the gravity would temporarily be shifted to being calculated on the client side and it worked but there would be this annoying issue on higher ping where youd be able to see the position of the ball hiccup as you hit it…

So right now I was wondering what if I had the server calculate the physics and then aswell have the clients calculate the physics, and then when a client interacts with the object then I send remote telling all the clients too update their object state?

1 Like

if i were you, i will handle the physics client side to prevent lag in the server side as the server eil lbe overloaed updating every part

2 Likes

Yes you are correct in that, but the server must also be authoritative and must know the location of every single object!

I actually figured it out so yeah, I made a custom physics simulation on the server and then aswell on the client; and when the round starts I have them running at pretty much the same time and when an interaction with the ballon is made on the client I send that over to the server and then of course the server will do all the valid checks it needs to and then it’ll tell every other client except the one that hit the ballon to move it on their physics simulation, and it works FLAWLESSLY!

The pros are that when a client hits a object they get immediat feedback, but I have to rely on clients sending over data for their hits to the server which is of course exploitable but with valid checks it should be fine…!

1 Like

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