The Tournament Director Forums
Main => General Discussion => Topic started 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?
-
One suggestion...let me know when you've accomplished this. My club would be interested.
-
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.
-
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
-
Jody bingo,
We could talk about what would be involved in doing this for your club if you're interested.
John
-
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.
-
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. :)
-
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)
-
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.
-
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
-
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.
-
Agreed. :)
-
It would just need to do it like every minute or two, or a timed option.
-
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.
-
Awesome. Thanks!
-
Anything new on this?
-
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!)
-
No worries, much appreciated. :) - I understand, I'm a software developer too, though I have nothing as cool as TD. Thanks man!
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).
-
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).
-
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.
-
Dude that is PIMP.