I am building a 2d multiplayer game with no physics and my own authoritative server. Already have all players getting synced each with other but their movement isn't so smooth yet.
Here is the mechanics:
- player clicks on the screen to move towards the mouse pointer. Client sends action + angle to server
- server calculate new position based on a certain speed and sends it back
- player then moves through interpolation
After reading a lot of articles and play around with few samples code, I still have my doubts about how to get the clock right on both sides.
Would the approach below be suitable for my type of game?
- Run the server at 1000/10
- Run the Client network loop at 1000/60 and the game loop at 1000/60
Also do I need a game loop running in the server at 1000/60?