I’ve been building an application with a lot of gamification recently and I’m looking for a little feedback on implementing player levels.
Users enter into competitions by submitting text responses(captions) to funny images(memes) and other users vote on the responses. After the voting period is over, a winner is selected based on number of votes. Points are awarded for submitting responses, voting on submissions, and winning competitions. The amount of points a user has will determine their level. Levels belong to tiers(3 in total), which will restrict users from entering into competitions for users of a certain tier level or above.
Tier 1 => Levels 1-5
Tier 2 => Levels 6-10
Tier 3 => Levels 11-15
class User belongs_to :player_level
class PlayerLevel has_many :users belongs_to :tier
class Tier has_many :player_levels
Has anyone implemented a flexible level system in Rails before? I’m trying to avoid littering my code with callbacks when I distribute points. Any feedback would be helpful!