diff --git a/Home.md b/Home.md index 6c5d94d..1776f4b 100644 --- a/Home.md +++ b/Home.md @@ -25,7 +25,7 @@ If this wiki is missing something, it means I haven't gotten to it yet. * NPCs * Technical Information * [Program Architecture](wiki/program-architecture) - * server & client communication protocol + * [Networking Protocol](wiki/networking-protocol) * modding outline * [Notes](wiki/notes) & [Scraps](wiki/scrapped-gdd) * [Todo List](wiki/todo-list) diff --git a/networking-protocol.md b/networking-protocol.md index 8d11c89..220e093 100644 --- a/networking-protocol.md +++ b/networking-protocol.md @@ -1,22 +1,19 @@ -Networking protocol: - //connections - ping: - ping the server - pong: - a response to a ping - join request: - from client to server, this is the initial contact the client makes. it carries all of the client's information, like the handle, avatar, etc. - join confirm: - the response to a join request, this makes the client enter the game proper, and carries the client's playerID. - disconnect: - from either the client or server, this officially ends communications between the two programs +These are the basic networking protocols used by the client and server programs. + +#### Packet Types + +* ping "are you there?" +* pong "I am here" +* broadcast request "what servers are available?" +* broadcast response "I am available" +* join request "can I play? here's my data" +* join confirm "yes, here's your data" +* disconnect "I/you need to go" + +* synchronize +* new player +* delete player +* movement + +#### Procedure - //information control - synchronize: - update both the server and client - new player: - a new player enters the world. carries all player info - delete player: - a player leaves the world, carries the player ID - movement: - this is the initial position and motion of a player in the world. it is relayed to all clients, and progresses using delta progression diff --git a/program-architecture.md b/program-architecture.md index e62bf37..d2e67ae 100644 --- a/program-architecture.md +++ b/program-architecture.md @@ -74,6 +74,8 @@ All entities on the server have a unique, unsigned index. * client index * channel * address +* last contact time +* ping count (number of times this client has been pinged, disconnect if it's too high) * player index #### Player Information diff --git a/todo-list.md b/todo-list.md index a9a6978..bebfbea 100644 --- a/todo-list.md +++ b/todo-list.md @@ -8,3 +8,4 @@ * zero the packet data? * Update the networking outline * I should really use "index" instead of "ID" for naming things +* What if a bounding box could have a vector added to it? \ No newline at end of file