i need help making a tournament generator.

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Post Reply
qazwsx2541
Posts: 0
Joined: Tue Feb 08, 2011 7:00 pm
Location: Accident, MD

i need help making a tournament generator.

Post by qazwsx2541 »

ok so i was wondering if there were any ideas on how i would make a tournament creator in blender, i have done it already with a fixed number of teams, but i would like to be able to make it so that the user can enter how many teams they have.the problem i have is that its double elimination, and i need a way to pass the loser and winner of each round around to the different places, but i cant think of a way to do this with a flexible number of teams. any help is appreciated.


i also thought that if worst comes to worst, i could make TONS of scenes each with a different setup. thanks
KEEP ON BLENDIN! \,,/ ^.^ \,,/

SolarLune
Posts: 0
Joined: Sun Feb 06, 2011 8:58 pm

Post by SolarLune »

You're going to have to learn Python, but it's really simple. The idea (if I'm correct), boils down to:

1. Player enters number of participants (teams) - for example, 10.

2. Game creates a Python array of particpants - it would have ten teams in it in the example.

2. Game (or Player) runs through a pair and decides who wins.

3. Game subtracts one from total number of participants and removes losing team from the participant array.

4. Game continues, repeating steps 2 and 3 until only one team is left.

That's basically it - if you don't know Python, I would recommend visiting my game blog to learn about using Python in the BGE as well as downloading Python to check out its fairly short help file.
Check out my blog of game design and BGE tutorials at http://solarlune-gameup.blogspot.com/

qazwsx2541
Posts: 0
Joined: Tue Feb 08, 2011 7:00 pm
Location: Accident, MD

Post by qazwsx2541 »

so i would do this twice?(once with the winners bracket and once with the losers bracket?) i am after all looking for double elimination. and i do know python.
KEEP ON BLENDIN! \,,/ ^.^ \,,/

SolarLune
Posts: 0
Joined: Sun Feb 06, 2011 8:58 pm

Post by SolarLune »

Ok, I think I understand you - you're planning to have it so that a contestant has to lose twice to be removed from the game, correct? If this is the case, then you will need to keep two different brackets (arrays) - one for the winners and one for the losers. If a team loses in the losing bracket, remove them from that bracket (and so out of the running for the game).
Check out my blog of game design and BGE tutorials at http://solarlune-gameup.blogspot.com/

qazwsx2541
Posts: 0
Joined: Tue Feb 08, 2011 7:00 pm
Location: Accident, MD

Post by qazwsx2541 »

ok, so your suggesting that i do it like this.
lets say that theres 4 teams(for easy reference)

at the start the arrays look like this:
winners[1, 2, 3, 4]
losers[]

when someone loses a match they get transfered to the losers bracket

winners[1, 4]
losers[2, 3]

and when somone loses and they are in the losers bracket, they are eliminated. ok i think this works, thank you!
KEEP ON BLENDIN! \,,/ ^.^ \,,/

SolarLune
Posts: 0
Joined: Sun Feb 06, 2011 8:58 pm

Post by SolarLune »

No problem. Arrays are really powerful; using them correctly can make or break a game idea.
Check out my blog of game design and BGE tutorials at http://solarlune-gameup.blogspot.com/

Post Reply