Hi guys. I'm currently experimenting with creating an online football (soccer) game. Things are going well so far, i have my player sprite knocking a ball around and a second pc can connect and read the data.
Now I'm wondering how I should handle the ball across the network, or rather who should handle the ball. Is it wise to have the match host control absolutely everything, so if player2 has the ball and presses shoot, it's the joystick input that is sent to the match host and he applies that kick action to the ball? Or should player2's kick be applied to a local copy of the ball and the new ball data is sent to the host?
I'm worried that the first option might lead to slight delays between a clients action it's affect, whilst the second option may lead to conflicts as to who actually has control of the ball.
Any advice or links to relevant articles would be greatly appreciated. :)
Now I'm wondering how I should handle the ball across the network, or rather who should handle the ball. Is it wise to have the match host control absolutely everything, so if player2 has the ball and presses shoot, it's the joystick input that is sent to the match host and he applies that kick action to the ball? Or should player2's kick be applied to a local copy of the ball and the new ball data is sent to the host?
I'm worried that the first option might lead to slight delays between a clients action it's affect, whilst the second option may lead to conflicts as to who actually has control of the ball.
Any advice or links to relevant articles would be greatly appreciated. :)