HWPlaySchemeSyntax.wiki
author Wuzzy
Tue, 06 Feb 2018 00:10:36 +0000
changeset 1151 7453409386c0
parent 736 e2b1f824f37b
child 1492 13e8497cc611
permissions -rw-r--r--
EngineTestCases: remove double brackets
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
308
06767accef5a Edited wiki page HWPlaySchemeSyntax through web user interface.
vittorio.giovara@gmail.com
parents: 307
diff changeset
     1
#summary The Hedgewars URL scheme handler
307
1fff0c4471bc Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     2
736
e2b1f824f37b HWPlaySchemeSyntax: Add title
Wuzzy
parents: 732
diff changeset
     3
= URL scheme handler =
e2b1f824f37b HWPlaySchemeSyntax: Add title
Wuzzy
parents: 732
diff changeset
     4
730
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
     5
== Overview ==
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
     6
`hwplay` is an unofficial URL scheme for specifying a server and optionally a room. Hedgewars is able to interpret these URLs to automatically join the specified server and room.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
     7
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
     8
`hwplay` URLs are useful if you want to play on a server other than the official one.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
     9
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    10
== Usage ==
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    11
You can share a `hwplay` URL with other players so they join your server more easily.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    12
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    13
Since `hwplay` is an unofficial URL scheme, your browser and other software needs to learn first how to interpret these URLs.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    14
Applications might ask you which program to use with a `hwplay` URL. You have to point these to the Hedgewars program (`hedgewars.exe` on Windows, `hedgewars` on GNU/Linux and Mac OS).
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    15
732
4a40a2b9ec52 HWPlaySchemeSyntax: command-line
Wuzzy
parents: 731
diff changeset
    16
Hedgewars itself also can use a `hwplay` URL as a command-line argument. See [CommandLineOptions#Frontend] for more information.
4a40a2b9ec52 HWPlaySchemeSyntax: command-line
Wuzzy
parents: 731
diff changeset
    17
730
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    18
`hwplay` URLs are completely optional, you can of course join any server without a `hwplay` URL as long you know its hostname / IP address and port number (46631 by default).
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    19
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    20
== Creating `hwplay` URLs ==
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    21
When you are about to start a server in Hedgewas (Main menu → Network game → Local network → Start server), Hedgewars will create a `hwplay` URL for you and copy it into the clipboard if you click on the “invite” button.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    22
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    23
Note the generated URL might only work in your LAN, so please check the IP address. You can obtain your Internet IP address on http://myip.is/ (for example).
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    24
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    25
Of course, you can also try to create the URLs from hand (see below).
307
1fff0c4471bc Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    26
730
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    27
== Syntax ==
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    28
The syntax of the “hwplay” URL scheme is:
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    29
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    30
`hwplay://<HOST>[:<PORT NUMBER>[?room=<ROOM NAME>]]`
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    31
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    32
Parts in square brackets are optional.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    33
Parts enclosed in less-then and greater-than signs are parameters, where
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    34
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    35
 * `<HOST>` is the IP address or host name of the server
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    36
 * `<PORT NUMBER>` stands for the TCP port number of the server
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    37
 * `<ROOM NAME>` is the name of a room in the server
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    38
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    39
If the port number is omitted, Hedgewars assumes the default port 46631.
731
42ff4b1eef88 HWPlaySchemeSyntax: small typo edits
Wuzzy
parents: 730
diff changeset
    40
730
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    41
If the room name is given, the user will automatically join this room. If it is not given, the user will start in the lobby of the server.
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    42
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    43
== Examples ==
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    44
Here are some example `hwplay` URLs:
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    45
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    46
 * `hwplay://netserver.hedgewars.org`: Points to the lobby of the official server. This is the same as if you'd click on the “official server” button in the main menu
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    47
 * `hwplay://192.168.43.6:54321`: Points to the lobby on a LAN server with IP 192.168.42.6, port number 54321
731
42ff4b1eef88 HWPlaySchemeSyntax: small typo edits
Wuzzy
parents: 730
diff changeset
    48
 * `hwplay://example.org?room=MyRoom`: Points to the room called “MyRoom” on the server “example.org”
730
917fd6b57b16 HWPlaySchemeSyntax: (hopefully) more complete explanation of the HWPLAY URLs
Wuzzy
parents: 308
diff changeset
    49
 * `hwplay://example.com:59000`: Points to the server “example.com”, port number 59000