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
draw graphics
play sounds
end while
But what if I develop client-server-like games, like Quake, Ragnarock, Trackmania, etc,
What the Loop/Algorithm for client and the server parts of the game?
It would be something like
Client:
while( user does not exit )
check for user input
send commands to the server
receive updates about the game from the server
draw graphics
play sounds
end
Server:
while( true )
check for client commands
run AI
move all entities
resolve collisions
send updates about the game to the clients
end