so i want to create a simple game that runs over a network but I am having trouble deciding what needs to be done in terms of what the server needs to do and what the clients need to do. I understand I should use UDP sockets but I am unsure how to implement it within a game and have all the clients be in sync. Should the server side have like a master copy of the game where i basically runs the game and accepts moves, plays them in itself, and then sends the current state of the object to the other clients?
In most of cases the relationship is simple:
Client -> Input to server
Server -> Calculate logic and physics, send object position and property data back to client
Client -> Render the scene using received data
I guess that this is what you where asking for!;)