https://github.com/apozinn/gryphon
Gryphon is an Discord bot that turns your server into an arena of rooster champions! Inspired by Pokémon, it allows users to collect, train, and battle roosters with unique abilities and rarities.
https://github.com/apozinn/gryphon
cpp discord dpp minigame rpg-game
Last synced: 2 days ago
JSON representation
Gryphon is an Discord bot that turns your server into an arena of rooster champions! Inspired by Pokémon, it allows users to collect, train, and battle roosters with unique abilities and rarities.
- Host: GitHub
- URL: https://github.com/apozinn/gryphon
- Owner: apozinn
- License: lgpl-3.0
- Created: 2022-12-28T16:01:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-03-24T00:48:08.000Z (3 months ago)
- Last Synced: 2026-06-01T00:19:54.365Z (28 days ago)
- Topics: cpp, discord, dpp, minigame, rpg-game
- Language: C++
- Homepage:
- Size: 306 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```
██████╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗ ██████╗ ███╗ ██╗
██╔════╝ ██╔══██╗╚██╗ ██╔╝██╔══██╗██║ ██║██╔═══██╗████╗ ██║
██║ ███╗██████╔╝ ╚████╔╝ ██████╔╝███████║██║ ██║██╔██╗ ██║
██║ ██║██╔══██╗ ╚██╔╝ ██╔═══╝ ██╔══██║██║ ██║██║╚██╗██║
╚██████╔╝██║ ██║ ██║ ██║ ██║ ██║╚██████╔╝██║ ╚████║
╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
```
**A Discord battle arena where roosters are the champions.**
_Collect. Train. Fight. Dominate._
---
[](https://www.gnu.org/licenses/lgpl-3.0.html)
[](https://en.cppreference.com/w/cpp/17)
[](https://cmake.org/)
[](https://dpp.dev/)
[](https://www.mongodb.com/)
---
## What is Gryphon?
Gryphon is an open-source **Discord bot template** built around a Pokémon-inspired rooster battle system. Players collect roosters with unique classes, rarities, and skill sets — then take them into turn-based combat against other players or AI opponents through Discord's native button interface.
It is designed as a **production-grade starting point** for developers who want to ship a complex RPG-style minigame on Discord without building the architecture from scratch. The codebase is written in **modern C++17**, uses **D++ (DPP)** for Discord API interaction, and **MongoDB** for persistent game data.
> Self-hosting required. Gryphon is a template, not a hosted service.
---
## Core Mechanics
```
PLAYER A PLAYER B
──────── ────────
Rooster: [Titan] vs. Rooster: [Ember]
Class: Tank Class: Damage
HP: 340 / 340 HP: 210 / 210
[ Attack ] [ Defend ] [ Heal ] [ Skill ] [ Surrender ]
```
Every battle is driven entirely through Discord button interactions — no commands mid-fight. Roosters have persistent stats, XP progression, and class-based ability pools.
| System | Description |
| :----------------- | :----------------------------------------------------------------------------- |
| Turn-based combat | Attack, defend, heal, use skills, or surrender — each turn via Discord buttons |
| Rooster collection | Hunt for wild roosters with random stats, rarity tiers, and classes |
| Classes | Tank, Healer, and Damage archetypes, each with distinct ability sets |
| Progression | XP gain, training, and stat growth between battles |
| Economy | In-game shop, inventory, and currency system |
| Tournaments | Server-wide championships initiated by the server owner |
| League mode | Progressive PvE campaign against scaling AI opponents |
---
## Command Reference
### Profile & Utility
| Command | Description |
| :------------- | :------------------------------------ |
| `/help` | List all commands and usage |
| `/stats` | Detailed stats of your active rooster |
| `/coop` | View your full rooster collection |
| `/select ` | Set a rooster as your active fighter |
| `/history` | Log of recent battles and actions |
### Progression
| Command | Description |
| :------- | :---------------------------------------------- |
| `/hunt` | Search for a new wild rooster to capture |
| `/train` | Spend resources to level up your active rooster |
| `/moves` | View available skills for your active rooster |
### Combat & Economy
| Command | Description |
| :-------------- | :----------------------------------- |
| `/fight ` | Challenge another player to a battle |
| `/heal` | Restore your rooster's health |
| `/shop` | Open the in-game market |
| `/inventory` | View owned items and resources |
### Championship
| Command | Description |
| :------------ | :--------------------------------------------- |
| `/league` | Start a PvE progressive battle campaign |
| `/champ open` | _(Server Owner)_ Open a new server tournament |
| `/champ join` | Register your rooster in the active tournament |
---
## Tech Stack
| Layer | Technology |
| :------------ | :-------------------------------------------------------------------------------- |
| Language | C++17 |
| Discord API | [D++ (DPP)](https://github.com/brainboxdotcc/DPP) v10 |
| Database | MongoDB via [mongo-cxx-driver](https://github.com/mongodb/mongo-cxx-driver) r3.10 |
| Build System | CMake 3.16+ with FetchContent |
| Serialization | [fmt](https://github.com/fmtlib/fmt) 10.x |
All dependencies except OpenSSL are fetched and compiled automatically by CMake — no package managers required.
---
## Building from Source
### Prerequisites
The only dependency you need to install manually is **OpenSSL**. Everything else (DPP, mongo-cxx-driver, mongo-c-driver, zlib, opus, fmt) is handled automatically by CMake's `FetchContent`.
> CMake >= 3.16 and a C++17-capable compiler are also required.
---
#### Linux
**Arch / Manjaro**
```bash
sudo pacman -S openssl cmake gcc
```
**Ubuntu / Debian**
```bash
sudo apt install libssl-dev cmake build-essential
```
**Fedora / RHEL**
```bash
sudo dnf install openssl-devel cmake gcc-c++
```
**Alpine**
```bash
sudo apk add openssl-dev cmake g++ make
```
Optional but recommended — accelerates builds significantly:
```bash
# Arch
sudo pacman -S ccache mold
# Ubuntu/Debian
sudo apt install ccache mold
```
---
#### macOS
```bash
brew install openssl cmake
```
For a faster linker (optional):
```bash
brew install llvm ccache
```
---
#### Windows
Install [Visual Studio 2022](https://visualstudio.microsoft.com/) with the **"Desktop development with C++"** workload, which includes CMake and the MSVC compiler.
Then install OpenSSL via [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) or the official installer:
```powershell
winget install ShiningLight.OpenSSL
```
Or via [vcpkg](https://github.com/microsoft/vcpkg):
```powershell
vcpkg install openssl:x64-windows
```
---
### Clone and Build
```bash
git clone https://github.com/apozinn/gryphon.git
cd gryphon
```
**Linux / macOS**
```bash
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
```
**Windows (PowerShell)**
```powershell
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j $env:NUMBER_OF_PROCESSORS
```
> The first build will take 10–20 minutes as it compiles DPP, mongo-cxx-driver, and their dependencies from source. Subsequent builds with ccache are near-instant.
The compiled binary will be at:
- Linux/macOS: `build/Gryphon`
- Windows: `build\Release\Gryphon.exe`
---
## Configuration
Before running, copy the example config and fill in your credentials:
```bash
cp config-example.json config.json
```
```json
{
"token": "YOUR_DISCORD_BOT_TOKEN",
"mongo_db_uri": "YOUR_MONGODB_CONNECTION_STRING",
"language": "en_US"
}
```
| Field | Where to get it |
| :------------- | :--------------------------------------------------------------------------------------------------------- |
| `token` | [Discord Developer Portal](https://discord.com/developers/applications) — create an application, add a bot |
| `mongo_db_uri` | [MongoDB Atlas](https://www.mongodb.com/atlas) (free tier available) or a local MongoDB instance |
| `language` | Locale string, e.g. `en_US`, `pt_BR` |
**Never commit `config.json` to version control. It is already in `.gitignore`.**
---
## Running
**Linux / macOS**
```bash
./build/Gryphon
```
**Windows**
```powershell
.\build\Release\Gryphon.exe
```
For persistent deployment on Linux, consider running under `systemd` or `screen`:
```bash
screen -S gryphon ./build/Gryphon
```
---
## Project Structure
```
gryphon/
├── src/ # Source files (.cpp)
├── include/ # Header files (.hpp)
├── config-example.json # Configuration template
├── CMakeLists.txt # Build system
└── README.md
```
---
## Contributing
Contributions are welcome — bug fixes, new features, balance changes, or documentation.
1. Fork the repository
2. Create a branch: `git checkout -b feature/your-feature`
3. Commit your changes with clear messages
4. Open a Pull Request against `main`
Please keep PRs focused. One feature or fix per PR.
---
## License
Gryphon is distributed under the **[GNU Lesser General Public License v3.0 (LGPLv3)](https://www.gnu.org/licenses/lgpl-3.0.html)**.
If you fork, modify, or build on this project — credit the original author: **[apozinn](https://github.com/apozinn)**.
---
_The arena is open. Build your champion._
**[apozinn](https://github.com/apozinn)** — Gryphon