Lobby clients: Battle URLs ?

Lobby clients: Battle URLs ?

Requests for features in the spring code.

Moderator: Moderators

User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Lobby clients: Battle URLs ?

Post by bibim »

What about implementing specific URLs for spring battles ?
I think it could be integrated easily into spring lobby clients.

For example, it could have following format:

slp://<lobbyServerHost>:<lobbyServerPort>/<battleId>

slp: stands for "Spring Lobby Protocol"
<lobbyServerHost>: hostname/ip of the Spring lobby server which hosts the battle (ex: "taspringmaster.clan-sy.com")
<lobbyServerPort>: port of the Spring lobby server which hosts the battle (ex: "8200", optional)
<battleId>: internal battle ID of the battle (ex: "123")

The aim of this would be to be able to post battle URLs in lobby channels, so that users would just have to click on these URLs to join a battle, instead of looking for battle descriptions in the battle list.


I think it could be implemented in Spring lobby clients as follows:
- when you right-click on a battle, a "Copy battle URL to clipboard" option is available
- when you click on a battle URL in a chat message, it automatically joins the corresponding battle if it's on the same server, else it displays a warning
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby clients: Battle URLs ?

Post by Forboding Angel »

Ya know, this is kinda lowish on the totem ple, but it really isn't a bad idea. Even better if clicking an slp:// link starts default lobby client.

Teamtalk does this. It's really freaking cool. All you have to do is give someone a link, they paste in browser, it opens Teamtalk and auto connects to that address.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Lobby clients: Battle URLs ?

Post by bibim »

Well indeed I also thought about lobby integration into browsers, but I wanted to keep it simple at start.
However you're right, we must keep this feature in mind to specify URL format, that's why I've changed a little my URL format proposal:

slp://[<lobbyLogin>[:<lobbyPassword>]@]<lobbyServerHost>[:<lobbyServerPort>][/<resourceType>/<resourceId>]
- slp: stands for "Spring Lobby Protocol"
- <lobbyLogin>: lobby server login (ex: "bibim")
- <lobbyPassword>: lobby server password (ex: "abcdefgh")
- <lobbyServerHost>: hostname/ip of the Spring lobby server which hosts the battle (ex: "taspringmaster.clan-sy.com")
- <lobbyServerPort>: port of the Spring lobby server which hosts the battle (ex: "8200")
- <resourceType>: type of resource pointed by the URL (currently, it can only be "channel" or "battle")
- <resourceId>: identificator of the resource pointed by the URL (if <resourceType>="channel", then <resourceId> is the channel name, if <resourceType>="battle", then <resourceId> is either the internal battle ID, or the lobby login of the battle host)



Additionnaly, the following URL format can be used inside a lobby server:

slp://./<resourceType>/<resourceId>
- "." means that the URL is relative to current lobby server



Some examples:

slp://bibim:abcdefgh@taspringmaster.cla ... annel/help
- if clicked from browser, it automatically launches the default lobby client, connects to taspringmaster.clan-sy.com on port 8200 using login bibim and password abcdefgh, then automatically joins channel #help
- if clicked from lobby client (in a chat message for instance), then if it is currently connected to taspringmaster.clan-sy.com:8200 it just joins channel #help. If taspringmaster.clan-sy.com:8200 is not the current server it shows a warning.

slp://bibim@taspringmaster.clan-sy.com/battle/Stalag_13
- if clicked from browser, it automatically launches the default lobby client, connects to taspringmaster.clan-sy.com on default lobby port (8200), using login bibim and asking for password if there is no password stored for user bibim and server taspringmaster.clan-sy.com, then joins the battle hosted by user "Stalag_13" if it exists
- if clicked from lobby client itself, then if it is currently connected to taspringmaster.clan-sy.com:8200 it just joins the battle hosted by user "Stalag_13" if it exists. If taspringmaster.clan-sy.com:8200 is not the current server then it shows a warning.

slp://taspringmaster.clan-sy.com/battle/123
- if clicked from browser, it automatically launches the default lobby client, connects to taspringmaster.clan-sy.com on default lobby port (8200), using login and password stored internally for server taspringmaster.clan-sy.com (if there is no login/password associated to this server, it asks for login/password), then joins the battle whose battle ID is 123
- if clicked from lobby client itself, then if it is currently connected to taspringmaster.clan-sy.com:8200 it just joins the battle whose battle ID is 123 if it exists. If taspringmaster.clan-sy.com:8200 is not the current server then it shows a warning.

slp://buildbot.no-ip.org
- if clicked from browser, it automatically launches the default lobby client then connects to buildbot.no-ip.org on default lobby port (8200), using login and password stored internally for server buildbot.no-ip.org (if there is no login/password associated to this server, it asks for login/password)
- if clicked from lobby client itself, then if it is currently connected to buildbot.no-ip.org:8200 it does nothing. If buildbot.no-ip.org:8200 is not the current server then it shows a warning.

slp://./battle/bibim
- if clicked from browser, maybe it should launch the default lobby client and try to connect to default lobby server/port, using login and password associated to this server, then joins the battle hosted by player bibim if it exsists.
- if clicked from lobby client, it joins the battle hosted by player bibim if it exists.



NOTE:
Currently TASClient only stores a global login/password, not server-specific login/password as FTP clients do for instance. This can be dangerous if SLP URLs are implemented because then anyone could posts URLs like "slp://my.own.server.com", and if people click on these URLs, it tries to connect to my.own.server.com sending their global login and encrypted password.
User avatar
kiki
Posts: 859
Joined: 05 Nov 2007, 03:06

Re: Lobby clients: Battle URLs ?

Post by kiki »

Wow, do it. :-)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Lobby clients: Battle URLs ?

Post by imbaczek »

slp is a bad name - too cryptic. spring:// or springrts:// would be much better.

other than that... I dunno. I guess it won't hurt.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Lobby clients: Battle URLs ?

Post by rattle »

How about srts?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby clients: Battle URLs ?

Post by AF »

Since we should not limit ourselves by spring we should use lobbygame:// or lobby:// instead, otherwise glest games may look rather wierd
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Lobby clients: Battle URLs ?

Post by bibim »

AF wrote:Since we should not limit ourselves by spring we should use lobbygame:// or lobby:// instead, otherwise glest games may look rather wierd
Well, "Spring lobby protocol" ("slp") doesn't mean "lobby protocol for Spring only". Any game can use the Spring lobby protocol... (isn't it what Glest is doing ?)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby clients: Battle URLs ?

Post by AF »

Its a lobby protocol but the concept of it being a spring lobby protocol is purely through circumstance in most cases. We should not limit ourselves using distinctions that could impede user understanding at a later date.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Lobby clients: Battle URLs ?

Post by Vadi »

imbaczek wrote:slp is a bad name - too cryptic. spring:// or springrts:// would be much better.
Quoted for agreement!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Lobby clients: Battle URLs ?

Post by smoth »

who the hell broke the thread?
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Lobby clients: Battle URLs ?

Post by bibim »

Vadi wrote:
imbaczek wrote:slp is a bad name - too cryptic. spring:// or springrts:// would be much better.
Quoted for agreement!
To be honest I dont understand this point... Do you think "http" is too cryptic too ?
AF wrote:Since we should not limit ourselves by spring we should use lobbygame:// or lobby:// instead, otherwise glest games may look rather wierd
The protocol part of an URL must be specific enough to avoid ambigous URL. If we choose "lobby" or "lobbygame", then that means that someone else could choose the same for his own specific game lobby... That would lead to problems such as protocol registering conflicts in browsers.

Personnaly, naming a lobby protocol according to the game engine that introduced it doesn't shock me. But well, actually I don't care very much. "spring", "springrts", "lobby", "gamelobby", or even "rtslp" for "RTS Lobby Protocol", as you want... ;)
Last edited by bibim on 25 Mar 2008, 03:43, edited 1 time in total.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Lobby clients: Battle URLs ?

Post by Vadi »

I don't care either as long as something that works is in.

http is cryptic, ask anyone who's never wrote a web page for what does it mean. But it became the standard, and nobody really cares.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby clients: Battle URLs ?

Post by AF »

hmm how are we supposed to counter in that battles have a limited lifespan whereas battles do not?
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Lobby clients: Battle URLs ?

Post by Vadi »

I think you made a typo somewhere, your post make no sense :(
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Lobby clients: Battle URLs ?

Post by bibim »

Vadi wrote:http is cryptic, ask anyone who's never wrote a web page for what does it mean. But it became the standard, and nobody really cares.
Exactly. That's why I think it's not bad to have an acronym in the protocol part. I don't see how it can be "too cryptic", however I think "springrts" is too long for example.
AF wrote:hmm how are we supposed to counter in that battles have a limited lifespan whereas battles do not?
:shock:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby clients: Battle URLs ?

Post by AF »

My dandy url can last for years but I very much doubt the battle it refers to nm the server instance will last that long.

I greatly doubt the point of the use of this in browsers outside realtime chat networks.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Lobby clients: Battle URLs ?

Post by bibim »

Indeed, battle URLs using the battle ID as resource ID will often have limited lifetime, because as soon as the host closes his battle the URL becomes invalid, even if he reopens another one.

However:

1) URLs using the host login as resource ID will offer much longer lifetime, because even if the host has closed his battle, the URL is still valid when he reopens it.

2) URLs pointing to autohost battles could have very long lifetime, especially when the Spring dedicated server will be out.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby clients: Battle URLs ?

Post by AF »

URLs containing login details are imo a gigantic security risk.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Lobby clients: Battle URLs ?

Post by Vadi »

I think he meant just the username. And that would be fine to have in the url, since you can only host one game at a time (and people will be able to figure out who's hosting too, extra info).

Edit: it just hit me, can your username be different from your in-game name after you change your name with /rename?
Post Reply

Return to “Feature Requests”