Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Player Game Stats

 
Post new topic   Reply to topic Printable version
 View previous topic  ballmover Post :: Post A little bit of help  View next topic  
Author Message
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Mar 12, 2006 8:03 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:
That seemed pretty "against" to me, though I did not mean "against" in the way you took it. Perhaps I should have used "dislike".


I say it with no emotion or intent. It is just fact. Pbot was designed to work exactly as we wanted in PB. asss was designed generically--from my point of view almost in a vacuum. As such, doing specific things like we do is more work.

Given that, I have to decide our approach to dealing with bots. Initially we will be using all bots. Most stuff we have will "port" ok.

The stats module is the biggest issue. asss has no notion of a player set. pbot keeps a player list for all players per arena, even those who have left. Because of this, if a player is playing a game, leaves, comes back and completes the game, their stats just continue to accumulate automatically. The stats bot doesn't have to do extra work to manage this because the core does it. The HZ devs are telling me I need to use asss persistence or write stuff to a DB every time a player leaves, and retreive it when they return. Also I will need to know which game they were playing, so if they come back 3 games later, I don't load partial stats from an old game. This is a LOT of extra work to make stats function, and I find either solution to be hack-ish. I may end up making the stats module keep it's own player list separate from the asss-core to accommodate this cleanly.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sun Mar 12, 2006 9:23 pm    Post subject: Reply to topic Reply with quote

Before you start jumping to conclusions about the stats module, talk to grelminar. He's the only one that knows exactly how it works, what it can and can't do, and what it could do in the future.

It was designed in a vacuum. ASSS wasn't perfect for Hyperspace when we first moved, but after working with grel on issues we had, it now fits us like a glove. I would assume you guys could do the same.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Mar 12, 2006 10:30 pm    Post subject: Reply to topic Reply with quote

That's part of the problem. Grel is the only expert, and he is almost never around. The HZ dev guys, while being very gracious and as helpful as they are able, are just shooting in the dark. There's no go-to guy for asss, and the code is all but encrypted.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Mar 12, 2006 11:22 pm    Post subject: Reply to topic Reply with quote

ASSS was designed to be useful. The fact that it is not useful for a few of your specific purposes does not negate that.

Mr Ekted wrote:
and the code is all but encrypted

I find that myself sometimes, but at least we have it, right?
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Mon Mar 13, 2006 12:47 am    Post subject: Reply to topic Reply with quote

I haven't seen him around in the past few days, true, but he's usually pretty good about responding.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon Mar 13, 2006 6:09 am    Post subject: Reply to topic Reply with quote

To do stats like you said with the persist module use the 'game' interval. You will have to make your module progress this interval when the game is over (x goals or whatever). Interval reset is the normal one that ?scorereset and billing uses.

You will probably also need to implement SetStat for interval game. As the intervals at first glance seem to be independant from each other rather than accumalative/layered. I expect you will be using your own scoring modules so this shouldn't be a problem.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Mon Mar 13, 2006 12:18 pm    Post subject: Reply to topic Reply with quote

I spoke with grel at length about this last night. My problem is that I need to keep stats for all players (those here and those who have left) in the same way. Using the asss persist system means having to "remember" who is "not here" in a special list so I can retreive their persist info. Since I would have to keep a special list anyways, I'm just going to keep all players who have ever played in a list along with their stats. This way I can still treat all data generically, and don't have to use persist.

This will be a very common issue for zones that have the concept of a game (WZ, CZ, SWZ, etc) who want to migrate to asss. Since MERV didn't generically keep track of players who have left the arena, I suspect all bots based on it already do what I will have to.
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Mon Mar 13, 2006 12:34 pm    Post subject: Reply to topic Reply with quote

That sounds reasonable. If you encapsulate the code to do that into its own module, you should be able to speed the conversion for those other zones you mentioned.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Mon Mar 13, 2006 12:47 pm    Post subject: Reply to topic Reply with quote

A very interesting idea. Something like GamePersist, with its own interface. However, as grel noted, that would mean duplicating a lot of the stuff in asss. I wouldn't want to tempt others away from using built-in stuff when it wasn't necessary. But still, making it a common module makes it more reusable.
Back to top
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Mon Mar 13, 2006 2:24 pm    Post subject: Reply to topic Reply with quote

WZ (and aswz) uses persistent data for those that left the arena? Hmm, I'll add that to my list.
_________________
Oldbie Server Help
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Mon Mar 13, 2006 2:56 pm    Post subject: Reply to topic Reply with quote

i88gerbils wrote:
WZ (and aswz) uses persistent data for those that left the arena? Hmm, I'll add that to my list.


Not saying they do, just that it's a natural thing. When a game ends, you display stats for all players who played, even those who are no longer there. Asss doesn't support this at all, even with its persistence system, because there is no way to retreive persistence data for a player who isn't connected. Even if there was, the stats moduel still needs to maintain a list of those players who played but have left, so it know who to retreive data for.

I'm still thinking about how I am going to handle this, but it's definitely not an immediate thing.
Back to top
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Mon Mar 13, 2006 7:54 pm    Post subject: Reply to topic Reply with quote

Hmm.. Smong originally made game persistent data for race.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Mar 14, 2006 7:04 pm    Post subject: Reply to topic Reply with quote

Ekted since a lot of people will want they kind of stats you described, why don't you see if you can modify asss to enumerate all players in a given interval? If you use interval game it is only supposed to hold records for players that actually have stats, ie: entered the arena during that game period. I suspect all the code you need will be in the dbtool source since it should be able to do that.

i88gerbils if you are referring to my hi-octane race module, that used a txt file (looking at the code again it's a good example how not to make a module, fx: if (strcmp(arena->name, "hio")) return; ). I don't think any of my other race modules saved anything.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Tue Mar 14, 2006 7:21 pm    Post subject: Reply to topic Reply with quote

No I'm talking about the pdata struct. This added players who entered, but did not remove them when they left. That way when you ran generatestats() it would loop through the record of all players. Though it continue'd out of the loop when it found players marked as "not playing", which could easily be changed for what Mr. Ekted wants (the code snippet below).

Code: Show/Hide

                if (p->arena != arena) continue;
                if (p->p_ship == SHIP_SPEC) continue;
                if (p->status != S_PLAYING || (!d->playing)) continue;
                if (!d->playing) continue;



for instance i was going to use something similar for (as)wz stats such as :

Code: Show/Hide

struct {
   u8 kills, deaths, tk, fl, steals; /* possibly flagtime, etc ... */
} pdata;
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Mar 14, 2006 7:43 pm    Post subject: Reply to topic Reply with quote

I think you misunderstood that bit of code. The d->playing was for players in the arena but not participating in the race (afk, finished race, etc).

I see 'pdata' as an asss convention for per player data. PPDATA is a macro in player.h:
pdata *d = PPDATA(p, pdkey);

The data only exists for as long as the player is in the arena. (It gets zero'd when they enter a new arena).

Anyway, there's nothing stopping you keeping a per arena LinkedList of data for each player that entered. Thinking about that now it would be easier to code than to mess around with the berkely db stuff.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Tue Mar 14, 2006 7:50 pm    Post subject: Reply to topic Reply with quote

Hmm.. yeah. I had forgotten about pdata as player data zonewide and thought it only arenawide. I suck.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Mar 14, 2006 9:05 pm    Post subject: Reply to topic Reply with quote

Grel suggested that I make a module to implement generic player data for games, so that others could use it as well. We'll see what happens when I get to that.
Back to top
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Wed Mar 15, 2006 3:25 pm    Post subject: Reply to topic Reply with quote

I think it's time to split this thread into the productive part.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 644 page(s) served in previous 5 minutes.

phpBB Created this page in 0.466974 seconds : 43 queries executed (92.1%): GZIP compression disabled