Skip to main content

ZAPPY - GUI Protocol

πŸ“– Overview​

This document describes the client/server communication protocol used in the Zappy graphical user interface (GUI). It includes symbol definitions, server-to-client and client-to-server command formats, and explanations of game events and data structures.


🧩 Symbol Definitions​

SymbolMeaning
XWidth or horizontal position
YHeight or vertical position
q0Resource 0 (Food) quantity
q1Resource 1 (Linemate) quantity
q2Resource 2 (Deraumere) quantity
q3Resource 3 (Sibur) quantity
q4Resource 4 (Mendiane) quantity
q5Resource 5 (Phiras) quantity
q6Resource 6 (Thystame) quantity
nPlayer number
OOrientation: 1=N, 2=E, 3=S, 4=W
LPlayer or incantation level
eEgg number
TTime unit
NTeam name
RIncantation result
MMessage
iResource number

πŸ” Server β†’ Client Commands​

Command FormatDescription
msz X YMap size
bct X Y q0 q1 q2 q3 q4 q5 q6Content of a single tile
tna NName of a team
pnw #n X Y O L NConnection of a new player
ppo #n X Y OPlayer position
plv #n LPlayer level
pin #n X Y q0 q1 q2 q3 q4 q5 q6Player inventory
pex #nExpulsion
pbc #n MBroadcast message
pic X Y L #n #n ...Start of an incantation
pie X Y REnd of an incantation
pfk #nPlayer laid an egg
pdr #n iPlayer dropped a resource
pgt #n iPlayer collected a resource
pdi #nPlayer died
enw #e #n X YEgg laid by player
ebo #eEgg connects as a player
edi #eEgg died
sgt TTime unit value
sst TModify time unit
seg NEnd of game
smg MServer message
sucUnknown command
sbpCommand parameter error
pingSend the response to see the delay with the server

🧭 Client β†’ Server Commands​

Command FormatDescription
ppo #nRequest player position
mct #nRequest map datas
plv #nRequest player level
pin #nRequest player inventory
sgtRequest time unit
sst TSet time unit
pingWait the response to see the delay with the server
levelup #nLevel up by one level the player N

πŸ“ Notes​

  • Tous les messages Γ©changΓ©s se terminent par un saut de ligne (\n).
  • Les identifiants de joueurs et d'Ε“ufs sont prΓ©cΓ©dΓ©s du symbole #, par exemple #1, #42.
  • Les ressources sont indexΓ©es de 0 Γ  6, selon la table suivante :
    • 0 β€” Nourriture (food)
    • 1 β€” Linemate
    • 2 β€” Deraumere
    • 3 β€” Sibur
    • 4 β€” Mendiane
    • 5 β€” Phiras
    • 6 β€” Thystame

πŸ“Œ Version​

Protocol Version: 1v 3.3