Author Topic: Logged in but active?  (Read 855 times)

Offline chesney-93

  • Level 7
  • *
  • Posts: 30
  • Reputation: +0/-0
    • View Profile
Logged in but active?
« on: May 29, 2011, 06:37:31 PM »
Little stuck with this, so could you please give me your input and if you use/used it. :)

A player logs in, they're on the online list.. I think that is fair?

But do you think they should be classed as active if they leave their account logged in for the past hour?

So maybe I'm thinking of adding another bit to their profile saying something like "Last seen x mins/hours/ago" and not every page updates this, just the main actions such as killing, stealing cars ect..


Offline DV8

  • Level 10
  • *
  • Posts: 63
  • Reputation: +0/-0
    • View Profile
    • Shadowrun: Corrosion
Re: Logged in but active?
« Reply #1 on: May 30, 2011, 02:46:16 AM »
I have a "last online in the last five minutes" list. With a stateless environment like the web I don't think you have many other choices.

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Logged in but active?
« Reply #2 on: May 30, 2011, 03:20:44 AM »
A player logs in, they're on the online list.. I think that is fair?
Purpose. If you don't have a specific purpose for something, don't do it. The odds of making it wrong way in such cases are very high.

What "active" status is for? Do you want to encourage some actions from players? Do you want to use that status for decision making? Is it about gameplay? Is it about social interaction? Is it about fun? Or maybe players asked you for such feature, maybe ask them why they need it for in such case?

Offline chesney-93

  • Level 7
  • *
  • Posts: 30
  • Reputation: +0/-0
    • View Profile
Re: Logged in but active?
« Reply #3 on: May 30, 2011, 05:44:53 AM »
A player logs in, they're on the online list.. I think that is fair?
Purpose. If you don't have a specific purpose for something, don't do it. The odds of making it wrong way in such cases are very high.

What "active" status is for? Do you want to encourage some actions from players? Do you want to use that status for decision making? Is it about gameplay? Is it about social interaction? Is it about fun? Or maybe players asked you for such feature, maybe ask them why they need it for in such case?

Pure game game, you ever seen someone online but known they wasnt there? or been waiting on a reply even though they are "online"

Offline Doidel

  • Level 16
  • *
  • Posts: 141
  • Reputation: +2/-0
    • View Profile
    • Cohorts of Kargonar
Re: Logged in but active?
« Reply #4 on: May 30, 2011, 06:37:58 AM »
I have the worst ^^ A one minute accuracy made with cronjobs and ajax calls. Every thirty sec the cron sets a flag, and every thirty secs the user unsets the flag. If 30 seconds later the cron meets a flag which is still set this means that the user didn't unset it => user is offline.

Have a nice day, best
Doidel
* Keep it simple *

Offline Freyr

  • Level 7
  • *
  • Posts: 30
  • Reputation: +1/-0
    • View Profile
Re: Logged in but active?
« Reply #5 on: June 03, 2011, 03:23:40 PM »
I have the worst ^^ A one minute accuracy made with cronjobs and ajax calls. Every thirty sec the cron sets a flag, and every thirty secs the user unsets the flag. If 30 seconds later the cron meets a flag which is still set this means that the user didn't unset it => user is offline.

Have a nice day, best
Doidel

For someone who has "keep it simple" in your signature, you sure don't do it.  :P



I've brainstormed this a few weeks back for my project, and here's what I came up with:
 - Players have to be "friends" in-game to see each others activity within 5 minutes.
 - Players who are "enemies" in-game, can't see an activity - it just doesn't appear to them.
 - Every player has an option to disable their "activity" for other players within their own configuration page.
 - Default activity view span is 24 hours, 1 day.
// this is a comment

Offline Anonymous

  • Level 2
  • *
  • Posts: 3
  • Reputation: +0/-0
    • View Profile
Re: Logged in but active?
« Reply #6 on: August 07, 2011, 05:56:32 PM »
I'm possibly off base here but I track each and every hit on a per-day basis:

Code: [Select]
INSERT INTO activity ( user, hour, last, hits )
VALUES (?, ?, ?, 1)
ON DUPLICATE KEY
SET last = VALUES(last), hits = hits + 1

This provides for a general overview of their activity (hits) on an hourly basis, (primary key is user,hour) and obviously provides a last timestamp. In my case, a who is online is not delimited by a fixed value - 5 minutes, 15 minutes, 1 hour etc - but simply presented as a list which the user can expand or contract to suit. Times are not actually used anywhere - rather only differences in time. GC can aggregate historical data into more manageable blocks and prune the table to within acceptable limits on a daily / weekly basis.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal