Working on the networking protocol
+1
-1
@@ -25,7 +25,7 @@ If this wiki is missing something, it means I haven't gotten to it yet.
|
|||||||
* NPCs
|
* NPCs
|
||||||
* Technical Information
|
* Technical Information
|
||||||
* [Program Architecture](wiki/program-architecture)
|
* [Program Architecture](wiki/program-architecture)
|
||||||
* server & client communication protocol
|
* [Networking Protocol](wiki/networking-protocol)
|
||||||
* modding outline
|
* modding outline
|
||||||
* [Notes](wiki/notes) & [Scraps](wiki/scrapped-gdd)
|
* [Notes](wiki/notes) & [Scraps](wiki/scrapped-gdd)
|
||||||
* [Todo List](wiki/todo-list)
|
* [Todo List](wiki/todo-list)
|
||||||
|
|||||||
+18
-21
@@ -1,22 +1,19 @@
|
|||||||
Networking protocol:
|
These are the basic networking protocols used by the client and server programs.
|
||||||
//connections
|
|
||||||
ping:
|
#### Packet Types
|
||||||
ping the server
|
|
||||||
pong:
|
* ping "are you there?"
|
||||||
a response to a ping
|
* pong "I am here"
|
||||||
join request:
|
* broadcast request "what servers are available?"
|
||||||
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.
|
* broadcast response "I am available"
|
||||||
join confirm:
|
* join request "can I play? here's my data"
|
||||||
the response to a join request, this makes the client enter the game proper, and carries the client's playerID.
|
* join confirm "yes, here's your data"
|
||||||
disconnect:
|
* disconnect "I/you need to go"
|
||||||
from either the client or server, this officially ends communications between the two programs
|
|
||||||
|
* 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
|
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ All entities on the server have a unique, unsigned index.
|
|||||||
* client index
|
* client index
|
||||||
* channel
|
* channel
|
||||||
* address
|
* address
|
||||||
|
* last contact time
|
||||||
|
* ping count (number of times this client has been pinged, disconnect if it's too high)
|
||||||
* player index
|
* player index
|
||||||
|
|
||||||
#### Player Information
|
#### Player Information
|
||||||
|
|||||||
+1
@@ -8,3 +8,4 @@
|
|||||||
* zero the packet data?
|
* zero the packet data?
|
||||||
* Update the networking outline
|
* Update the networking outline
|
||||||
* I should really use "index" instead of "ID" for naming things
|
* I should really use "index" instead of "ID" for naming things
|
||||||
|
* What if a bounding box could have a vector added to it?
|
||||||
Reference in New Issue
Block a user