Jump to content
EleTD.com
Sign in to follow this  
Cisz

How a ladder game start works

Recommended Posts

Here is my suggestion:

1.) You whisper a bot for a ladder game. (Could be "/w EtdBot ladder game" or "/w EtdBot lg")

2.) The bot checks if the nick is registered as a ladder player. If not, it replies "You are not registered as a ladder player. Go to http://www.eletd.com and get a ladder account." If the nick exists, the player get's listed as waiting for a game, and the bot replies "I'm looking for a game for you.. X more players waiting" (X beeing the number of all other waiting players ofc). The bot will re-whisper this until he finds a matching player, and it will ask "You still want a game? Whisper 'yes' or 'no' " every once in a while. If the player whispers no, or does not reply yes for more than a few minutes, he is removed from the list.

3.) The bot checks if at least two players of similiar rank are listed as waiting for a game. If yes, those two are selected for the game, continue at 100. The list can hold a lot of players, if none of them match properly. "Matching players" would be players that have the same ladder points +/- a bit.

4.) If no matching players are listed as waiting, the bot checks if players are online that would fit. For this, the bot has a list of players it has recently seen. It checks if there are players of a matching rank in the channel that have not requested a game yet, and asks them "Would you like to join a ladder game?" It also checks for matching players that recently whispered the bot. And it checks matching players that joined a ladder game recently, for if the game in question allready ended. (The bot would know, as it would have hosted the game and gotten a game report and the end of game.) It tries to /whois them and if they are in a channel, it asks them too if they'd like to join. If any agrees, he and his matching partner are selected for the game too, continue at 100. Any players it tries to find that are no longer online will be removed from the "recently seen" list.

5.) If the bot fails to find players of a matching skill level for a while, so one player has been waiting for a game long, it will loosen up the searching criteria, and looks for any players listed as waiting. How long it will wait before that will depend on what we deem to be "annoyingly long". If the waiting list has 2 or more players listed, it selects the player waiting the longest, and matches him with his closest partner. Continue at 100.

6.) If only one player is listed waiting, the bot will try to find any player for him by whispering whatever ladder player it can find (recently seen in channel, or players that whispered it, or players that just finished a ladder game). Again, all those that turn out to be offline are removed from the list.

That should be all about managing waiting players and finding new ones. The bot will be busy doing that unless the waiting list is empty, in which case he can happily idle around. :)

100.) A pair of player has been found, matching more or less. The bot opens a game and whispers the gamename to both selected players. ("Join the game with the name: Etd Ladder #1456") The game could be public to make the gamenames visible to the public, as some sort of advertisement. But any non-selected players or even non-ladder players that join the game are auto-kicked by the bot with a nice greeting. Either the "You are not registered as a.." bit, or a "Whisper 'ladder game' to the EtdBot for a game." if it's a listed ladder player.

101.) The bot will check every 15 seconds or so if the players actually joined the game, and if not, re-whispers them. Any player that joins the game lobby is informed that: "Leaving the game lobby without a game is counted as a loss, unless the game is cancelled by the bot. To request a cancel, whisper '-cancel' to the EtdBot." This continues until either two players joined the lobby, or one of them cancels the game before both entered the lobby. Once both have entered the lobby, the game is considered active. If one of the two leaves, diconnects, or alt-F4's after joining the game lobby, he gets a loss. The only ways to get out of the lobby are either through the game or by whispering "cancel" to the bot while beeing the only player in the lobby, in which case the bot will close the game. The bot also may close the game if the other player doesn't show up and/or doesn't respond. If the game is closed, the players are kept as waiting on the list, and they are told so.

102.) Once both players are in the lobby, the bot informs them: "You can start the game by whispering me 'start', or you can wait for more players (X players waiting for a game)." The players can now choose to either start the game by whispering "start" to the bot, or wait. If the game consists of matching players and no more matching players can be found by the bot, the bot will annouce "Game start in 9..8..". Otherwise it tries to add players that have a ranking between the two allready in the game. For this to happen, these additional players would have to have whispered the bot after the game was created, as the bot allready selected the closest partner. Players that would increase the ranking differences are first checked if a better fitting player can be found for them on the waiting list, in which case they get an extra game hosted. Only if a player on the waiting list is over the maximum wait and has no better partner outside the game, he is added to it.

103.) The game can either start once all players in the lobby have whispered "start", or the bot starts the game once it is full. It could also be autostarted after a while (to avoid annoyance again). If one player leaves/gets lost now, he get's a loss.

That should be the protocol. All the whispering to the bot could also be done by chatting in the same channel or lobby, if a bot can read that too. Makes things a bit easier. ;)

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...