Bunchball Developer Wiki

 

Events, Tasks and Challenges

Page history last edited by Rajat Paharia 5 months, 1 week ago

Events, Tasks & Challenges form the core of the reward infrastructure on your site. They can be administered from the Rewards tab in the Admin UI.

 

  • An Event is something that the user does that you want to track. Examples of Events might be: The user just posted to the forum. The user just rated a video. The user just answered a private message. The user just played a game of Asteroids and scored 34,500. etc. Events are sent to the Nitro Server using the challenge.sendEvent method. Events can also be used to generate site-wide high-score tables using the challenge.getSiteData method, as well as individual user high-score tables with the challenge.getUserData method.
  • A Task is a mini rules-engine. A Task takes an event, possibly does some manipulation to the value that was sent in (like adding it to a running total), and then compares it to some criteria. If the criteria is met, the Task is marked as complete and an action is taken. If not, no action is taken. Tasks can be single-trigger, in which case they can can only be completed once, or multiple-trigger, in which case they can be completed multiple-times. Examples of Tasks might be: If the user scored more than 50,000 in a game of Asteroids, reward them. Any time the user posts to the forums, reward them. If the total number of videos that this user has reviewed in their lifetime is > 100, then reward them. Rewards can include: points, virtual items, and can also trigger a callback to a URL of your choosing so you can issue non-Nitro rewards. The challenge.getCompleted method can be used to determine which Tasks related to a particular event that a user has completed.
  • A Challenge is comprised of one or more Tasks. When all the Tasks in the Challenge have been completed, the Challenge is marked as complete and an action is taken. The rewards can be of the same type as Task rewards, but they can also include a Trophy that the user can display in their Trophy Case. An example Challenge around a Video feature on a site might be comprised of the following Tasks: (a) Upload 10 Videos (b) Review 100 Videos (c) Watch 100 Videos. The challenge.getStatus method can be used to get the details of one specific challenge or all the challenges on a site. challenge.getRecent can be used to retrieve the list of recently completed challenges on the site, and challenge.leaders can be used to retrieve the list of users who have completed the most challenges.

 

Comments (0)

You don't have permission to comment on this page.