This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protocol handler to join network games #7735
Comments
Working on it. |
I was looking into this over the weekend. I have a working parser but I couldn't figure out how to call Presumably, the main menu needs to load first and then this function needs to be called. Is there perhaps a function similar to |
Have you looked at how the "traditional" command line parameters for joining a network game from the command line are handled in |
Oh yeah, it's the AfterNewGRFScan variable, right? Don't know why I didn't look into that... I'll give it another go when I get some time |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
It could be some good UI to support a protocol handler to join network games.
A protocol handler could allow players to make links to a server directly from a website or social service and have players join through that. It would also make the browser at http://servers.openttd.org/ more accessible.
URI scheme
Example of what an OpenTTD server link could look like:
openttd://127.0.0.1:3981?version=1.9.3&password=asdf&join=4&companypassword=qwerty
Suggested parts:
openttd:
because a scheme name is required//
because everyone else does it127.0.0.1:3981
IP address (or hostname) and port?
make a HTTP-like query stringversion=1.9.3
could in the future allow having a meta-handler that selects between multiple installed versions of the game for the required onepassword=
server password, leave out if not required (prompt user if server needs one or the provided is wrong)join=
join a company (leave out to spectate)join=new
create a new company on connect, if possiblecompanypassword=
password to join company, or to set on the new company created (spectate if provided password is wrong)Implementation
Every OS has its own way of registering URI handlers, the installers/packaging would have to handle that.
The implementation in game would be a commandline parameter such as
-U <uri>
. The game should perhaps ask the player for confirmation before beginning to connect, so they don't accidentally connect to random servers.The text was updated successfully, but these errors were encountered: