Achievements/Trophies #44
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: nonshy/website#44
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To better encourage user participation (and to serve as filterable/searchable material) we could have an achievements or "trophies" feature.
Trophies could be rewarded for example:
Properties of a Trophy
The data points that a given trophy should need are:
For logic they may also need functions to evaluate when the trophy should be awarded, or when/if it should be taken away.
Appearance
A style should be decided on if the trophies will have icon images. Examples to consider are:
At the very least, color palettes should be chosen per score level if the v1 only has text labels.
On profile pages, there should be a trophy box displayed somewhere that shows all the user's badges, sorted by highest score on top.
A page on the site (auto generated from the list of trophies) should let users see what all the achievements are and how to qualify for them.
Ideas for Trophies
Some ideas of things we could aware trophies for, by category:
Use for filters and searching
A secondary role these trophies MAY serve is to allow members to better curate their experience of the website.
For example: somebody who shares a lot of nudes on public but they really only want equally bold people as themselves to see those pictures.
There could be user preferences added to the site like:
Things that we should not allow gating for would be:
Technical Notes
How often should Trophies be evaluated?
There should probably be at least a "once a day" full check of the current user to see if they are missing any trophies. It could be triggered as a background thread on the user's visit to the site.
The full check would visit every Trophy and ask it whether the user qualifies, or should lose the trophy (if applicable).
On-demand checks could also be done in direct response to user actions. Example:
Some trophies such as chat room statistics may only calculate on the daily full check interval.
Time Stamps (First and Last Rewarded) and Staleness
Say a user uploads 50 photos and they get a trophy for it. As long as they keep at least 50 photos up, they qualify for the trophy every single day when their trophies are evaluated. Their Trophy in the database would have the date/time it was first rewarded, and the most recent time they still presently qualified for it.
If they delete pictures and fall below 50, they would no longer qualify for the 50 photo trophy. However, we can still let them keep it.
The profile page could visually distinguish the fresh & current trophies, sorted by highest value, and have a "view more" page where all the historically granted stale trophies could also be seen.
Notifications
A notification could be added to the user's queue the first time a new trophy is awarded.
If the user suddenly qualifies for many awards at once (e.g., the full check is run) the notification should consolidate it all into one message, e.g. "You got {this trophy} and 4 others."
The notifications should link to the user's trophy list (full view) page, where the "Unread" trophies have a "New!" tag near them.
Chat room integration
The chat room is a separate app to the website, kept at an arm's length as it is designed to be a stand-alone open source product.
Some ideas to do this could be:
Code Changes Needed
The "MVP" (minimum viable product) of this could start with just a small set of trophies:
Some rough ideas of where changes actually should be made in the codebase:
pkg/trophies
module which will house the majority of the new code.definitions.go
will be where the available trophies are defined: a lists of the trophies with their names, descriptions, etc.photos.go
module to evaluate whether a user qualifies for photo gallery trophies.EvalPhotoTrophies(*User)
which would CountPublicPhotos() in one place, and then use that count vs. the various trophy thresholds.EvalPhotoTrophiesNow()
function which will immediately check the user for trophies. Calls to this function can be sprinkled around the codebase, like in the Upload, Edit or Delete Photo pages.