Client Server Game Flow

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Client Server Game Flow as PDF for free.

More details

  • Words: 187
  • Pages: 1
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

Related Documents

Client Server Game Flow
December 2019 17
Client Server
May 2020 26
Client Server
June 2020 13
Client Server
November 2019 21
Client Server
June 2020 14
Client Server
November 2019 24