OgloTheNerd's Website (fultiples>network_spec.html)

Fultiples - Network Specification

This document will go over the Fultiples network specification. The purpose of this specification is to make it so clients and servers designed for Fultiples can connect and talk to each other no matter what programming language or design they use.

Current Specification Version (This Changes With Each New Change)

This number is always a positive integer.

Version: 0

Communication Model

Fultiples (multiplayer over a network) functions on a client and server model. The clients connect to a server and send messages such as where they made their move, and the server sends back messages telling the client various things like whether or not a move succeeded or failed, or if it is their turn or not.

How To Read Client/Server Specifications (In This Document)

Specification (Network Datatypes)

Name Layout Description
Vec2 x:u16 y:u16 A type that stores 2 integer parameters big enough for sizes or positions.
ClientConnectInfo spec_version:u32 A data structure that stores information about the connection coming from the client to the server.

Serialization & Deserialization

Serialization

Deserialization

Specification (Client)

Message Table

Message Opcode Carried Data Description
Connect 0x0 connect_info:ClientConnectInfo Message sent when the client is connecting to a server.
Disconnect 0x1 Message sent when the client is disconnecting from the server.
Shade 0x2 cell_position:Vec2 Message sent when the client is making a move and choosing a cell on the board to shade.
GetSize 0x3 Message sent when the client wants to know the board size.
GetCell 0x4 cell_position:Vec2 Message sent when the client wants to know the value of a given cell on the board.

Specification (Server)

Message Table

Message Opcode Carried Data Description
Kicked 0x0 Message sent to a client when it is kicked from the server.
ConnectionAccepted 0x1 Message sent to clients with valid connection requests.
ConnectionRejected 0x2 Message sent to clients with invalid connection requests.
Winner 0x3 Message sent to the winner’s client.
Loser 0x4 Message sent to the loser’s client.
ClientTurn 0x5 Message sent to the current turn’s client once it is their turn.
NotClientTurn 0x6 Message sent to the other clients who don’t currently have the turn (this is just to notify them in case they had the previous turn or something like that)
TurnSuccess 0x7 Message sent to a client when their turn succeeded.
TurnFail 0x8 Message sent to a client when their turn failed.
BoardSize 0x9 size:Vec2 Message sent to a client telling them what the board size is.
BoardCell 0xA cell_position:Vec2 value:i32 Message sent to a client telling them what the value of a given cell is.
TurnTimeLimit 0xB seconds:u16 Message sent to a client when there are turn time limits (in seconds). If this message is never sent, there are no turn time limits.