The goal of the Zappy project is to build an ecosystem composed of 3 distinct binaries:
- Server: Runs the entire game world and rules.
- GUI: Visualizes the map, players, and events in real-time.
- AI: Controls autonomous drones competing to survive and evolve.
To clone, build, and launch the Zappy project, please follow the instructions below:
-
Clone the repository Do not forget to use
--recurse-submodulesas this project relies heavily on several internal submodules:git clone [https://github.com/EpitechPGE2-2025/G-YEP-400-NCY-4-1-zappy-3](https://github.com/EpitechPGE2-2025/G-YEP-400-NCY-4-1-zappy-3) zappy/ --recurse-submodules -j8 -
Build the project with CMake
cmake -B build cmake --build build2.1 Alternatively, you can use Bazel (available on the
feature/bazel-supportbranch):bazel build //server:zappy_server bazel build //gui:zappy_gui cd bazel-bin/ -
Launch the different components
3.1 Launch the Server:
./zappy_server -p 4242 -n team1 team2 -f 100 -c 10 -v 33.2 Launch the GUI:
./zappy_gui -m localhost -p 42423.3 Launch the AI:
cd IA/ python3 zappy_ai.py -h localhost -p 4242 -n team1
The zappy_server is a tick-based application designed to ensure absolute deterministic simulation. Because actions are calculated using server-side ticks rather than delta-time, physics glitches or movement speed exploits caused by client lag are completely eliminated.
The server hosts a high-performance network layer allowing asynchronous TCP communication between all connected clients (AIs and GUIs):
- The GUI continuously polls and retrieves state commands to display the world.
- The AIs send action commands (e.g.,
Forward,Look,Take) to interact with the environment.
- Kronknet: A custom, optimized network library used to manage TCP connections. It provides clean callback mechanisms (on connect, on read, etc.) and exposes a
userPtrcontext payload, which enables effortless retrieval of player contexts directly inside event hooks. - Prophecy: A lightweight task-scheduler library. When an AI triggers a delayed action like
Fork, the server creates a delayed task and hands it over to Prophecy, scheduling its execution exactly 42 ticks into the future. - Argot: Used for flexible command-line argument parsing. It sets up strict options (like
--port (-p)) and safely extracts configuration fallback constraints (e.g.,get("port", default_value=4242)).
Submodules:
- kronknet — Custom Event-Driven Socket Engine.
- prophecy — Tick-Based Priority Task Scheduler.
- argot — Strict Argument Parsing Utility.
The zappy_gui application displays the game universe graphically.
Key Features:
- Custom Entity-Component-System (ECS) architecture for efficient rendering updates.
- Pure OpenGL graphics context pipeline.
- Custom software implementation of Rasterization mechanics.
The zappy_ai application acts as an autonomous client designed to parse instructions, manage its inventory, and make survival decisions using state-machine algorithms.
- Server Module:
- Clément Devaux
- Gauthier Malfilatre
- GUI Module:
- Julian Hemmer
- Romain Marcot
- AI Module:
- Martin Muller
- Victor Zhou