For stand alone games, the basic game loop is (source: wikipedia)
while( user doesn\'t exit ) check for user input run AI move enemies resolve collisions
The client part is basically the same, except replace
run AI move enemies resolve collisions
with
upload client data to server download server updates
And the server just does:
while (game is running) { get all clients data run AI resolve collisions udpate all clients }