A networked game platform where AI players gather resources and evolve on a tile-based world called Trantor. This project demonstrates the implementation of a game server, graphical client, and autonomous AI in a distributed system.
Zappy is structured in three main components:
- A server (C) that manages the game world and all game logic
- A graphical client (C++) that visualizes the game state
- AI clients (Python) that control individual players
Players must collect resources, level up through elevation rituals, and work together to become the first team to get 6 players to the maximum level.
Our custom editor allows real-time interaction with the game world:
- Select and inspect any entity on the map
- Trigger and monitor broadcasts between players
- Watch and control elevation rituals
- Track resource distribution
- Monitor team progress and player status
The isometric game world provides clear visualization of:
- Resource distribution across tiles
- Player positions and levels
- Team differentiations
- Ongoing rituals and broadcasts
The Zappy GUI includes a powerful built-in editor that provides real-time control and monitoring of the game:
- Click on any entity to view its detailed information
- Track player inventory and status
- Monitor resource counts per tile
- View team affiliations and levels
- Track and trigger broadcast messages
- Monitor elevation rituals in progress
- Watch resource spawning events
- Follow player movements and actions
- Force spawn resources
- Trigger specific game events
- Monitor server-client synchronization
- View detailed entity states
- Multi-threaded game server built in C
- Manages all game logic and world state
- Handles multiple simultaneous client connections
- Resource management and spawning system
- Implements complete game rules including elevation rituals
- Uses select() for non-blocking socket multiplexing
- Built with Raylib and ImGui
- Isometric visualization of the game world
- Real-time game state updates
- Resource and player visualization
- Team/player status tracking
- Sound system integration
- Written in Python
- Autonomous player control
- Resource gathering strategy
- Team coordination capabilities
- Elevation ritual management
- C compiler (gcc recommended)
- C++17 compatible compiler
- Python 3.x
- CMake
# Clone the repository
git clone https://github.com/mielsense/zappy
cd zappy
# Build the server
make zappy_server
# Build the graphical client
make zappy_gui
# Build the AI client
make zappy_ai
- Start the server:
./zappy_server -p port -x width -y height -n name1 name2 ... -c clientsNb -f freq
Server arguments:
-p port
: Port number-x width
: World width-y height
: World height-n names
: Team names-c clientsNb
: Max clients per team-f freq
: Time unit reciprocal
- Start the graphical client:
./zappy_gui -p port -h machine
GUI arguments:
-p port
: Port number-h machine
: Server hostname
- Launch AI clients:
./zappy_ai -p port -n name -h machine
AI arguments:
-p port
: Port number-n name
: Team name-h machine
: Server hostname (default: localhost)
The game world contains various resources:
- Food (essential for survival)
- Linemate
- Deraumere
- Sibur
- Mendiane
- Phiras
- Thystame
Players can level up through elevation rituals which require:
- Specific numbers of players at the same level
- Specific combinations of resources
- All participating players to be on the same tile
- Players have limited vision that increases with level
- Players can broadcast messages to communicate
- Sound propagates in specific directions
The server implements two separate protocols:
- AI Client Protocol: Controls player actions and game state updates
- GUI Protocol: Real-time visualization data
This project was developed by a team of 5 students (including me), I handled all the GUI part.
This project is licensed under the terms of the LICENSE file included in this repository.