PlasticBishop.com Blog

The inner programming thoughts of the creator of www.plasticbishop.com

Sunday, December 11, 2005

Tourna-Mental Progress

Since my last post I've been working very hard on enabling site tournaments. The first thing I did was to make a forum post asking for suggestions on how we'd cope with things such as players not moving, draws and other such things. I then did a slightly naughty thing and put a link to this forum thread at the top of each page. It's fairly unobtrusive and I think it's for the greater good (because so many people want the tournament feature) so I can live with myself. Besides, it paid off! The thread has had nearly 100 views and 14 replies in just 24 hours. That in itself is a site record I think.

For the moment I've decided to limit myself to making league tournaments, so every player in the tournament plays every other player twice and the points add up to give final scores. The fundamental mechanics of this type of tournament would be the same for a knockout tournament, but this way I don't have to worry about time constraints (yet). In fact, I designed the database structure with multiple tournament formats in mind. Here's a description of the database tables so far (for tournaments only, I've left the other tables out because to be honest, it's big):

chess_tournaments
tournament_id (unique for each tournament)
seats (number of players for this tournament)
minrating (these next 3 define who can join)
maxrating
mingames
tournamenttype (the type of tournament)
maxgamelength (maximum length of each game)
startedby (the id of the player who started it)
tournamentname (the name of the tournament)

chess_tournament_seats
seat_id
user_id (the id of the user in this seat)
tournament_id (the tournament that this seat belongs to)
seatnumber (the number of this seat)

chess_tournament_games
t_item_id
tournament_id (the tournament that this game is for)
game_id (the game that this refers to)
round_id (the round of the tournament)

I've already written the basic functionality to create and join tournaments so am now dealing with the guts of it, writing things to keep track of all of the games etc. It's hard work but I'm enjoying it. I can't wait until I get to the stage where I can see it all working together. That stage should come before the end of next week in theory. We shall see.

0 Comments:

Post a Comment

<< Home