Social Mechanic Game in Django

I want users to receive โ€œpointsโ€ for performing various tasks in my application - from tasks such as tagging objects and making friends. I have not yet found a Django application that simplifies this.

At the moment, I think that the best way to accumulate points is that each user action creates the equivalent of a "stream item", and the points are calculated by counting the value of each action published in their stream.

Obviously, social game mechanics is a huge area with a lot of research going on at the moment. But in terms of development, what is the easiest way to get started? Am I on the wrong track or are there better / easier ways?

Edit: for those who need a very simple implementation:

For those interested in a very simple implementation of this idea, try creating a "logging" application and putting it in your models.py:

log_models = [Tag, Post, Vote]

class Point(models.Model):
    # model fields

def increase_score(sender, instance, signal, *args, **kwargs):
    # score logic

for model in log_models:
    post_save.connect(increase_score, sender=model)
    post_delete.connect(decrease_score, sender=model)

Refer to this document if you find that post_save emits twice: http://code.djangoproject.com/wiki/Signals#Helppost_saveseemstobeemittedtwiceforeachsave

+5
source share
1 answer

"Flow"? Never heard of this before.

"Magazine" makes sense. It looks like you are going to log events in a table. Sum or count recorded events. It is the easiest and most extensible.

You can summarize periodically (hourly for large social crowds, daily for small crowds).

+2
source

All Articles