Banner reading 'ttydServ Wiki'

Battle System

Building and Running ttydServ



Sample output of ttydServ on the command line
Sample output of ttydServ on the command line. Click the picture to see a larger version
This page contains information about how to build and host an instance of ttydServ. Note that it has only been tested on Debian systems. The source code can be found on my GitHub.



Building

There are few things required for the compilation of ttydServ. No packages are required to be installed besides g++ and pthreads (if not already installed). It does, however, use the RapidJSON C++ library for parsing the map and NPC files. The files for RapidJSON are included in the download and must be present in the same directory as main.cpp upon compilation. The command used for building ttydServ is as follows:

g++ main.cpp send_to_clients.cpp receive_from_clients.cpp calculate_fights.cpp -o server -pthread

There is also an included Makefile which will build the executable upon simply running:

make


Running

Running the server on the command line
Running the server on the command line. Click the picture to see a larger version
After building, ttydServ can be run using the generated "server" executable. The server will listen on the port provided as a parameter.

./server [port_number]