I'm trying to make a small multiplayer game. I state that the concepts are all quite clear to me, and this is the fourth multiplayer game I make ...
different, compared to the others, this uses physics ... and is giving me a bit of trouble that I can't solve ...
the game is simple: it is a kind of volleyball, two players (one host and the other peer) bounce the ball with each other. the ball has behavior physics. the two players have behavior platform for movement.
the players and the ball are the synchronized objects, the player has the input values of the client set on the inputs (bit by bit for the left, right and jump controls).
peer behaviors are not disabled because I use peer input prediction enable.
given this, here is the problem: the host has the authoritative version of the game, and on the host everything works perfectly, while on the peer, although the movement takes place smoothly due to the input prediction, the collision with the ball by the behavior physics, occurs with lag, effectively making the game unplayable.
I would like to use lag compensation, but I don't know how to implement it with the physical ball ... do you have any suggestions?
I am attaching the capx so you can do some testing if you want ... I'm going crazy without finding a solution ...
P.S. behavior physics I can't remove (I need to experiment to do another, more complex project, based on physics)
thank you all for your help
here the capx: drive.google.com/open
you can test, run it in two different browser windows/tabs
also Ashley some ideas?
Develop games in your browser. Powerful, performant & highly capable.