Jump to content

[SOLVED] Experience with tournament brackets?


glenelkins

Recommended Posts

Does anyone have experience with tournament brackets?? I have spent 5 weeks working out the filling logic for single elimination and have it working fine up to 16,384 players per tournament. which frankly is way more than a php program will permit with a standard setup.

 

But, when it comes to displaying the bracket, it works fine for up to 16 players, but then starts to break and display player distances incorrectly... i could do with some quick advice on the math for the display a) the offset from the top per round for the games b) the calculation of distance between the 2 players in a game per round c) the calculation of the distance between each game per round

 

what I have is this, it works and displays nice for 16 players or less:

 

for ( $r = 1; $r <= $num_rounds; $r++ ) {

    // display code here

    // variable increments
    $top_offset = ( $top_offset + ( $player_dist / 2 ) ) + ( $player_height / 2 ); 
    $game_dist =  ( $player_dist * 2 ) + $player_height;
    $player_dist = ( $player_dist * 2 ) + $player_height;
}

 

I have attached an 2 images. The first is a full 16 player bracket. Looks nice! The second is the bottom section of a 64 player bracket where you can see the positioning is all getting messed up the further down it goes.

 

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.