Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chris Harrison Stacey Kuznetsov Mariya Lysenkova Jennifer Refat Gabriel Sinkin.

Similar presentations


Presentation on theme: "Chris Harrison Stacey Kuznetsov Mariya Lysenkova Jennifer Refat Gabriel Sinkin."— Presentation transcript:

1 Chris Harrison Stacey Kuznetsov Mariya Lysenkova Jennifer Refat Gabriel Sinkin

2 MMORPG Massively Multiplayer Online Role Playing Game Wide target audience Hundreds/Thousands of players Large, persistent world Movement, Chat, Trade, Combat

3 Protocol Plain text (abstracted) Simple and extensible Command composition –Leading character determines command type –Server and client know command structure –“M 45 1356 2483 1401 2237” –Movement; Player 45 moving from x=1356, y=2483 to x=1401, y=2237.

4 Command Flow Chart

5 Server Architecture Network Communication –BSD Sockets –One socket per client, two-way data flow –TCP (not UDP) Server broadcasts commands once (no streaming data) Data less time-sensitive than other applications –TCP Header: 20 bytes. Movement Command: ~25 bytes. ~50 bytes per command Clients generate a command every ~2 seconds 1000 concurrent clients ~25Kbps upstream data Naïve Broadcasting: 25Mbps!

6 Server Architecture Handle many concurrent clients –Posix Threads –Main Accept thread Waits for new client connection Spawns new client handler thread –Thread for each client Receives command string Adds command to command queue Sleeps –Broadcast (responder) thread Continuously processing commands unless queue is empty Selectively broadcasts to relevant clients –Movement, chat, combat to local area –Private chat, trade, to single player –Taps into player-data-storage class (updating and getting information)

7 Server Architecture

8 Life of a Command

9 Mock Screenshot


Download ppt "Chris Harrison Stacey Kuznetsov Mariya Lysenkova Jennifer Refat Gabriel Sinkin."

Similar presentations


Ads by Google