Coopetition Ladder

From #openttdcoop wiki

Revision as of 22:27, 26 August 2006 by XeryusTC (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Teams

All players should be able to join a team of his/her choice, this should be accepted by the team founder. A player should be able to:

  • Create his/her own team. Done
  • Join an existing team. Done
  • Leave a team. Done

Teams have a team founder, he/she should be able to:

  • Challenge other teams.
  • Changing the team name (ladder supervisors should approve with the namechange too).
  • Kick players from the team. Done
  • Edit the schedule (when the team is able to play).
  • Accept players into the team. Done
  • Delete the team Done
  • Join a ladder, this will be done automaticly on the 2vs2 ladder at first, it can be choosable when we decide to add more ladders. Done
  • Reset ladder statistics. Done

Ratings

We've decided to go with the ELO rating system as the ladder rating.

Database setup

Please do not edit as this is internal data storage design. This is our little documentation of the data storage.

Users

The user table should get the following elements:

  • ID, an autoincrement field to keep the ID of the user.
  • name, the actual name of the user, a varchar limited to 32 characters.
  • password, a varchar limited to 32 characters
  • team_id, the ID of the team the member is in, smallint. Linked to the teams table
  • rights, if the user is an admin or has more rights than the average user, smallint.
  • email, the e-mail address of the user, a varchar limited to 50 characters.
  • nationality, the nationality of the user, tinyint. Linked to nationality table

Teams

The team table should get the following elements:

  • ID, an autoincrement field to keep the ID of the team.
  • founder, the user ID of the player that is founder of the team, smallint. Linked to the user table
  • name, the name of the team as choosen by the founder, a varchar limited to 50 characters.
  • games_played, speaks for itself, smallint.
  • games_won, the amount of games that the team won, smallyint.
  • description, some information about the team, text.

Score

The score table holds the score of teams for each ladder they participate in. It should get the following elements:

  • ID, an autoincrement field to keep the ID of the score.
  • team_id, the ID that the score belongs too, smallint. Linked to the teams table
  • ladder_id, the ID of the ladder to which the score belongs, tinyint. Linked to the ladders table
  • score, the ELO score.
  • games_won, the number of won games played in this ladder
  • games_draw, the number of draw games played in this ladder
  • games_lost, the number of lost games played in this ladder
  • games_won + games_draw + games_lost = games_played

Ladders

The ladders table holds the information on the current (running) ladders. It should get the following elements:

  • ID, an autoincrement field to keep the ID of the ladder.
  • name, the name of the ladder, a varchar limited to 50 characters. Should be something like "2vs2 coopetition".

Nationalities

The nationalities table should get the following elements:

  • ID, an autoincrement field to keep the ID of the nationality.
  • name, the name of the country, a varchar limited to 20 characters.
  • image, the name of the country's flag image.

Games

The games table holds historical information about games that have been played. It should get the following elements:

  • ID, an autoincrement field to keep the ID of the game.
  • ladder_id, the ladder in which the game was played, tinyint. Linked to the ladders table
  • team1_id, the ID of the first team, smallint. Linked to the teams table
  • team2_id, the ID of the second team, smallint. Linked to the teams table
  • date, the day at which the game was played, date.
  • savegame, the name of the savegame, a varchar limited to 30 characters.
  • description, some information about the game, text.

Game statistics

These are a part of the games table, but used to display some nice stats on the game page. Every team has it's own statistics, but they are left out here to save space. All values are prefixed with "team1_" or "team2_" depending on which team the info belongs too.

  • income, the train income the team had in the last year of the game, int.
  • trains_pos, the amount of profitable trains the team had in the last game year, tinyint.
  • trains_neg, the amount of non-profitable trains the team had in the last game year, tinyint.
  • trainlenght, the amount of tiles that the average train of the team team had, tinyint.

Challenges

Teams have to challenge other teams for a ladder game. The table should get the following elements:

  • ID, an autoincrement field to keep the ID of the challenge.
  • challenge_date, the date since the challenge has been submitted, date.
  • game_played, if the challenge has ended because the game has been played, boolean
  • team1_id, the ID of the challenging team, smallint. Linked to the teams table
  • team2_id, the ID of the challenged team, smallint. Linked to the teams table
  • proposed_date, the date at which the game will be held, date.

Joins

This is used for players waiting to join a team, a team founder can accept or decline this request.

  • ID, an autoincrement field to keep the ID of the request.
  • user_id, the ID of the user that wants to join, smallint. Linked to the user table
  • team_id, the ID of the team the user wants to join, smallint. Linked to the teams table
Powered by MediaWiki
  • This page was last modified on 26 August 2006, at 22:27.