65 lines
612 B
Markdown
65 lines
612 B
Markdown
# Packet Types
|
|
|
|
This document describes planned packet types for the multiplayer prototype.
|
|
|
|
## Welcome Packet
|
|
|
|
Sent from server to client after connection.
|
|
|
|
Fields:
|
|
|
|
```text
|
|
type
|
|
playerId
|
|
serverTime
|
|
```
|
|
|
|
## Transform Packet
|
|
|
|
Sent from client to server and broadcast to other clients.
|
|
|
|
Fields:
|
|
|
|
```text
|
|
type
|
|
playerId
|
|
cellId
|
|
worldspaceId
|
|
x
|
|
y
|
|
z
|
|
pitch
|
|
yaw
|
|
roll
|
|
timestamp
|
|
```
|
|
|
|
## Animation State Packet
|
|
|
|
Planned later.
|
|
|
|
Fields:
|
|
|
|
```text
|
|
type
|
|
playerId
|
|
movementState
|
|
weaponDrawn
|
|
isCrouching
|
|
isSprinting
|
|
isAiming
|
|
isFiring
|
|
```
|
|
|
|
## Disconnect Packet
|
|
|
|
Sent when a player leaves.
|
|
|
|
Fields:
|
|
|
|
```text
|
|
type
|
|
playerId
|
|
reason
|
|
```
|