The Tournament Director Forums

Main => General Discussion => Topic started by: johnbatdorf on February 07, 2011, 08:19:51 PM

Title: Question About Reading Tournament Data
Post by: johnbatdorf on February 07, 2011, 08:19:51 PM
I play in a league in portland that uses TD in their establishment. We're talking several hundred players with 6 tournaments + per day.

I'm a c# programmer, and want to create a windows service that will read current data from tournaments AS THEY ARE RUNNING and push this data to the web. (How many players are in, prize pools, etc.) I'd have a timer run and update it like every minute or 3 or so and then push this info to a web service that could publish it to a web site....

Any suggestions?
Title: Re: Question About Reading Tournament Data
Post by: jodybingo on February 07, 2011, 10:08:47 PM
One suggestion...let me know when you've accomplished this. My club would be interested.
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on February 08, 2011, 10:31:53 AM
You'd have to (a) set the program to auto-save the tournament at a pretty high frequency and (b) be able to read and parse the saved tournament file.  Currently, there's no other way to do it.

The best thing I could do to help is to have the software write out a simple status file at specific time intervals.  It would be extremely sparse, with just a few bits of data, so as to take a minimal amount of time.  Something like:

state:inprogress
clock:running
time:13:27
level:Round 2
time:10:25:39
buyins:27
addons:0
rebuys:3
players:14
busted:13
pot:783.22


An external program could read this to get the current tournament information.  This wouldn't be too hard, so I'll consider adding it before 2.6 finally goes out if this would help.
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 08, 2011, 11:05:37 AM
Yeah corey, if you dumped this data to an 'inprogress.xml' file, or something that was a 'known' place to get this data, that would be really cool. My windows service, or application could then push this XML file to a web service that would publish the data in a small 'live' box on the web site. Would be cool to see how many people were playing, etc. Where can this data be found in the td.db file? Love your software.

John
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 08, 2011, 11:06:35 AM
Jody bingo,

We could talk about what would be involved in doing this for your club if you're interested.

John
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on February 08, 2011, 03:40:11 PM
Where can this data be found in the td.db file?

Not sure which data you're referring to, since we're talking about a possible future feature.  But the only things in the td.db file currently are player information for players in your database (ID and name information), league information, and season information.  All tournament data is stored in tournament files.
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 08, 2011, 04:35:26 PM
Sorry,

If I wanted to read this data now, for existing running tourneys, is that available somewhere?

Would love the feature, don't get me wrong. :)
Title: Re: Question About Reading Tournament Data
Post by: jodybingo on February 09, 2011, 09:25:28 PM
I just spoke to the powers that be here and they are interested in this. They will be streaming live video on our web site soon (our final tables with pocket cams too) and would like this as well. And maybe add the prizes too along with total pot.
Jody Stacey
jodybingo@hotmail.com
www.playgroundpoker.ca (http://www.playgroundpoker.ca)
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on February 11, 2011, 12:10:39 PM
Sorry,

If I wanted to read this data now, for existing running tourneys, is that available somewhere?

Would love the feature, don't get me wrong. :)

Not easily.  You can try to decipher it from the saved tournament file, but it won't be easy - especially since the data you're trying to use isn't actually saved - it's computed.  Thus, you'd have to read the saved tournament file, parse/interpret it, find the stuff you are interested in, then compute it from that.  I would rate it as very difficult.
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 11, 2011, 05:52:03 PM
Then I vote for a feature. hahahahaa

Cool, thanks for the info. I guess if you offer it as a feature, I could do it for the people that want it here. But I don't think they'll pay too much if it's too complex.

thank you Corey.

J
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on February 15, 2011, 02:07:09 PM
Another interesting thought is to have the same feature be able to post the information to a web service.  Once the data is put together, the software could just as easily fire off an XMLHttpRequest (aka, AJAX) as write the information to a file.
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 23, 2011, 02:22:13 PM
Agreed. :)
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 23, 2011, 02:24:02 PM
It would just need to do it like every minute or two, or a timed option.
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on February 24, 2011, 10:19:21 AM
That's on the to-do list now.  It will be an option to write the data to a file and/or fire off a GET or POST request to a configurable URL, and the frequency.  No specific release planned, but I'll try to get it into the final 2.6.
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on February 26, 2011, 10:10:13 PM
Awesome. Thanks!
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on June 05, 2011, 11:08:08 PM
Anything new on this?
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on June 06, 2011, 04:46:06 PM
It's still targeted for 2.6 final.  And it's still in the works and nearly done, it's just been delayed due to having to deal with a lot of licensing issues.  Sorry, I'm working on it! (And not getting a lot of sleep!)
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on July 06, 2011, 08:15:17 PM
No worries, much appreciated. :) - I understand, I'm a software developer too, though I have nothing as cool as TD. Thanks man!

John
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on July 07, 2011, 10:21:34 AM
Getting much closer now to the release, and this feature is essentially finished.

FYI, the data written to the file (or sent via HTTP) is the list of tournament variables that are available to formulas, to give you a head start on this.  It was the easiest thing to do and provides the most information.  Here's a sample:

roundnum=1
breaknum=0
level=0
isround=1
nextisround=1
state=0
statedesc=before
buyins=0
numberofplayers=0
n=0
numberofleaguemembers=0
pot=0
prizepool=0
pp=0
playersleft=0
players=0
tablesleft=0
tables=0
secondsleft=1800
secondselapsed=0
clockpaused=1
clockpausedseconds=0
timeofday=171608
time=1309212968
lastplayermovetime=0
rebuysallowed=0
rebuysover=0
rebuysleft=0
totalrebuys=0
totalnumberofrebuys=0
tnr=0
addonsallowed=0
addonsover=0
addonsleft=0
totaladdons=0
totalnumberofaddons=0
tna=0
inthemoneyrank=5
mr=5
totalfixedrake=0
fixedrake=0
ante=0
smallblind=100
bigblind=200
limit1=100
limit2=200
gametype=2
gamename=texas hold em
nextante=0
nextsmallblind=200
nextbigblind=400
nextlimit1=200
nextlimit2=400
nextgamename=texas hold em
nextgametype=0
chipcount=0


(and looking at it now, that time variable may be bad).
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on July 07, 2011, 12:31:19 PM
So I could create a web service to intercept the HTTP response, and either just publish the data from the web service on the web site, OR I could write a service that would just update a table in a database or something and the web site could show that data.... am I understanding it correctly?

Thanks, and the variables listed look great! When does 2.6 go gold?

John

Getting much closer now to the release, and this feature is essentially finished.

FYI, the data written to the file (or sent via HTTP) is the list of tournament variables that are available to formulas, to give you a head start on this.  It was the easiest thing to do and provides the most information.  Here's a sample:

roundnum=1
breaknum=0
level=0
isround=1
nextisround=1
state=0
statedesc=before
buyins=0
numberofplayers=0
n=0
numberofleaguemembers=0
pot=0
prizepool=0
pp=0
playersleft=0
players=0
tablesleft=0
tables=0
secondsleft=1800
secondselapsed=0
clockpaused=1
clockpausedseconds=0
timeofday=171608
time=1309212968
lastplayermovetime=0
rebuysallowed=0
rebuysover=0
rebuysleft=0
totalrebuys=0
totalnumberofrebuys=0
tnr=0
addonsallowed=0
addonsover=0
addonsleft=0
totaladdons=0
totalnumberofaddons=0
tna=0
inthemoneyrank=5
mr=5
totalfixedrake=0
fixedrake=0
ante=0
smallblind=100
bigblind=200
limit1=100
limit2=200
gametype=2
gamename=texas hold em
nextante=0
nextsmallblind=200
nextbigblind=400
nextlimit1=200
nextlimit2=400
nextgamename=texas hold em
nextgametype=0
chipcount=0


(and looking at it now, that time variable may be bad).
Title: Re: Question About Reading Tournament Data
Post by: Corey Cooper on July 07, 2011, 01:19:22 PM
Yes, it's up to you to decide how to use that data.  The TD will be able to write the data to a file, or send it to a URL using GET or POST methods.  See attached screenshot.  I'm making progress towards the final version every day, and the list of remaining items has finally gotten down to a much smaller, manageable size.  No firm date yet, but ASAP ... and I'm celebrating when it finally goes out.  It's been a long journey for me.
Title: Re: Question About Reading Tournament Data
Post by: johnbatdorf on July 07, 2011, 01:25:52 PM
Dude that is PIMP.