Commit Graph

65 Commits (3e625b5b1a81b00f774ca87b48d3e4f4e9d014c3)

Author SHA1 Message Date
Patric Stout 3e625b5b1a
Add: track savegame size to report with survey (#12304) 3 months ago
Rubidium 63708609fb Codechange: define the size of the PacketType enumerations 4 months ago
Rubidium 6f77c2eaa2 Codechange: use size_t for the MTU limits and remove default parameter 4 months ago
Patric Stout 89520f5665
Add: show in multiplayer the amount of hours a game has been unpaused (#11886) 4 months ago
Rubidium 564441e822 Remove: Debug redirect over network
It does not work for dedicated servers because upon starting the process to
resolve the address to redirect to gets killed. Also with all the async going
on in the network code, the debug redirection will start very late in the
process.
5 months ago
Patric Stout 5f9b8aaa95
Codechange: [Script] use nlohmann for Squirrel <-> JSON conversion (#11251) 9 months ago
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
11 months ago
Patric Stout 7634553d22 Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.

When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU

All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
1 year ago
Patric Stout 36a0818bc5
Remove: buying/selling/owning company shares (#10709) 1 year ago
Patric Stout 64523709bf
Add: use https:// for content-service connections (#10448)
This requires the use of WinHTTP (for Windows) or libcurl (for all
others except Emscripten). Emscripten does not support http(s)
calls currently.

On Linux it requires ca-certificates to be installed, so the HTTPS
certificate can be validated. It is really likely this is installed
on any modern machine, as most connections these days are HTTPS.

(On MacOS and Windows the certificate store is filled by default)

Reminder: in case the http(s):// connection cannot be established,
OpenTTD falls back to a custom TCP-based connection to fetch the
content from the content-service. Emscripten will always do this.
1 year ago
Rubidium 7e1d272397 Cleanup: remove unused static variables 1 year ago
Michael Lutz e67124e174 Change: [Admin] Bump admin port protocol due to command changes.
docs/admin_network.md promised that information in an admin packet
is never removed. It does allow the possibility of using a new packet type
for changed data in combination with a bump of the admin port version.

As the recent command handling changes modified the contents of
ADMIN_PACKET_SERVER_CMD_LOGGING, do exactly that.
2 years ago
Patric Stout 6acf204d14
Fix: report reuse of invite-code and switch to local game-type (#9487)
This prevents two servers battling for the same invite-code. Now
the last one wins.
3 years ago
Rubidium ba29edb0b3 Cleanup: remove some references to the old master-server 3 years ago
Patric Stout fa1e27994d Feature: allow the use of TURN to connect client and server together
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.

It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
3 years ago
Rubidium 386ef4dac3 Feature: [Game Coordinator] Send NewGRF names to the client 3 years ago
rubidium42 3eaa470632 Feature: [Network] Optionally send NewGRF names with NewGRFs in GameInfo
Before 8a2da49 the NewGRF names were synchronized using UDP packets, however
those have been removed. With this a new version of the GameInfo packet is
introduced that allows to specify the type of serialisation happens for
NewGRFs. Either only the GRF ID and checksum, or those two plus the name of
the NewGRF.
On this request for local servers will send the NewGRFs names.
The Game Coordinator will get the names on the first registration, and after
that only the GRF ID and checksum.
3 years ago
Patric Stout 8adade26ed Feature: allow the use of STUN to connect client and server together
This method doesn't require port-forwarding to be used, and works for
most common NAT routers in home setups. But, for sure it doesn't work
for all setups, and not everyone will be able to use this.
3 years ago
Patric Stout c921f6d817
Add: inform clients what game-script a server is running (#9441)
Co-authored-by: The Dude <thedude@novapolis.net>
3 years ago
Patric Stout e4d216e44b Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
3 years ago
Patric Stout f4dd2d88c7 Feature: raise the maximum NewGRF limit to 255 3 years ago
Rubidium e99134654b Feature: allow setting (game) coordinator and content server connection strings using environment variables
OTTD_COORDINATOR_CS for the game coordinator defaults to coordinator.openttd.org:3976
OTTD_CONTENT_SERVER_CS for the content server defaults to content.openttd.org:3978
OTTD_CONTENT_MIRROR_CS for the content mirror server defaults to binaries.openttd.org:80
3 years ago
Patric Stout 8a2da49413 Remove: old server listing via Master Server
This removes all UDP from the game except for a local broadcast
to find LAN games.

So long Master Server, and tnx for all the fish!
3 years ago
Patric Stout b1280fd17e Add: use Game Coordinator to annouce public servers 3 years ago
rubidium42 e3717ae903 Codechange: [ContentInfo] Use std::string instead of string buffers 3 years ago
rubidium42 9c424ab741 Codechange: [ContentInfo] Use StringList for tags instead of custom allocations 3 years ago
Patric Stout be37a2cab8 Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
3 years ago
Rubidium 21f58ab437 Change: use 32 KiB packets to transfer the savegame 3 years ago
Rubidium d6000c2ec5 Codechange: differentiate between UDP, TCP and compatibility MTU values 3 years ago
Patric Stout 05612d60ae Remove: "language" field from server/client
The original idea was that people could find a server they could
talk in their native language on. This isn't really used in that
way. There are several reasons for removing this:

- the client also sends his "language" to the server, but nothing
  is doing anything with this.
- flags are a bad way to represent languages, and over the years
  we had several (rightfully) complaints about this.
- most servers have their language set to "All", and prefix the
  servername with the language it is about. This is a much more
  efficient way to do the same.

All in all, this feature should go back to the drawing board.
Maybe it could work in another form, but this form is not it.
3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Niels Martin Hansen c511b0e801 Change: Increase NETWORK_REVISION_LENGTH to 33 bytes 5 years ago
frosch ec9a920aab (svn r27729) -Codechange: Do not count static NewGRF when checking for the maximum number of NewGRFs in a game.
-Codechange: Remove LAST_GRF_SLOT and MAX_NEWGRFS. Now NETWORK_MAX_GRF_COUNT is the only constant to specify the maximum number of non-static NewGRF.
-Codechange: Increase the number of file slots, effectively increasing the maximum number of static NewGRF and baseset GRFs.
7 years ago
planetmaker bb7f08f8db (svn r25590) -Codechange: Align doxygen comments again 11 years ago
planetmaker 2e390613a6 (svn r25589) -Fix [FS#5646]: Ensure that sent and received length of json strings are the same (based on patch by Xaroth) 11 years ago
truebrain 3a535690d4 (svn r23623) -Add: allow bi-directional communication with the AdminPort and GameScript 13 years ago
truebrain a4809b0b98 (svn r23047) -Documentation: silly typo in comment 13 years ago
rubidium cf61c2f11f (svn r21412) -Codechange: limit company name by amount of characters, not bytes 14 years ago
rubidium 33ed4ddbfb (svn r20963) -Add: stubs for a remote administration connection 14 years ago
rubidium 2555522eab (svn r19809) -Codechange: make some unnamed network related enums/defines static const variables 14 years ago
rubidium 2db44fc18e (svn r18994) -Change: content mirroring support (based on work by TrueBrain). 15 years ago
rubidium f608ad7baf (svn r18875) -Codechange: remove some unneeded bits from the network protocol and improve the naming of some variables 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
yexo c8ce3f7ef0 (svn r16175) -Fix: Disable the join button in the multiplayer lobby for AI companies, since joining an AI company is not possible. 15 years ago
rubidium c0f9af5607 (svn r16000) -Feature: IPv6 support 15 years ago
rubidium 3a13b75e37 (svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates. 16 years ago
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
rubidium 97c184f8f8 (svn r14063) -Codechange: replace some "magic" constants with enumified constants. 16 years ago
rubidium 72c154fd0f (svn r14052) -Codechange: make the size of the chat message "box" configurable and increase the default size slightly so it can hold the longest chat messages. 16 years ago
rubidium 3b4c3a3df6 (svn r14045) -Codechange: move the network's limitation to chat messages to a more logical location and give it a more consistent name. 16 years ago