Skip to content

T4NkYF3R/Zappy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZAPPY

Second year Epitech end project


🧠 About

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)

📂 Project Structure

.
├── assets
├── tests
├── src
│   ├── zappy_ai
│   ├── zappy_client
│   └── zappy_server
├── zappy_ref-v3.0.1
├── Makefile
├── README.md
└── test.sh

🔧 Build Instructions

make

This will:

  • Build the zappy_server binary
  • Build the zappy_client binary (GUI)
  • Build the zappy_ai binary

Clean with:

make clean

🚀 Usage

Server

./zappy_server -p <port> -x <width> -y <height> -n <team1> <team2> ... -c <clients-per-team> -f <frequency>

GUI Client

./zappy_gui -p <port> -h <host>

AI Client

./zappy_ai -p <port> -n <team-name> -h <host>

TEST

Quick test to see how AI work with the default server & GUI

./test.sh

🎮 Game Objective

Each 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

🌍 World Overview

  • 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

📦 Protocol Overview

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.


🔧 Technical Highlights

  • 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 GRAPHIC team and uses a standardized protocol for updates and world state.


🛠️ Development Plan

  1. Build dynamic game logic scaffold
  2. Implement server socket manager and poll-based event loop
  3. Connect server to game logic via dynamic linking
  4. Handle player connection, command dispatch, and response generation
  5. Implement elevation logic, resource management, and map
  6. Expand GUI and AI logic

👤 Authors


📜 License

This project is part of Epitech’s academic curriculum and is not licensed for commercial use.

About

Epitech second-year final project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors