Problem Description:
Multi-player Game that works over the some kind of network, in game few players shoot each other, bullets are are flying with not instant speed, slowly enough that you can see them.
Question:
Who should calculate the flying bullet position and hits on target (opponent player) Server or Client?
Best Solution i thought of so far:
Client sends to Server bullet initial location and direction vector. Then Server calculates the bullet positioning and hits.
Also had some thought about synchronising with exact server time and send figures to client(bullet init position, direction vector and time) then client calculates the hits. But problem exists – what is server and client time doesn’t match.
Please Explain or Direct to some relevant article/book.
What you’re looking for is a little vague, but hopefully I can point you in the right direction.
These articles give a very decent description of the many aspects of creating networked multiplayer in games.
It seems that you’re primarily stuck with a decision between an Authoritative or a Non-Authoritative Server model. I’m not sure what language or development environment you’re using, but Unity 3D gives a very good overview of each model, and what benefits/drawbacks they might have.
Hope this helps 🙂