Skip to content

Repository files navigation

Zappy - Epitech Project

Goal

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.

Launch

To clone, build, and launch the Zappy project, please follow the instructions below:

  1. Clone the repository Do not forget to use --recurse-submodules as 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
    
  2. Build the project with CMake

    cmake -B build
    cmake --build build
    

    2.1 Alternatively, you can use Bazel (available on the feature/bazel-support branch):

    bazel build //server:zappy_server
    bazel build //gui:zappy_gui
    cd bazel-bin/
    
  3. Launch the different components

    3.1 Launch the Server:

    ./zappy_server -p 4242 -n team1 team2 -f 100 -c 10 -v 3
    

    3.2 Launch the GUI:

    ./zappy_gui -m localhost -p 4242
    

    3.3 Launch the AI:

    cd IA/
    python3 zappy_ai.py -h localhost -p 4242 -n team1
    

Server

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.

Core Libraries Used

  • Kronknet: A custom, optimized network library used to manage TCP connections. It provides clean callback mechanisms (on connect, on read, etc.) and exposes a userPtr context 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.

GUI

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.

AI

The zappy_ai application acts as an autonomous client designed to parse instructions, manage its inventory, and make survival decisions using state-machine algorithms.


Contributing

  • Server Module:
    • Clément Devaux
    • Gauthier Malfilatre
  • GUI Module:
    • Julian Hemmer
    • Romain Marcot
  • AI Module:
    • Martin Muller
    • Victor Zhou

© 2026 NIFH - National Institute for Féeria History

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages