Coruja
Sphere Developer
Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7
Dimension Shard
|
RE: Regarding Time Online
(08-14-2013 08:16 AM)Rattlehead Wrote: so ur saying that running a function that fires on all connected players every few minutes would be better than a function that only fires per player every hour?
i will have to disagree on this one, for multiple reasons
1) a function that fires on a per player basis every hour, will obviously only fire every hour that they are online, rarely do multiple players login at the same time, therefore the functions wont be firing at the same time, giving each their own wiggle room as far as resource are concerned
2) since the functions fire on a per player basis, you wont have the immense resource consumption of the allclients firing, if there were say 100 players on, then when all clients is fired its going to take up a good bit of resources, tie that in with firing every X minutes, and ur looking at a resource hog every X minutes rather than just a function firing every so often per players login
3) he was only interested in every hour, so it seems counter productive to have it adding every few minutes when the minutes are of no concern to the outcome of the results, so again u would be trading resource consumption for irrelevant accuracy
i would also like to point out using TAG0 on the left side of a statement is unnecessary as you are defining the tag on the left side, and tag0 is only for statements that may have the opportunity to resolve to nothing rather than 0
firing a timerf function every hour on the player is as accurate as any other way of timing an hour, logging the current server time and counting back from it really wont be anymore accurate than the timerf, not to mention more calls to the server to get the time and adding it to a ctag that gets evaluated later, thus adding to more resource consumption
just my view, i could be wrong, but i am willing to bet that my reasoning endures
it will work using both ways
but its not a good idea run a -active- timer on every player. I will prefer consume 0 resources and run a light-weight function on every player at each 5~10 minutes than set a active timerf running on every single connected account. Of course we cant run heavy functions on allclients, but in this case the function is ultra mega hyper very light and won't cause any lag, freeze or something like this even for 0.0000001ms
the accurary which I mean is count the connection time using the correct time instead counting only full hours. I can make multiple logins counting 15min + 5min + 20min and it will count 40 minutes. Doesnt reach a full hour yet, but another login using more 20 minutes will do it. Its better than counting 0 on all connections because I doesn't reach a full hour connected on none of them
(08-15-2013 01:17 AM)Mordaunt Wrote: Of course it works, but that's not what he wants.
He wants to reward players when they stay online for an hour, and then for each hour afterwards and only in those sessions. At least that's what I understand. So sessions less than an hour would not be rewarded, and then when they log on and complete an hour using TOTALCONNECTTIME they'd get rewarded, which isn't wanted.
At least that's how I read this whole thing
I would prefer using LASTCONNECTTIME / TOTALCONNECTTIME too, its more simple and optimized. But maybe only he would clarify the idea, since we're a bit confusing with everything lol
|
|
08-15-2013 03:26 AM |
|
|