Skip to content

Glossary

This page defines the vocabulary of the Zappy project. Protocol technical terms (command names, codes…) stay in English because they match the text actually exchanged over the network.

World terms

Tile
Elementary cell of the map. A tile holds resources, zero or more players and possibly eggs. On the server side it is the Tile class (server/srcs/world/Tile.hpp).
Toroidal world
Borderless map: coordinates "overflow" and wrap around to the other side. Concretely, tile access applies ((x % width) + width) % width on each axis (server/srcs/world/World.cpp:47). A player stepping off the map on the right reappears on the left. All distances and movements are computed using the shortest toroidal path.
Map / dimensions
The map is a rectangle of width × height tiles, fixed at launch by the server's -x (width) and -y (height) options.

Resources

Resource

Pickable object present on a tile. There are 7 resources, indexed 0 to 6 in the protocol and the Resource enum (server/srcs/world/Tile.hpp:22):

Index Resource Role
0 food Food: keeps the player alive
1 linemate Elevation stone
2 deraumere Elevation stone
3 sibur Elevation stone
4 mendiane Elevation stone
5 phiras Elevation stone
6 thystame Elevation stone (rarest)
Food
Vital resource. Every player starts with 10 units of food. One unit is consumed every 126 time units; at zero the player dies (the server sends it dead).
Stones
The 6 non-food resources (linemate through thystame). They are consumed during incantations following exact per-level recipes.
Resource density

Fraction of tiles expected to hold each resource. The server targets density × width × height instances of each resource on the map and periodically tops up the shortfall. Default values (server/srcs/world/RessourceSpawner.hpp):

Resource Density
food 0.5
linemate 0.3
deraumere 0.15
sibur 0.1
mendiane 0.1
phiras 0.08
thystame 0.05

Players and progression

Inventory
The stock of resources a player carries. The Inventory command returns the list [food n, linemate n, ...].
Vision / Look
A player's field of perception. The Look command returns the set of visible tiles, from nearest to farthest. Range grows with level: the row at distance d holds 2·d + 1 tiles and vision extends up to a distance equal to the player's level.
Level
A player's rank, from 1 to 8. You start at level 1; each successful incantation moves you to the next level.
Incantation / Elevation
Ritual that raises the participating players by one level. On a single tile it requires a certain number of same-level players and a certain stock of stones (see Game mechanics). The incantation lasts 300 time units and the server checks the conditions twice: at start and at completion.
Egg
A future player slot for a team. At startup the server creates -c eggs per team. When an AI client connects, one of the team's eggs hatches and becomes the controlled player.
Fork
The action by which a player lays a new egg for its team (Fork command, delay 42 time units). This egg opens an extra connection slot for the team.
Team
Group of players sharing a name. Team names are fixed at server launch via -n. The reserved name GRAPHIC is forbidden (it designates the graphical client).

Time and communication

Time unit / Frequency
Game time is measured in time units. Frequency is set by the server's -f option: one time unit lasts 1000 / f milliseconds (server/srcs/scheduler/Scheduler.cpp). The larger f, the faster the game. Every AI command has a delay expressed in time units before its effect occurs (for example Forward = 7, Incantation = 300).
Broadcast
A sound message a player emits to the whole map (Broadcast <text> command). Every other player receives it as message K, <text>.
Sound direction K
Integer from 0 to 8 indicating where a received broadcast comes from, relative to the receiver's orientation. K = 0 means "same tile as the sender"; 1 to 8 denote the eight directions around the player. The server computes K from the shortest toroidal vector between sender and receiver (server/srcs/algorithms/BroadcastAlgo.cpp).
Eject
The action by which a player pushes every other player on its tile one step in the direction it faces (Eject command). Each victim receives eject: K.

Orientation direction on the protocol side

In messages destined to the GUI, a player's orientation is encoded 1 = North, 2 = East, 3 = South, 4 = West.

Warning

Some units differ between messages (for example food is reported differently to the AI and to the GUI). See Known limitations.