From 48efb28695e0363426213d13d17b3d7d6dad5c09 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sun, 9 Jun 2013 17:18:35 +1000 Subject: [PATCH] No Message --- networking-protocol.md | 29 ++++++++++++++++++++++++----- notes.md | 10 ++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/networking-protocol.md b/networking-protocol.md index 220e093..e731e16 100644 --- a/networking-protocol.md +++ b/networking-protocol.md @@ -2,6 +2,8 @@ These are the basic networking protocols used by the client and server programs. #### Packet Types +* none "problem" + * ping "are you there?" * pong "I am here" * broadcast request "what servers are available?" @@ -10,10 +12,27 @@ These are the basic networking protocols used by the client and server programs. * join confirm "yes, here's your data" * disconnect "I/you need to go" -* synchronize -* new player -* delete player -* movement +* synchronize "send me all of the data you've got" +* player new "create this player at this location" +* player delete "delete this player" +* player move "this is the player's new movement data" -#### Procedure +#### Procedures +connecting to a server: + +* client sends a broadcast +* server responds with data (name, version) +* client sends a join request +* server responds with data (player index, resource list) +* client switches to resource loading/game mode +* client sends sync request + +in the game: + +* either sends player new command +* either receives player new command; server relays this command +* either sends player delete command +* either receives player delete command; server relays this command +* either sends player move command +* either receives player move command; server relays this command \ No newline at end of file diff --git a/notes.md b/notes.md index 70c382a..86357fc 100644 --- a/notes.md +++ b/notes.md @@ -20,3 +20,13 @@ Should the server program have a UI? Or at least allow some sort of input at the #### Equipment Equipment should be items, but should the item object be placed in the equipment slot when it's equiped? Or should the slot gain certain traits, and the item is removed from the game? +#### Scratchings + +Server Room: +* constructor +* destructor +* roomIndex +* game map +* player list +* monster list +* combat entrance list \ No newline at end of file