33 "usage: r-type_server [--tcp-port <port>] [--udp-port <port>] [--waves <file.json>]\n"
34 " [--max-packet-rate <datagrams per second>] [--compress <bytes>]\n"
35 " [--max-rooms <count>] [--scores <file.json>] [--bans <file.json>]\n"
36 " [--trace <file.json>] [--help] [--version]\n";
57 std::optional<std::filesystem::path>
waves;
71 std::optional<std::filesystem::path>
trace;
80[[nodiscard]] std::variant<ServerOptions, std::string>
R-Type game code, built on the Aegis2D engine.
Definition enemy_scripts.hpp:16
constexpr std::uint32_t default_packet_rate
Datagrams accepted per second from one address when --max-packet-rate is not given; see RateLimits.
Definition server_options.hpp:21
ServerCommand
What the server was asked to do.
Definition server_options.hpp:39
@ Version
Print the version and exit.
@ Help
Print the usage and exit.
@ Run
Start the game and listen on the ports.
constexpr std::string_view default_bans_file
File of the banned addresses, in the folder the server runs from.
Definition server_options.hpp:29
constexpr std::uint16_t default_udp_port
UDP port the server listens on when --udp-port is not given.
Definition server_options.hpp:18
constexpr std::string_view server_usage
Usage line printed by --help and after a command line error.
Definition server_options.hpp:32
constexpr std::uint32_t default_max_rooms
Rooms played at once when --max-rooms is not given; see GameServer.
Definition server_options.hpp:23
constexpr std::uint16_t default_tcp_port
TCP port the server listens on when --tcp-port is not given.
Definition server_options.hpp:16
constexpr std::string_view default_scores_file
File of the best scores, in the folder the server runs from.
Definition server_options.hpp:26
std::variant< ServerOptions, std::string > parse_server_options(std::span< const std::string_view > args)
Reads the command line of r-type_server.
Settings of a server run, read from the command line.
Definition server_options.hpp:49
std::optional< std::filesystem::path > trace
File the timings of every tick are written to when the server stops, in the Chrome trace format (Perf...
Definition server_options.hpp:71
std::uint16_t tcp_port
TCP port of the logins; 0 lets the system pick a free one.
Definition server_options.hpp:53
std::uint32_t max_rooms
Rooms played at once, 1 to 64, tuning::max_players in each.
Definition server_options.hpp:64
std::filesystem::path scores
File of the best scores (Scoreboard).
Definition server_options.hpp:66
ServerCommand command
What to do; the other fields only matter for ServerCommand::Run.
Definition server_options.hpp:51
std::filesystem::path bans
File of the banned addresses (BanList).
Definition server_options.hpp:68
std::uint16_t udp_port
UDP port of the game; 0 lets the system pick a free one.
Definition server_options.hpp:55
std::uint32_t packet_rate
Datagrams accepted per second from one address, 1 to 100000.
Definition server_options.hpp:59
std::optional< std::size_t > compress_from
Size from which snapshots and events are sent compressed with LZ4 when that makes them smaller,...
Definition server_options.hpp:62
std::optional< std::filesystem::path > waves
Waves file to play, or std::nullopt for default_waves_file().
Definition server_options.hpp:57