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
Tileclass (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) % widthon 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 × heighttiles, 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
Resourceenum (server/srcs/world/Tile.hpp:22):Index Resource Role 0 foodFood: keeps the player alive 1 linemateElevation stone 2 deraumereElevation stone 3 siburElevation stone 4 mendianeElevation stone 5 phirasElevation stone 6 thystameElevation 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 (
linematethroughthystame). 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 × heightinstances of each resource on the map and periodically tops up the shortfall. Default values (server/srcs/world/RessourceSpawner.hpp):Resource Density food0.5 linemate0.3 deraumere0.15 sibur0.1 mendiane0.1 phiras0.08 thystame0.05
Players and progression¶
- Inventory
- The stock of resources a player carries. The
Inventorycommand returns the list[food n, linemate n, ...]. - Vision / Look
- A player's field of perception. The
Lookcommand returns the set of visible tiles, from nearest to farthest. Range grows with level: the row at distancedholds2·d + 1tiles 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
-ceggs 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 (
Forkcommand, 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 nameGRAPHICis 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
-foption: one time unit lasts1000 / fmilliseconds (server/srcs/scheduler/Scheduler.cpp). The largerf, the faster the game. Every AI command has a delay expressed in time units before its effect occurs (for exampleForward= 7,Incantation= 300). - Broadcast
- A sound message a player emits to the whole map (
Broadcast <text>command). Every other player receives it asmessage K, <text>. - Sound direction
K - Integer from 0 to 8 indicating where a received broadcast comes from,
relative to the receiver's orientation.
K = 0means "same tile as the sender";1to8denote the eight directions around the player. The server computesKfrom 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 (
Ejectcommand). Each victim receiveseject: 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.