I have a design issue in regards to how I set up my Photon.
My game is a two player, voxel, golf game, in which positions of the ball are very locked into a grid. So, the game is not physics base, the only random items are distance hit ball, and direction hit ball.
That being said, I could go the traditional route Instantiating clones over the photon network, or, I could instead of having the transforms continually monitored, just pass the distance and direciton that the ball was hit to the remote player. Then, the remote player, can calculate the new pos with perfect accruacy.
I can see the second being better as it will not need to rely on the network for the positional move. So, I suspect no sketchy translations. Just a smooth, local tween.
Any thoughts??
That idea makes perfect sense (for me) and is actually what I would go for.
When you know where the ball was and where it should end up being, you can pass along some parameters for the hit and perfectly (and smoothly) re-calculate it on the other player’s device. Minimal data to send, maximum smoothness (if that is a word)…
To liven up the wait time (unless both shoot at the same time), you can send some movement updates as the player does the shot. If there are any parts moving while you input your shot, you should sync that, so players know what’s going on. Like in Hearthstone, where you can see cards being selected and moved during the other’s turn.
Yes!
I think the ball will be as stated. A locally controlled element on any client. Simply triggered (on remote) when data received (hit, Vector3[2]).
However the other element is the player club. It is a very unpredictable element in that the rotation is tracked and it could be anything! In this case I will simply trace the transform across the network.