Lobby implementation

This page is a discussion on how the lobby system in STK should work, i.e. how people can connect to a server, find online games and join them. For now this is just a collection of ideas, hopefully with brainstorming from various people we can come up with a compromise on how it should work at the end. The beginning was based on various IRC discussions, which I (hiker) am trying to summarise here.

The actual protocol with the server is documented here.


Contents

Terminology

In order to avoid confusion, the following terms are used:

Finalised Items

The following items have already been discussed. This section lists implementation designs which we have agreed upon.

Online IDs vs no-IDs

For full online play it will be required to have an account on the addon server. While technically we could use a different server with separate IDs for the online games, it:

But to allow people to easily test the online version without creating an account, people will be able to use "anonymous logins": their name will be "anonymous-X" (with X being a unique number for each person). They won't be able to open a room, and people might decide to block anonymous players from entering their room (additionally anonymous players won't be able to vote for addons or submit online highscores).

Anonymous login can easily be implemented later.

If a player opens a server all participating players will have the option to vote for the server (i.e. if they feel the server might be patched and cheating, or if everything was fine). This vote will be attached to the ID of the person.

Friends

It should be possible for people to maintain a list of friends in STK. Friends could be used to:

Friends could be added by simply adding their online ID (and anonymous players will never have friends). Certain features of friends would require that both people are friends of each other:

Room attributes

To start an online race, a game master has to create a room. People can join this group, and the game master can then start the actual game. Rooms are temporary, i.e. they only exist for as long as the game-master is online. Several races could be played with the people in one room, i.e. after the race people will find themselves back in the room to discuss what to do next, or be able to leave etc.

Rooms have a set of attributes which will be displayed in STK to allow people choosing an appropriate room:

a pie-in-the-sky feature might be to change the master of a room. This can be useful if e.g.:

Kicking out People

The game master must have an option to kick out people from a room, and prevent them from re-entering.

Chat

Once people are in a room they should be able to chat. This would done without using the stk-server, but the game-server only.

Brain Storming

Selecting tracks

Hiker favours the Mario Kart Wii approach: each player in a room individually and independently selects a track to play (including 'random'). Once all players have made their selection, the stk-server randomly selects a track from the list of tracks selected by the player (a timeout will be used to make sure no one stalls the game for too long). The following youtube video shows the process.

Other people (Auria, Arthur) prefer that the game master just selects the track (hopefully based on the previous chat with the players). This would indeed be easier to implement.

Obviously using the latter option as a start would be good, ideally this could become an attribute of the room ('master decides vs. voting vs. random track').

Selecting Number of Laps

Same decision as for selecting the track: the options of "master decides" or "all decide" (I don't think random would be an option). Perhaps people could select (attribute of room?) the average race time, and we use 'typical' times for the track to determine the number of laps?

Or perhaps tracks & number of laps should be determined at the same time (which only applies if we use the 'player select, server selects randomly)?


Non-server playing

It would be useful to allow people to host a local session without connection to the server (e.g. scan for services on local network). This makes it easier to host lan parties, or for people who might have a firewall blocking access to the STK-server.

Security

As a first step Stephen suggests that people opening a room would have to keep on answering to a ping from to keep your room alive. Using an ID could make it much harder for people to use scripts to open rooms or other DOS approaches.


Scoring

It might be useful to maintain an ongoing list of scores for a room. We would have to consider what happens if players join later (i.e. with 0 points, perhaps give them 1 point less than the last entry in the highscore list?). So this would basically be a dynamic GP (people keep on racing, and each race would add more points). Races could be mixed (FTL, time trial, even complete GPs).

Team Games

We might add team games, e.g. red vs blue races (points of each team are added up or so). People should be able to select their team (perhaps with the option to select 'random'). Team should be persistent within a room (i.e. if you play a team game, then a non-team-race, then a team game, the teams should still be the same (as a default), but people should have the option to change this (e.g. select "play with old teams" or "new teams").

Kid-safe mode

We might want to consider a kid-safe approach.

The quick and simple way : allow disabling network play.

The more elaborate way, which is also pie-in-the-sky : parents would install STK write protected, and create online accounts for their kids. Those accounts would not be allowed to invite new friends (parents would have to do this for them), and they can't open rooms for everybody. But this would be a long term goal (if we actually decide to do this at all), parents who are concerned should disable internet (which we need to support as well, atm everybody can just enable it again).

First Concept

In the STK GUI would be a new option 'online login'. When player log in, they will get additional menu entries

[The actual design might be different due to space restrictions in the GUI, perhaps there will only be one 'online' menu entry, which then opens a menu with all online related options].

When you open a room, you can select the attributes (see above), and give it a name (which would be prefixed by your online id, so that the name is certain to be unique). Appropriate defaults would be used depending on other settings (e.g. open for everybody --> default name will be "public", for friends the default name will be "ID's friends") etc.

Joining an online game would present you a list of rooms with their attributes. You can then select one of the rooms (or select 'open room'). You should be able to filter/sort rooms, e.g. only show rooms from your friends, etc

When a room is opened (or you join an open room), you would get a list of people in that room (and a chat windows). The owner of the room has the option to start a race (and select which kind of race, e.g. a GP of races, a continuous set of races only, battle mode, ...). The name of the room should reflect the intention of the owner ("Joerg's battle mode"). People can of course leave a room taking them back to the room selection. If the owner leaves, the room will be closed, and all people end up back to the room selection list.

The owner can optionally 'close' the room, meaning no more players can join. Otherwise new players could join between races, waiting for the people to finish before they can join (pie-very-high-up-in-the-sky: those players could take over for AI karts in the race (if any); a message could be displayed to the players racing that new people are waiting).

Once the race starts, STK must synchronise the available karts and tracks, so that only karts and tracks common to all players can be picked. Players then select their kart. Game mode, #AIs, track, #laps will be set by the room owner (though see the brainstorming section above for a slightly different approach). Play then starts.

At the end of the race people will end up in the room.

Pie-in-the-sky : If you finished a room you can opt to vote for/against a room when you leave (and we should probably make sure that you can only get one vote from each player).

Retrieved from "http://supertuxkart.sourceforge.net/Lobby_implementation"

User Tools