Coopetition Ladder

From #openttdcoop wiki

Revision as of 12:49, 20 August 2006 by XeryusTC (Talk | contribs)

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.
  • Join an existing team.
  • Leave a team.

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.
  • Edit the schedule (when the team is able to play).
  • Accept players into the team
  • Delete the team
  • 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.
  • Reset ladder statistics.

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, tinyint. Linked to the teams table
  • rights, if the user is an admin or has more rights than the average user, tinyint.
  • 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, tinyint. 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, tinyint.
  • games_won, the amount of games that the team won, tinyint.
  • 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, tinyint. 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.

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, tinyint. Linked to the teams table
  • team2_id, the ID of the second team, tinyint. 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.
Powered by MediaWiki