clientServerGame Initialization Instantiate graphics device manager object.
Update() called once per frame HandleInputs() Checks for user exit from program
UpdateMenuScreen() Displays options to create/join a systemlink game
No
Is network session active?
Yes
UpdateNetworkSession()
base.Update() calls Draw() which draws the current game state onto the screen UpdateMenuScreen()
Is game active? (not minimized & input focus)
No
Is there a signed in local gamer?
No
No Is A key pressed?
yes
yes Guide.ShowSignIn() displays xbox/ windows live sign in
No Is B key pressed?
yes
CreateSession() creates a network session & hooks network session events
JoinSession() joins a network session & hooks network session events
RETURN
UpdateNetworkSession()
For each LocalNetworkGamer
UpdateLocalGamer() read player inputs and send to server
If host UpdateServer() update simulation on server and send updates to clients
networkSession.Update() updates the state of the multiplayer session.
Is Host?
ServerReadInputFromClients() Server reads network packets from clients(user updates) and stores the updates on the corresponding gamer.tag object (does not simulate with new inputs yet)
ClientReadGameStateFromServer() Client reads network packets from the server that contain current state of each gamer.tag object. The client then updates the gamer.tag objects.
RETURN