Skip Navigation

[Resolved] Building a tournament system

This thread is resolved. Here is a description of the problem and solution.

Problem:

We are building an esports platform that allows users to assemble into teams and then compete in tournaments. What I would like to ask is just for some guidance on a method for achieving this with Toolset.

Solution:

Here are some suggestion:

https://toolset.com/forums/topic/building-a-tournament-system/#post-1257807

Relevant Documentation:

https://toolset.com/documentation/post-relationships/

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by pamelaB-2 5 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1256737

Hello.

We are building an esports platform that allows users to assemble into teams and then compete in tournaments. What I would like to ask is just for some guidance on a method for achieving this with Toolset. We have the team system already set up and ready to go.

1. Now we thought to use post relationship to make teams as children of the tournament so that we know which teams are in each tournament.
2. Teams must now be split into pairs (randomly)
3. After the set of teams compete, the team authors must be able to specify which team won.
4. The winning team must advance to the next round - until there is one winner.

I'm not asking for help to design the system, I would like to ask for ideas and guidance for methods to achieve this (we will write all custom functions needed).

#1257807

Hello,

1) Now we thought to use post relationship to make teams as children of the tournament so that we know which teams are in each tournament.

In you case, if:
- One team post can connect to multiple tournament posts
- One tournament post can connect to multiple team posts
Then I suggest you try with many-to-many relationship, otherwise, you can setup one-to-many relationship between them.
see our document:
https://toolset.com/documentation/post-relationships/

2) Teams must now be split into pairs (randomly)
In my opinion, you can create another post type "pairs", setup two post type relationships, for example:
- One-to-many relationship "pair-1" between "Teams" and "Pairs"
- One-to-many relationship "pair-2" between "Teams" and "Pairs"

Create/edit each "pairs" post, connect it with two "Teams" posts using above relationship "pair-1" and "pair-2", in your case, you can setup custom codes to create the "pairs" post, and connect the random "Teams" posts(split into pairs randomly)

3) After the set of teams compete, the team authors must be able to specify which team won.
You can add a custom field "win or lose" in post type "pairs", so authors will be able to edit the "pairs" post, and mark the match result

4) The winning team must advance to the next round - until there is one winner.
You can add a custom field "Loser" in post type "teams", when author setup the "win or lose" field, use custom codes to mark the team post as "Loser", so you can setup query to find teams isn't "Loser", then setup new "pairs" posts and connect it with other left "teams" posts.

For your reference.

#1257939

Hello Luo.

Thank you very much for taking the time to help us think this through. Your suggestions make sense and hopefully soon we'll be on the road to a working tournament application.

Have a wonderful day further.