Alex Rivera | Logout

Techniques for adding Achievements to business class software

Asked 2008-11-07T15:57:33.690
9

I was thinking of adding some Achievements to our internal bug-tracking and time logging system. It's connected to an SQL Server back-end.

At first I thought that the system could be run on the database, using triggers to, for example, know when:

  • you've logged 1000 hours
  • created 1000 tickets
  • closed your own ticket
  • worked on a ticket that has been not touched in a while.
  • etc (you know - database-ish things)

But then I realized that I would also want purely front-end achivements

  • used the advanced search abiltiy
  • sorted by a column
  • reset settings to default
  • searched 500 times

It seems like the logic of every achievement must be hand coded. Could anyone imagine an some sort of Achievements Rules Engine, that you for example create scripts for?

And how to store them? If the achievement is:

  • change column sort order 50 times in one session

that would imply that every time they sort a listview column it updates the database.

Any thoughts on this Win32 application design problem? I don't think that the Gang of Four have an Achievements design pattern.


Note: It's a Win32 client application, not a web-site.


i definetly like the idea of an eventing system. Various actions the user takes can raise events through a single eventing object:

protected void TimeEntriesListView_ColumnSort(object sender, EventArgs e)
{
    _globalListener.RaiseEvent(EventType.ListViewColumnSort, sender, e);
}

protected void TimeEntriesListView_ColumnDrag(object sender, EventArgs e)
{
    _globalListener.RaiseEvent(EventType.ListViewColumnDrag, sender, e);
}

That object can then have logic added to it to decide

Edit
Report

1 Answer

3

I am also trying to figure out how to build an achievements rules engine.

I checked around rules engines and what are the basics of it. There is a good summary of that in wikipedia

Basically, you either have foward chaining when you, for example, check availability for something; otherwise, you use Event Condition Action rules. Its the latest that caught my attention.

So you could predefine a set of triggered events. In the engine you can define what are the checked conditions who are based on available metrics, and specify the association achievement.

This way seems more flexible, but you have to define the events, possible condition checks and metrics.

For example, you would have various events like TicketCreated triggered in the code.

In the rule engine you could have something like

Event: TicketCreated
Condition: UserTicketCount >= 1000
Achivement: "Created 1000 tickets"

or for "reset settings to default"

Event: SettingsChanged
Condition: Settings = DEFAULT
Achievement: "Reset to Default"

I haven't tried it yet, but I'm going to pretty soon. It's mostly theoric for now.

answered 2009-01-22T17:17:34.640

Your Answer