Blog

Tournaments Are Hard

by | Sep 17, 2020

I’ve been spending a good chunk of the week working on the first bits of tournament support for Magical Fairy Force: Champion Edition.

I plan to have six or seven different types, but I wanted to start with the classic single-elimination tournament.  I decided to allow up to 16 players, and got busy.

Eventually I got here:

mff_ce_tournament

Tournament structures like this are really easy for player counts that are powers of 2. but anything else gets a little complicated because you need to insert byes at some point and there a few different ways you can do this.

Even more challenging was that I really had to contend with the tournament structure in two different forms: the visual form that is displayed on the screen and the logical form that decides who plays whom and when they play.

After a lot of work, I finally got some code together that can handle all player counts from 3-16, which are all I’m going to allow.  This also acts as the foundation for the double-elimination tournament mode, which of course contains a complete single-elimination tournament within it.

It’s not perfect yet, in this screen shot there’s a little glitch in the lower left corner.  I’m not sure if it’s purely visual or if I’m generating an extra match somehow.  I’ll track it down eventually.

Either way, this is a super awesome thing because I love games with tournament options and I can’t wait to see how the other tournament modes turn out.

Join Our Community


Find Us In Any Of These Sweet Places

Contact Us

We would love to hear from you. Please use this form to contact us, and we will get back to you as soon as possible!

4 + 15 =