Second year Epitech end project
Zappy is a real-time multiplayer network game where teams of AI-controlled players compete on a tile-based world to evolve through levels by collecting resources and performing elevation rituals. Inspired by Douglas Adams' chaotic genius, the world is spherical, the players are bodiless, and the competition is joyful.
This project is implemented in:
- C for the server (
zappy_server) - C++ for the GUI (
zappy_gui) - Python for the AI client (
zappy_ai)
.
├── assets
├── tests
├── src
│ ├── zappy_ai
│ ├── zappy_client
│ └── zappy_server
├── zappy_ref-v3.0.1
├── Makefile
├── README.md
└── test.sh
makeThis will:
- Build the
zappy_serverbinary - Build the
zappy_clientbinary (GUI) - Build the
zappy_aibinary
Clean with:
make clean./zappy_server -p <port> -x <width> -y <height> -n <team1> <team2> ... -c <clients-per-team> -f <frequency>./zappy_gui -p <port> -h <host>./zappy_ai -p <port> -n <team-name> -h <host>Quick test to see how AI work with the default server & GUI
./test.shEach team must evolve at least 6 players to level 8. Evolution is achieved by:
- Gathering food and magical stones
- Executing incantation rituals with other players of the same level
- Managing vision, inventory, and time
- Spherical map (wraparound on edges)
- Resources (linemate, deraumere, sibur, mendiane, phiras, thystame, food)
- Players have limited life and must eat food
- Vision increases with each level
- Communication via broadcast and directional sound
- Reproduction via eggs and team connection slots
Clients communicate with the server using newline-delimited commands such as:
| Command | Description |
|---|---|
Forward |
Move one tile ahead |
Right/Left |
Rotate |
Look |
Inspect surroundings |
Inventory |
Check items and life |
Broadcast |
Send a message to other players |
Take |
Pick up an object |
Set |
Drop an object |
Incantation |
Start elevation ritual |
Server responds with ok, ko, or structured outputs.
-
Modular Architecture The server dynamically loads the game logic via a shared library (
libzappy_game.so), separating networking and gameplay concerns. -
Efficient Polling The server uses
poll()to handle multiple clients asynchronously with no busy waiting. -
Time-Controlled Actions All actions have durations scaled by a frequency factor (
f), controlling game pace. -
Extensible GUI Protocol The GUI connects via the
GRAPHICteam and uses a standardized protocol for updates and world state.
- Build dynamic game logic scaffold
- Implement server socket manager and poll-based event loop
- Connect server to game logic via dynamic linking
- Handle player connection, command dispatch, and response generation
- Implement elevation logic, resource management, and map
- Expand GUI and AI logic
This project is part of Epitech’s academic curriculum and is not licensed for commercial use.