A TCP server built on top of the Trogdor++ library for the purpose of hosting one or more multi-player games. This is part of the Trogdor++ project.
The Trogdor++ core library supports running many multi-player games in parallel, but without a driving application to take advantage of those features, the library would be worthless. Trogdord fills this gap by wrapping around core to host and manage games over a network.
Trogdord is designed to work in tandem with a client-side connector, such as the official PHP extension or the Node.js module, both of which are provided by this repository.
The following links detail how to build, install, configure, and use trogdord.
- Dependencies
- Installation
- Copyright and License
- What Can Trogdord Do?
- Quickstart Guide
- Configuration
- Security
If you're interested in writing your own client-side connector, or just want to learn more about how trogdord works, you'll find the below links beneficial.
- G++ 7+ or Clang++ 8+. A different compiler might work, but it hasn't been tested, so you're on your own.
- CMake 3.10 or above
- Standalone ASIO library >=1.10 (libasio-dev package on Ubuntu)
- INIH (INI Not Invented Here) (libinih1 and libinih-dev packages on Ubuntu)
- RapidJSON >= 1.1.0
- SQLite >= 3.0
- Hiredis 0.13+ (optional, for Redis Pub/Sub support in trogdord)
- The core library, installed as a shared object or DLL in a place where CMake can find it (corresponds to the trogdor build target)
There are currently pre-built packages for Ubuntu 22.04, and if you run that operating system, you can install the latest stable version with the following commands:
sudo add-apt-repository ppa:crankycyclops/trogdor-pp
sudo apt-get update
sudo apt-get install trogdord
First, make sure the core library was built and installed to a place where pkg-config can find it. Then, issue these commands:
cd src/trogdord && cmake -DCMAKE_BUILD_TYPE=Release .
make trogdord && make install
To build trogdord with redis support, add -DENABLE_REDIS=ON
to your cmake command above.
If the core library was compiled with either the JSON or SQLite3 serialization drivers (or both), they will be available to trogdord for dumping and restoring games.
If you need debug symbols, add the following option to your cmake command: -DCMAKE_BUILD_TYPE=Debug
. If you've already built it using debug symbols in the past and want to switch back to a release build, use this cmake option instead: -DCMAKE_BUILD_TYPE=Release
.
If you need to install relative to a custom path, add this to your cmake command: -DCMAKE_INSTALL_PREFIX:PATH=/your/custom/prefix
.
If you're on Ubuntu 18.04 or below and install the inih library through apt-get, you'll find that files for pkg-config aren't included, and thus, CMake won't be able to find them. You can get around this by setting the environment variable INIH_INCLUDE_DIRS
to the path where the inih header is installed (/usr/include on Ubuntu 18.04.) Ubuntu 20.04 and above include support for pkg-config, so in that case you should be able to build without this workaround.
For example (this works on Ubuntu 18.04):
INIH_INCLUDE_DIRS="/usr/include" cmake -DCMAKE_BUILD_TYPE=Release .
Trogdord, if compiled on a platform that supports libdl for dynamic linking, supports writing and loading extensions (support for other platforms like Windows may or may not materialize in the future.) This support is automatically built-in, but can be disabled in trogdord.ini.
See the "Hello, World" extension for a buildable example that serves as a template that can be copied and adapted for other projects.
Trogdor++ and Trogdord are licensed under the GPL 3.0 and are Copyright © 2013 - Present by James Colannino.