Repository navigation
Server Protocol V2.0
Thomas Lu edited this page Jan 9, 2025
·
1 revision
This page explains the protocol between client and server.


contains:
-
Stringcontains the Id of the current socket.
contains:
Map<String, PlayerData>
Stringcontains the id (id of the socket) of all players on the server.PlayerDatacontains the information of all players on the server. Stored in class PlayerData.
Every time the client receives this data package, the status of all players on clients will be updated. Including position, hp, items, rotation
contains:
Map<String, PlayerData>
Stringcontains the id (id of the socket) of all players on the server.PlayerDatacontains the information of all players on the server.
contains:
-
Stringcontains the Id (id of the socket) of the left player.
contains:
-
Stringcontains the seed of the server.
contains:
-
String playerIDThe id of the targeted player, who has done this action -
String actionTypedefines what kinds of action the player has done. -
<extra information> (undefined data structure)according to the action type, this data package may have different data.
The targeted player casts a fireball
-
float damageThe targeted player recieves the damage.
The position and direction of the player will be updated.
contains
-
float xx world position -
float yy world position -
float Rxx rotation vector -
float Ryy rotation vector
contains
-
float xx world position -
float yy world position -
String namename of the player float hp-
String classtypeclass of the player ("Mage" e.g)
##Tag "playerAction" contains:
-
String targetIdThe id of the targeted player, who has done this action -
String actionTypedefines what kinds of action the player has done. -
<extra information> (undefined data structure)according to the action type, this data package may have different data.
The targeted player casts a fireball
-
float damageThe targeted player recieves the damage.