glenelkins Posted April 15, 2009 Share Posted April 15, 2009 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] Link to comment https://forums.phpfreaks.com/topic/154179-solved-experience-with-tournament-brackets/ Share on other sites More sharing options...
glenelkins Posted April 15, 2009 Author Share Posted April 15, 2009 solved. it was a css issue Link to comment https://forums.phpfreaks.com/topic/154179-solved-experience-with-tournament-brackets/#findComment-810531 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.