bernd-wechner / CoGs

Competitive Gamers Leaderboard Server (CoGs LS)
2 stars 4 forks source link

Add Tourneys (and Tourney based views) #10

Open bernd-wechner opened 5 years ago

bernd-wechner commented 5 years ago

In much the same way as we have Leagues as a group of players (in a many-to-many relationship) so too, it's an idea to implement Tourneys as groups of games (in a many-to-many relationship again). Thus we could view the leaderboards of a given Tourney, much as we can for a given league now and a given Game say.

bernd-wechner commented 5 years ago

Tourneys will need a new table with their own properties. Nominally a name only and a many to many relation to games.

We might like to offer a leaderboard for the tourney. This would need us to combing the ratings of the games in the tourney. And force some decisions:

1) How to combine them: I imagine we are adding three weighted random variables (skills). The weights then need to be stored and they would logically be on the Through table of the ManyToMany relationships so it will need to be a custom Through table.

2) Who is on the tourney leaderboard: Perhaps only people who've played all the Tourney games, once at least, or perhaps we demand more plays, and there is an entry criterion, which is the number of plays for each game, which is yet another property on that Through table. Players who meet that criterion are listed on the Tourney leaderboard.

3) We want the Leaderboard view to support Tourneys. That needs a filter for Tourneys and the smarts to now include the Tourney leaderboard not just the constituent games, perhaps only the Tourney board and/or the constituent game boards, and the Tourney board always at top.

4) Tourneys need some qualification criteria. If we have an aggregate leaderboard you don't want people on it who have played just one of the Tourney games well for example. To some degree the aggregate ranking can account for this (weighting in favour of balanced play) but also some settings for qualification can help. That is, include only players who have played each game at least n times (n configurable per tourney) and not game more the m time more than another (m being configurable per tourney). Just some thoughts. The context of course is a tourney with 3 games say and a database with players who have history with some of these games. We don't want them being in the tourney unless they want to be (so enrolment is important and Tourney will have registered players) and the criteria can apply at the point of registration. But we need an enabler, Which is why the n and m criteria before must be configurably and/or related (suggesting or, so that if you have played each game more than m times you'd qualify and can join).