Server authoritative ball physics

Options
Hello guys!
I am currently working on a fast paced soccer game using photon bolt.
Everything works fine. client side prediction is working well and i have nothing to complain about.
The ball is the only thing that gives me headache.

The game has a authoritative server that spawns and simulates the ball. All clients are just getting transform states.
Whenever i kick the ball on client side, I have a small delay (based on my ping) before it actually moves.

I know there are some techniques to make the ball feel more reliable but I really don't know where to start.

It feels like bolt should have something built in but i couldn't find anything except for 'extrapolation' in the state transform (that btw does absolutely nothing).

Hope you can help me or give me a few hints.

Best regards!

Answers

  • Soares
    Options
    Seems like you're using Authoritative Movement withou Client Side Prediction. Have you tried to use Bolt Commands?
  • i'm using playercommands and client side prediction for my players. it's working because in that case every client controls it's own player object.
    however, the ball is an object that is predicted on multiple clients individually.
    I need something that each client can predict the ball locally but still get corrections by the server. (without noticable lag)
  • Soares
    Options
    Well, I don't know. If you want server corrections, you could try to make a command with the result of the ball velocity and position, that is executed by the server.
    For example, the "poll keys" would receive the values of the interaction between the players and the ball and pass it as an input. Then pass the correction (reset state) to all of the clients, not only the owner or controller, but all of them.
    It's kinda a crazy ideia but you could give it a try :)