Status: in progress
The goal of this project is to create a network game where several teams confront on a tiles map containing resources. The winning team is the first one where at least 6 players who reach the maximum elevation.
Zappy is an interesting project that integrates concepts from networking, multi-threading, and AI into a competitive game environment.
-
Part 1: The Game Environment and Rules At its core, Zappy is a resource gathering game played on a grid map. The map contains various resources and the game includes several teams, each composed of players referred to as Trantorians. The primary goal is for these Trantorians to gather enough resources and evolve to the highest level. They evolve by conducting incantations, which require a specific quantity of each resource and a certain number of Trantorians at the same level. The first team to elevate a Trantorian to the highest level wins the game.
-
Part 2: The Networking and Multi-threading To create a live gaming experience, Zappy uses a client-server architecture, with the server handling the main game logic and maintaining the game state. Trantorians are managed by AI clients, which connect to the server and send commands representing the actions of their Trantorian. The server, in return, sends updates about the game state. The server must be capable of handling multiple clients at once, requiring the use of multi-threaded programming.
-
Part 3: The AI The Trantorians in Zappy are controlled by AI. This AI decides what actions the Trantorians should take based on the current state of the game. This could involve gathering resources, conducting an incantation, or interacting with other Trantorians. It's this AI element that makes Zappy a fascinating project: beyond the technical challenges of building the game server, participants can also dive into the complexities of creating an AI strategy to win the game.Thus, Zappy is not just about building a server—it's about creating a competitive environment where AI strategies can be put to the test.
# Clone repository
$ git clone https://github.com/MasterLaplace/Zappyno.git
$ cd Zappyno
# Dependencies
$ make
# Run Zappy Server
$ ./zappy_server -h
# Run Zappy Gui
$ ./zappy_gui [-h/-help]
# Run Zappy AI
$ ./zappy_ai [-h/-help]
# Run tests
$ make tests_run
# Clean
$ make clean
Key | Action |
---|---|
ESC |
Quit |
F1 |
Pause Music |
UP /Z |
Move up |
RIGHT /D |
Move right |
DOWN /S |
Move down |
LEFT /Q |
Move left |
Scroll |
Zoom |
.
├── AI # AI client code
│ ├── Docs
│ └── src
├── Docs # Documentation directory
├── GUI # GUI code
│ ├── assets
│ │ ├── fonts
│ │ ├── rock_assets
│ │ └── sounds
│ ├── Docs
│ ├── includes
│ ├── obj
│ ├── Script
│ │ └── Install
│ ├── src
│ │ ├── Core
│ │ ├── Engine
│ │ ├── Interface
│ │ ├── Manager
│ │ └── Utils
│ │ ├── Math
│ │ ├── Network
│ │ ├── Parser
│ │ ├── String
│ │ └── Wrapper
│ │ └── SfWrapper
│ └── tests
└── Server # Server code
├── Docs
├── include
├── src
│ ├── free_all
│ ├── network
│ ├── parser_params_and_check
│ ├── recv_packages
│ │ ├── ai
│ │ ├── connection
│ │ └── gui
│ ├── send_packages
│ │ ├── ai
│ │ ├── connection
│ │ └── gui
│ └── utils
└── tests
Here's more documentation about the project
This project is licensed under the terms of the MIT License.
Copyright © 2023-2024 :