Skip to main content

In game client to server controls

Scope

THis document describes the messages clients will send to the server to inform the server about inputs on their end.

The following assumptions are made:

  • UDP
  • Packet length up to 512 bytes total (https://stackoverflow.com/questions/1098897/what-is-the-largest-safe-udp-packet-size-on-the-internet ?)
  • No need for auth, ect, players ips will be known from the server so will recognize senders like that

Packet structure

Field Length Description Notes
Message Type 1 byte Indicates the type of data of the remainder of the packet I really hope we never get past 255 different types....
Content Up to 511 bytes The actual data of the request

Message Type

The following values are accepted for the Message Type field.

Value Description
0 Basic Controls
1-255 Reserved for future use

Content

Basic Controls

A message of this type is 1 byte long. Each bit has the following meaning:

Value Description
0
1
2
3
4 🇦
5 🇧
6 Select
7 Start

TODO

Soemthing to say the client is leaving the game? IDK?