How could I go about using gamification with Yii (i.e. badges)

Hi guys,

I am wanting to implement a gamification element to my app by rewarding user’s with badges when they achieve a particular milestone; in my case I am building an app which people will use to log their weightlifting workouts, so badges will be rewarded when the user achieves a certain weight on an exercise.

Could someone point me in the right direction for this?

Attached is my proposed database schema.

Many thanks,

Aaron

How about creating a widget in your layout which will show their acheivement levels?

Yea that could work quite well, thank you for your suggestion.

I think what I’m most confused about is how to actually award the user with badges, by using some sort of filter to cross check the user’s inputted workout log against the badge modal to see if the user has achieved a certain weight on an exercise (and therefore has earned a badge).

Hope this makes sense!

Thanks

Any ideas on how I could implement such a feature to check if each exercise set logged deserves the user to be awarded a badge?

Thanks

Create a table or file array which has your acheivement levels. I’ve looked at your DB design and I think you could create a simple table of awards with quantities.

You will have to decide if you want category based awards, or overall workout time awards, or both.

Define a function in your model or a component that will return the ‘amount’ that you want to measure against the awards table.