Some small fixes (#4140)

* Some small fixes

* Some small fixes

added more fixes

* more wording improvements

* Fixed compilation failure

* More grammar and spelling
This commit is contained in:
Alistair Findlay 2019-11-17 04:33:15 +11:00 committed by Benau
parent c990296cf6
commit 10b2713093
4 changed files with 34 additions and 33 deletions

View File

@ -30,7 +30,7 @@ The current server configuration xml looks like this:
<!-- Name of server, encode in XML if you want to use unicode characters. -->
<server-name value="stk server" />
<!-- Port used in server, if you specify 0, it will use the server port specified in stk_config.xml or if random-server-port is enabled in user config, than any port. STK will auto change to random port if the port you specify failed to be bound. -->
<!-- "Port used in server, if you specify 0, it will use the server port specified in stk_config.xml. If you wish to use a random port, set random-server-port="1" in user config. STK will automatically switch to a random port if the port you specify fails to be bound." -->
<server-port value="0" />
<!-- Game mode in server, 0 is normal race (grand prix), 1 is time trial (grand prix), 3 is normal race, 4 time trial, 6 is soccer, 7 is free-for-all and 8 is capture the flag. Notice: grand prix server doesn't allow for players to join and wait for ongoing game. -->
@ -51,25 +51,25 @@ The current server configuration xml looks like this:
<!-- Enable network console, which can do for example kickban. -->
<enable-console value="false" />
<!-- Maximum number of players on the server, setting it more than 8 will have performance degradation. -->
<!-- Maximum number of players on the server, setting this to a value higher than 8 can cause performance degradation. -->
<server-max-players value="8" />
<!-- Password for private server, empty for a public server. -->
<!-- Password for private server, leave empty for a public server. -->
<private-server-password value="" />
<!-- Message of today shown in lobby, you can enter encoded XML words here or a file.txt and let STK load it. -->
<motd value="" />
<!-- If off this server will ignore chat message from all players. -->
<!-- If this value is set to false, the server will ignore chat messages from all players. -->
<chat value="true" />
<!-- Allow players to vote track to play, if off server will pick next track to play randomly. -->
<!-- Allow players to vote for which track to play. If this value is set to false, the server will randomly pick the next track to play. -->
<track-voting value="true" />
<!-- Timeout in seconds for selecting karts and (or) voting tracks in server, you may want to use a lower value if you have track-voting off. -->
<!-- Timeout in seconds for selecting karts and (or) voting for tracks in server, you may want to use a lower value if you have track-voting off. -->
<voting-timeout value="30" />
<!-- Timeout in seconds for validation of clients in wan, currently stk will use the stk-addons server to share AES key between client and server. -->
<!-- Timeout in seconds for validation of clients in wan, currently stk will use the stk-addons server to share AES key between the client and server. -->
<validation-timeout value="20" />
<!-- By default WAN server will always validate player and LAN will not, disable it to allow non-validated player in WAN. -->
@ -78,7 +78,7 @@ The current server configuration xml looks like this:
<!-- Disable it to turn off all stun related code in server, it allows saving server resource if your server is not behind a firewall. -->
<firewalled-server value="true" />
<!-- Enable to allow IPv6 connection if you have a public IPv6 address. STK currently use dual-stack mode which requires server to have both IPv4 and IPv6 and listen to same port, firewalled-server will be disabled so you need to make sure this server has port forward configured properly if needed. -->
<!-- Enable to allow IPv6 connection if you have a public IPv6 address. STK currently uses dual-stack mode which requires server to have both IPv4 and IPv6 and listen to same port, firewalled-server will be disabled so you need to make sure this server has port-forwarding configured properly if needed. -->
<ipv6-server value="false" />
<!-- No server owner in lobby which can control the starting of game or kick any players. -->
@ -187,7 +187,7 @@ The current server configuration xml looks like this:
```
At the moment STK has a list of STUN servers for NAT penetration which allows players or servers behind a firewall or router to be able to connect to each other, but in case it doesn't work, you have to manually disable the firewall or port forward the port(s) used by the STK.
At the moment STK has a list of STUN servers for NAT penetration which allows players or servers behind a firewall or router to be able to connect to each other, but in case it doesn't work, you have to manually disable the firewall or port forward the port(s) used by STK.
By default STK servers use port `2759`. For example, in Ubuntu based distributions, run the following command to disable the firewall on that port:
`sudo ufw allow 2759`
@ -217,13 +217,13 @@ There is a network AI tester in STK which can use AI on player controller for se
Remove `--no-graphics` if you want to see the AI racing. You can also run network AI tester in server-only build of STK.
With the network AI tester, it's easier to for example simulate high-loaded servers or bad (high ping with packet loss) network.
With the network AI tester, it's easier to for example simulate high-loaded servers or bad networks (ones with high ping and/or packet loss).
Tested on a Raspberry Pi 3 Model B+, if you have 8 players connected to a server hosted on it, the usage of a single CPU core is ~60% and there are ~60MB of memory usage for game with heavy tracks like Cocoa Temple or Candela City on the server, you can use the above figures to consider number of STK servers hosting on a same computer.
Tested on a Raspberry Pi 3 Model B+, if you have 8 players connected to a server hosted on it, the usage of a single CPU core is ~60% and there are ~60MB of memory usage for game with heavy tracks like Cocoa Temple or Candela City on the server, you can use the above figures to estimate how many STK servers can be hosted on the same computer.
For bad network simulation, we recommend `network traffic control` by linux kernel, see [here](https://wiki.linuxfoundation.org/networking/netem) for details.
For bad network simulation, we recommend `network traffic control` by Linux kernel, see [here](https://wiki.linuxfoundation.org/networking/netem) for details.
You have the best gaming experience when choosing server having all players less than 100ms ping with no packet loss.
You will have the best gaming experience by choosing a server where all players have less than 100ms ping with no packet loss.
## Server management (Since 1.1)
@ -235,7 +235,7 @@ Currently STK uses sqlite (if building with sqlite3 on) for server management wi
You need to create a database in sqlite first, run `sqlite3 stkservers.db` in the folder where (all) your server_config.xml(s) located.
STK will automatically create a table named `v(server database version)_(your_server_config_filename_without_.xml_extension)_stats` in your database if not exists:
A table named `v(server database version)_(your_server_config_filename_without_.xml_extension)_stats` will also be created in your database if one does not exist.:
```sql
CREATE TABLE IF NOT EXISTS (table name above)
(

View File

@ -120,7 +120,7 @@ Server::Server(const XMLNode& server_info) : m_supports_encrytion(true)
return;
}
// Display server owner name if he's your friend or localhost
// Display server owner name if they're your friend or localhost
Online::OnlineProfile* opp =
PlayerManager::getCurrentPlayer()->getProfile();
// Check localhost owner
@ -159,11 +159,11 @@ Server::Server(const XMLNode& server_info) : m_supports_encrytion(true)
* \param name Name of the server.
* \param max_players Maximum number of players allowed on this server.
* \param current_players The currently connected number of players.
* \param difficulty The difficulty of server.
* \param server_mode The game modes of server (including minor and major).
* \param difficulty The difficulty of the server.
* \param server_mode The game modes of the server (including minor and major).
* \param address IP and port of the server.
* \param password_protected True if can only be joined with a password.
* \param game_started True if there is already game begun in server.
* \param game_started True if a game has already begun in the server.
* \param current_track If server is in game, store the track ident
*/
Server::Server(unsigned server_id, const core::stringw &name, int max_players,

View File

@ -205,7 +205,7 @@ void writeServerConfigToDisk()
} // writeServerConfigToDisk
// ----------------------------------------------------------------------------
/** Returns the minor and majar game mode from server database id. */
/** Returns the minor and major game mode from server database id. */
std::pair<RaceManager::MinorRaceModeType, RaceManager::MajorRaceModeType>
getLocalGameMode(int mode)
{
@ -403,7 +403,7 @@ void loadServerLobbyFromConfig()
}
}
// The extra server info has to be set before server lobby started
// The extra server info has to be set before the server lobby is started
if (server_lobby)
server_lobby->requestStart();
} // loadServerLobbyFromConfig

View File

@ -95,9 +95,9 @@ namespace ServerConfig
SERVER_CFG_PREFIX IntServerConfigParam m_server_port
SERVER_CFG_DEFAULT(IntServerConfigParam(0, "server-port",
"Port used in server, if you specify 0, it will use the server port "
"specified in stk_config.xml or if random-server-port is enabled "
"in user config, than any port. STK will auto change to random "
"port if the port you specify failed to be bound."));
"specified in stk_config.xml. If you wish to use a random port, "
"set random-server-port to '1' in user config. STK will automatically "
"switch to a random port if the port you specify fails to be bound."));
SERVER_CFG_PREFIX IntServerConfigParam m_server_mode
SERVER_CFG_DEFAULT(IntServerConfigParam(3, "server-mode",
@ -131,13 +131,13 @@ namespace ServerConfig
SERVER_CFG_PREFIX IntServerConfigParam m_server_max_players
SERVER_CFG_DEFAULT(IntServerConfigParam(8, "server-max-players",
"Maximum number of players on the server, setting it more than "
"8 will have performance degradation."));
"Maximum number of players on the server, setting this to a value "
"greater than 8 can cause performance degradation."));
SERVER_CFG_PREFIX StringServerConfigParam m_private_server_password
SERVER_CFG_DEFAULT(StringServerConfigParam("",
"private-server-password", "Password for private server, "
"empty for a public server."));
"leave empty for a public server."));
SERVER_CFG_PREFIX StringServerConfigParam m_motd
SERVER_CFG_DEFAULT(StringServerConfigParam("",
@ -146,12 +146,13 @@ namespace ServerConfig
SERVER_CFG_PREFIX BoolServerConfigParam m_chat
SERVER_CFG_DEFAULT(BoolServerConfigParam(true, "chat",
"If off this server will ignore chat message from all players."));
"If this value is set to false, the server will ignore chat messages "
"from all players."));
SERVER_CFG_PREFIX BoolServerConfigParam m_track_voting
SERVER_CFG_DEFAULT(BoolServerConfigParam(true, "track-voting",
"Allow players to vote track to play, if off server will pick next "
"track to play randomly."));
"Allow players to vote for which track to play. If this value is set "
"to false, the server will randomly pick the next track to play."));
SERVER_CFG_PREFIX FloatServerConfigParam m_voting_timeout
SERVER_CFG_DEFAULT(FloatServerConfigParam(30.0f, "voting-timeout",
@ -162,7 +163,7 @@ namespace ServerConfig
SERVER_CFG_PREFIX FloatServerConfigParam m_validation_timeout
SERVER_CFG_DEFAULT(FloatServerConfigParam(20.0f, "validation-timeout",
"Timeout in seconds for validation of clients in wan, currently "
"stk will use the stk-addons server to share AES key between client "
"stk will use the stk-addons server to share AES key between the client "
"and server."));
SERVER_CFG_PREFIX BoolServerConfigParam m_validating_player
@ -173,15 +174,15 @@ namespace ServerConfig
SERVER_CFG_PREFIX BoolServerConfigParam m_firewalled_server
SERVER_CFG_DEFAULT(BoolServerConfigParam(true, "firewalled-server",
"Disable it to turn off all stun related code in server, "
"it allows saving server resource if your server is not "
"it allows for saving of server resources if your server is not "
"behind a firewall."));
SERVER_CFG_PREFIX BoolServerConfigParam m_ipv6_server
SERVER_CFG_DEFAULT(BoolServerConfigParam(false, "ipv6-server",
"Enable to allow IPv6 connection if you have a public IPv6 address. "
"STK currently use dual-stack mode which requires server to have both "
"STK currently uses dual-stack mode which requires server to have both "
"IPv4 and IPv6 and listen to same port, firewalled-server will be "
"disabled so you need to make sure this server has port forward "
"disabled so you need to make sure this server has port-forwarding "
"configured properly if needed."));
SERVER_CFG_PREFIX BoolServerConfigParam m_owner_less