MYSQL Plugin

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
dusky
Private
Private
Posts: 3
Joined: Fri Nov 18, 2005 2:07 pm

Post by dusky » Fri Nov 18, 2005 3:03 pm

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

User avatar
optic delusion
Special Forces
Special Forces
Posts: 991
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Sounds Good

Post by optic delusion » Fri Nov 18, 2005 5:33 pm

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
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

User avatar
[dmp]
Captain
Captain
Posts: 282
Joined: Mon Dec 09, 2002 3:20 pm
Location: CPH, Denmark
Contact:

Post by [dmp] » Fri Nov 18, 2005 5:54 pm

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 :) )
I don't need huge pictures here.

User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once » Fri Nov 18, 2005 5:56 pm

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.
...This has been a recording.

User avatar
optic delusion
Special Forces
Special Forces
Posts: 991
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Yes we are interested.

Post by optic delusion » Fri Nov 18, 2005 6:09 pm

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.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Fri Nov 18, 2005 9:24 pm

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.

dusky
Private
Private
Posts: 3
Joined: Fri Nov 18, 2005 2:07 pm

Re: Yes we are interested.

Post by dusky » Fri Nov 18, 2005 11:59 pm

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.

User avatar
blast
General
General
Posts: 4746
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast » Sat Nov 19, 2005 6:19 pm

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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
The Vaxorcist
Private First Class
Private First Class
Posts: 134
Joined: Wed Mar 23, 2005 10:28 am
Location: Santa Rosa, CA

Re: Yes we are interested.

Post by The Vaxorcist » Sat Nov 19, 2005 8:20 pm

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.
Image
Where's Darwin when you need him?

Lagger@Everywhere

dusky
Private
Private
Posts: 3
Joined: Fri Nov 18, 2005 2:07 pm

source of beta version of mysql statistics plugin

Post by dusky » Sun Nov 20, 2005 6:02 pm

Here is beta version of mystats plugin ;]
http://www.dusky.sk/bzflag/mystats_beta.tgz

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5173
Joined: Fri Dec 13, 2002 4:11 am
Location: https://discord.gg/NN9uAvx
Contact:

Post by JeffM » Tue Nov 22, 2005 9:42 pm

moved to plugin dev

User avatar
SilverFox
Private First Class
Private First Class
Posts: 163
Joined: Wed Oct 06, 2004 6:51 pm
Contact:

Problems

Post by SilverFox » Wed Nov 08, 2006 5:50 pm

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?

Post Reply