Page 1 of 1

Posted: Fri Nov 18, 2005 3:03 pm
by dusky
Hello,

I'm used to play bzflag with my friends on our local (not public) bzflag server and I wrote a modification to bzfs. Not modification exactly, but feature to "log" some statistics to mysql database.

Main aim of that is to remember score of user after he quit the game (how many users he killed, how many times he was killed, how many teammates he kills ..) and how many games he played (at this stage of code, maybe some other infos in the future). Another "logged" thing is, which flag user grab (for administrator to check if he grabs only good flags or so..).

Information about score then can be viewed by php-based webpage. I also need some good ranking ideas, but that is out of scope of this topic ;]

And now I see new feature of bzfs 2.0.4, plugins. It is very good thing for my mysql stats, because with plugins it is not needed to change code of server. But I miss one event. Grab Flag. There is event to Capture Flag, but I want do count statistics about every flag. So I can't rewrite that stats to be a plugin module.

Can I ask you for your opinion about this stats? Are they usefull or not? I'm asking to decide if I have to try to ask maintainers to add that event or if I have to do it myself for my own purposes only.

Thanx for your comments/suggests.

dusky

Sounds Good

Posted: Fri Nov 18, 2005 5:33 pm
by optic delusion
I like this Idea a ton. I'm sure RPG is interested too. I think I even used some of your code for a short while. Did someone you know post it?

I have asked about a flag grab API, but am not sure if one is being written for version 2.1. If you wanted to write one......... I think the way flag grabs are handled is client-side, it would require client modification as well as a plugin to parse the data. But please do not take my word for it! I do not know for sure.

Any way, this discussion should be in the "Plugin Development" forum, not the "Plugin Releases" forum.

a link.
http://my.bzflag.org/bb/viewtopic.php?t=5323

Posted: Fri Nov 18, 2005 5:54 pm
by [dmp]
dusky wrote: Can I ask you for your opinion about this stats? Are they usefull or not? I'm asking to decide if I have to try to ask maintainers to add that event or if I have to do it myself for my own purposes only.
Well its a good idea :) Or I hope it is. As I too, have been busy working on a similar plugin, except it does not store the data but forwards the data to a server, which will take care of further processing. (Currently this means, store it in database, perform elo-rating and some misc stats).

My work isnt ready for public use yet. However, within a week or two I hope to find a brave soul that will use the plugin, so the server-end can be tested with real data (currently, bots are my only test subjects :) )

Posted: Fri Nov 18, 2005 5:56 pm
by I_Died_Once
meacan wrote:
dusky wrote: Can I ask you for your opinion about this stats? Are they usefull or not? I'm asking to decide if I have to try to ask maintainers to add that event or if I have to do it myself for my own purposes only.
Well its a good idea :) Or I hope it is. As I too, have been busy working on a similar plugin, except it does not store the data but forwards the data to a server, which will take care of further processing. (Currently this means, store it in database, perform elo-rating and some misc stats).

My work isnt ready for public use yet. However, within a week or two I hope to find a brave soul that will use the plugin, so the server-end can be tested with real data (currently, bots are my only test subjects :) )
Ready when you are. Just let me know... Planet MoFo awaits.

Yes we are interested.

Posted: Fri Nov 18, 2005 6:09 pm
by optic delusion
Dusky, What BZFlag version was your code for?
Was it posted at sourceforge or elsewhere?
Will you give it to us? Including the website data parser?
Would you be interested in a collaboration?
.......Expect a lot of interest.

Posted: Fri Nov 18, 2005 9:24 pm
by RPG
blast007 (known as "blast" on this board) does alot of stuff with MySQL and SQLite. He's often on the IRC channel #masterbot if you need to catch him. I remember him saying that he had something like that plugin you described already done.

Re: Yes we are interested.

Posted: Fri Nov 18, 2005 11:59 pm
by dusky
A-Delusion wrote:Dusky, What BZFlag version was your code for?
Was it posted at sourceforge or elsewhere?
Will you give it to us? Including the website data parser?
Would you be interested in a collaboration?
.......Expect a lot of interest.
it is a plugin to bzfs 2.0.4, not published yet, I have to put it to publicable form ;], that means, to write some sanity checks and so on..
and of course, I'll post it here
I would be interested in colaboration, because I'm used to write C programs, not C++, so maybe there is too much C-like code, which should be written in C++. And I have no windows developement skills (in fact I don't have any windows installed, except for Xwindows ;]), so I need help with putting it to form, which could be compiled under windows.

Posted: Sat Nov 19, 2005 6:19 pm
by blast
I played around with the MySQL client library for C in a plugin. Didn't get really far, but it was capable of running queries on the MySQL server, and had the start of logging chat. However, I really don't have any time to work on it further.

Re: Yes we are interested.

Posted: Sat Nov 19, 2005 8:20 pm
by The Vaxorcist
dusky wrote: I would be interested in colaboration, because I'm used to write C programs, not C++, so maybe there is too much C-like code, which should be written in C++.
Always a tough decision to make. It's probably OK as long as you didn't do anything that obviously should be object oriented.

source of beta version of mysql statistics plugin

Posted: Sun Nov 20, 2005 6:02 pm
by dusky
Here is beta version of mystats plugin ;]
http://www.dusky.sk/bzflag/mystats_beta.tgz

Posted: Tue Nov 22, 2005 9:42 pm
by JeffM
moved to plugin dev

Problems

Posted: Wed Nov 08, 2006 5:50 pm
by SilverFox
I compiled this plugin (copied mysql from my /usr/local/lib/mysql to the plugin directory to get it to compile), however it isn't loading correctly:

Code: Select all

 /libexec/ld-elf.so.1: /big/bzfs/plugins/mystats.so: Undefined symbol "mysql_init"
Any ideas why this is?