xboxscene.org forums

OG Xbox Forums => XboxMediaCenter => Software Forums => XBMC Python Scripting Forum => Topic started by: j_guzzler on June 10, 2005, 11:11:00 AM

Title: Poker Timer
Post by: j_guzzler on June 10, 2005, 11:11:00 AM
What I am looking for is a standard poker timer for tournaments.  User inputs default time and blind incriments and then hits run....Then it will display the time remaining till blinds are increased, and the blinds (big and small), not knowing if many of you play poker, but this would definatley be a cool addition, as I have a tv right near my poker table.....please, please someone tell me that they can work on this, from what I have seen of python, this would be easy, but thats JMHO
Title: Poker Timer
Post by: nuka1195 on June 10, 2005, 01:25:00 PM
This actually might be something I would use, so give me more details on how it should work.

1. Do you just want to enter the amounts and time in the script, in a variable, or do yo want a keyboard input?

2. The sound could be an mp3 or any sound file XBMC supports.

I read the other post, but not sure what all you need. So a list of all options you'll need.

Title: Poker Timer
Post by: j_guzzler on June 10, 2005, 10:56:00 PM
K, this is what I want (I can help with the skinning/graphics if need be, just dont know python)

1.  User input for timer:  I think that Keyboard entry would be best, or have it incriment by 5:00 minutes (press a button to incriment it up to 60 minutes)

2.  User input for blinds:  A set of ranges that the user will input, 10-20, 25-50, 50-100, and so on

Once all the info is in, then there should be a start/stop/resume so that breaks can be taken, maybe even a reset timer (at the specific blind level)

So I am assuming you know how it works, but just to make sure, the timer starts at lets say 20 minutes, you press start and it starts counting down on the screen.  The blinds will also be shown on the screen, so for the first 20 minutes it will be small blind=10, big blind=20, then once timer runs out it will play a sound "timer.mp3", then it will display the time again starting at 20 minutes and then change the blinds (25-50).

Now, when the timer goes off, it can be in the middle of a hand, so maybe have a 30 second delay (or user defined) just to give the hand a chance to end, and if not it will continue, or it can be set to manual resume, where when the timer stops, the user has to press a button to begin again (remote or controller).

Another great feautre would be to display the chips being used as well, you could have a graphic of each color chip (not many colors) then at the beginning you select your colors and their respective values) then  this will be displayed at the top just for reference.

On top of the blinds, some people play with an ante, so maybe give the option to display an ante.

WIth all of this, there should be an option to save settings as well so that you wouldnt wouldnt have to redoo everything......

with that being said, it might even be easier for the user to fill this info in on an xml file or something or right in the python script, cause besides the chip colors, i dont think people change up the rules very much (ie same blinds, and timer settings), this might make it a lot easier, then a person could just change the variables in the python script.

Now I am not sure if its possiblem but it would be nice to integrate this into a skin somehow, so that you could still play music, or something like that while its going, I had a hand in making the orbs skin, and think it would be great to have the timer and the blinds displayed in the orbs, but all this can be done later......because as I said, I dont know much about python so I dont know its limitations with XBMC......

There are examples on the net of this, I just typed in "poker timer" in google, I found one for my pda that works pretty good, but i would rather have it on a tv screen.....

If you need more explanations, or anything else pm me and I can give you my msn and or email so that we can talk about it more.....I am busy a bit right now though, I am renovating my house, so graphical stuff might have to wait for a bit (planning on moving in on July 1st) but i can do some at work.....well i have rambled on too long, thanks for at least thinking about doing this....

j_guzzler
Title: Poker Timer
Post by: nuka1195 on June 11, 2005, 05:59:00 AM
Give me a couple days and I'll have something whipped up for you to try and then we'll go from there.
Title: Poker Timer
Post by: j_guzzler on June 11, 2005, 09:55:00 AM
K will do, thanks
Title: Poker Timer
Post by: nuka1195 on June 19, 2005, 01:03:00 PM
I submitted Poker Timer to http://www.xbmcscripts.com
Title: Poker Timer
Post by: spongy on July 02, 2005, 09:03:00 AM
Thanks alot for the script Nuka,

 I should be using it for the first time today. My friends and family have a tendancy to make a $5 buy-in tourny last six hours. This should help alot.

  I also to want thank you for making it customizable ,panel size, blinds, round length,  etc.

  One thing I noticed, When I set the panel to it's largest size, a large portion of the panel is hidden ( running off the bottom of the screen ). Do others have this problem ? Is there an easy way to move the panel up ? There is plenty of room above the panel.  If not, could you possibly center it ? or make it the right size to Just fit the screen ?

Do you have any plans to make some things configurable from the GUI ? I would love to be able to change blind size and round length on the spot.

   Thanks again.
Title: Poker Timer
Post by: nuka1195 on July 02, 2005, 09:46:00 AM
Hi spongy and thanks,

Yes I'm working on being able to change chips, chip amounts, and all the other settings in the GUI. Just trying to figure out the best way.

The large is 600x600 is your resolution greater than 600 vertically. There are two settings down under class windowOverlay(xbmcgui.WindowDialog):

self.screenOffsetX = 20
self.screenOffsetY = 20

to move the pad up decrease self.screenOffsetY you can go negative.

to move left increase self.screenOffsetX (I know that's backwards)

I've since moved this to the beginning of the file and may make this movable in the GUI.

Good Luck with the poker game and any feedback would be great.
Title: Poker Timer
Post by: KtotheJ on July 02, 2005, 12:09:00 PM
Good thinking j_guzzler and good work nuka1195.  I will be trying this soon.  Are you still able to play music?  Perhaps we can have it load a default playlist and randomize it after playing the start and end alarms?  I haven't tried it yet so you may already have it setup to do this but it is definitely crucial to have tunes during a poker game.
Title: Poker Timer
Post by: nuka1195 on July 02, 2005, 01:50:00 PM
Music or video can play as long as you start them first. So you can create your own playlists of music or video. After you start the timer the video will go full screen and the pad will hide. If you're playing music the visualisation window will come up.

There is a bug if you set animate to False, it could and probably will crash when you exit. I've fixed it and made some other tweaks, but you should be ok as long as you leave animate to true.

The next release will allow changing settings from the GUI.
Title: Poker Timer
Post by: nuka1195 on July 10, 2005, 04:38:00 PM
Here's a preview of Poker Timer II. (This is the small)

Changes/Additions:
 1. Ability to Configure from the GUI, including position.
 2. More easily readable.
 3. Should scale automatically with new scalling for scripts JMarshall added.
 4. Only two sizes Large and Small, but with the above scaling should be enough.
 5. 5 minute Warning.

EDIT: Image shack does suck

http://www.supload.com/free/Poker Timer II.jpg/view (http://www.supload.com/free/Poker Timer II.jpg/view)
(IMG:http://www.supload.com/thumbs/default/Poker%20Timer%20II.jpg)

This post has been edited by nuka1195: Jul 10 2005, 11:49 PM
Title: Poker Timer
Post by: j_guzzler on July 12, 2005, 04:28:00 PM
omg, you hit it right on the nose their, I was going to suggest a different layout for this, with the timers and blinds being larger....i can wait to try this now.....this is awesome...
Title: Poker Timer
Post by: nuka1195 on July 19, 2005, 02:42:00 PM
I just submitted this to http://www.xbmcscripts.com

http://img8.** Pics Spammed From this Source **/img8/5229/ptii0td.jpg

'Display' on the remote hides/shows Pad when level timer is running.          
'Display' on the remote toggles pad size. (Before 1st level starts)          
  (Except when in config mode)                                                
                                                                               
'X' on the control pad hides/shows Pad when level timer is running.          
'X' on the control pad toggles pad size. (Before 1st level starts)            
  (Except when in config mode)                                                
                                                                               
'0' on the remote toggles autohide on/off.                                    
'Y' on the control pad toggles autohide on/off.                              
  (Lock in the upper left corner means autohide is disabled)              
  (It's set for 30 seconds in PTPadFile.xml                                
                                                                               
'Title' on the remote switches to config mode. (Before 1st level starts)      
'White' on the control pad switches to config mode. (Before 1st level starts)
  While in config mode Left/Right selects field to edit.                  
  Up/Down changes value.                                                  
  You can manually edit PTCfgFile.py for more customization.              
                                                                               
To set the number of levels in your tournament, you would set the next        
level's ante to -1. (i.e. for 10 levels set level 11's ante to -1)            
  (There are 20 levels in the tournament if no Ante is set to -1)            
                                                                               
Up/Down/Left/Right repositions the pad except when in config mode. Position  
is saved on exit.                                                            
                                                                               
If the Pad is hidden pause is disabled, pressing any key will show Pad.      
                                                                               
If you want music or a video playing, start them before you launch the script.
                                                                               
TIP: If you have music or video(s) playing. Make sure they're longer than the
     tournament or you have repeat folders checked in system/settings.        
                                                                               
TIP: If you create your own event alarms, make sure they're longer than the  
     corresponding AlarmTime + your crossfade setting.                        
                                                                               
Cool Animated slide in/out by:   Thanks to the skinners for the panel2.png:  
      EnderW                          Chokemaniac  (lock.png)                
                                                                               
Thanks to Phunck for the code used for reading the config files.              
                                                                               

Nuka1195                                                                    

You need a build after July 4th

This post has been edited by nuka1195: Jul 19 2005, 09:45 PM
Title: Poker Timer
Post by: xescher on February 12, 2006, 12:48:00 AM
Nuka1195,
  This really is a great script.  We have used it a couple of times and it rocks.  But there are a few additions that would really be great.

1) a way to hide the dialog to tend to other tasks, such as changing music, etc.  And then a way to bring it back.  (Maybe a special remote code to background it or something.)

2) a way to start the timer at a certain level if something happens and you have to reboot.  (Nothing worse than having 10 people wonder why you can't start a timer over half way thru the night.)

I would be happy to work with you or help you out.

Let me know what's best.

Thanks,
  XEscher
Title: Poker Timer
Post by: nuka1195 on February 12, 2006, 11:23:00 AM
#1: you want to be able to change playlists? you already can navigate the currently playing playlist with the remote. You can hide the pad, i don't think that's what you meant. i'm not sure the best way to background this script and allow control over it.

#2: should be easily added.

just in case you should be using poker timer ii, that's the one i will be updating.

any suggestions on how to do #1? you mentioned a remote key, that would require editing keymap.xml, not really a good way to do this as it would require any user to edit that file.
Title: Poker Timer
Post by: xescher on February 25, 2006, 12:08:00 AM
#1 - So you say that I can hide the pad, then do something else with the XBox, like change the playlist or use a new visualization, and then unhide the pad?  If that works then it is sufficient.  Usually during breaks I get a lot of questions on how the Xbox works, so I would like to pause the timer, and then give a tour of XBMC.  I don't need to run any scripts, but at least use all of the menus.  And then bring the pad back to focus after the break.

As far as hiding the pad, I think of it like using Alt-Tab in windows to switch between tasks.  While I can hide the pad, I am unclear on how to bring it back up.  I want it to continue running, but I want to be able to do other stuff as well without losing it.  Any way to have the script know that if I try to run it again, and it is already running (just hidden), that it just needs to unhide itself?

#2 - Let's say that we are 2/3rds the way through the tournament and something happens, being able to reboot and start the timer at the 5th level would be great.  Even if we had to wait around for 5 minutes to "sync" up with where we left off would be nice.  If you are interested in doing this let me know, otherwise I will start looking at the code.  

Thanks.

ps. sorry for the delay, I never got an email saying that you had replied.
Title: Poker Timer
Post by: j_guzzler on February 27, 2006, 02:12:00 PM
#1 would be great if it could be done somehow.  I use this script most of all and would like to see some updates.

I find that unless I work the timer/Xbox, anyone else who touches it resets it, or messes something up.  I dont think that adding kemap support would be that bad, especially since most who use scripts a) know how to fiddle with the keymap cool.gif there are still a few buttons that arent used.  I mysefl never use the "screenshot" button and would easily replace that to have the script hiden in the background.....
Title: Poker Timer
Post by: Chaseskip on July 12, 2006, 01:12:00 PM
I have both Poker Timer & Poker Timer II installed.
Poker Timer works well, but Poker Timer II will not run at all.
Am I missing something?
I have done search after search looking for info.....

I am running the latest XBMC to date 2007/07/09.

This post has been edited by Chaseskip: Jul 12 2006, 08:17 PM
Title: Poker Timer
Post by: d9ciarav on July 13, 2006, 12:57:00 PM
QUOTE(Chaseskip @ Jul 12 2006, 04:43 PM) View Post

I have both Poker Timer & Poker Timer II installed.
Poker Timer works well, but Poker Timer II will not run at all.
Am I missing something?
I have done search after search looking for info.....

I am running the latest XBMC to date 2007/07/09.


I'm having the same problem.  I update XBMC regularly, and Poker Timer II was working for a while, but I can confirm it hasn't been working since the 6/6/06 release, and probably longer.  I know there are a lot of changes taking place within XBMC right now, moving toward the 2.0 release, but I really liked version 2 of the timer.  It really is superior to the first, and it would be great if someone could get it going again.
Title: Poker Timer
Post by: nuka1195 on July 13, 2006, 08:13:00 PM
Poker Timer II still works with new builds. You won't have a BG image in MC360 as I rely on the skin having a panel2.png.


I think the problem is I didn't include _xmlplus libraries. It's necessary. It needs to be unzipped. you can place it in your system/lib/ or the scripts extras folder. leave the folder intact just make sure it's unzipped.

i uploaded it here

#1 It would be hard to allow focus to leave the script and be able to start and stop the timer. Any suggestions would be considered.

#2. I forgot. I'll look into it though.

This post has been edited by nuka1195: Jul 14 2006, 03:16 AM
Title: Poker Timer
Post by: j_guzzler on July 13, 2006, 09:13:00 PM
Nice to see that people are still using this sweet app, I love it and would love to see it devlope more....
Title: Poker Timer
Post by: d9ciarav on July 16, 2006, 01:41:00 AM
just so i understand clearly, i extract then transfer the _xmlplus folder into /system/python/Lib/, or do i move the contents of the _xmlplus folder into the Lib folder?

nm, got it working, and i've got to say it's great!  really good work on v2!
Title: Poker Timer
Post by: Chaseskip on July 16, 2006, 12:09:00 PM
WOW!

That is TOTALLY AWESOME!

Thanks!

I opened the config file & edited it, transferred to XBox only to find all the editing capabilities added in.
This is AWESOME!

Thanks again!
smile.gif
Title: Poker Timer
Post by: d9ciarav on July 16, 2006, 07:48:00 PM
If you want to use this script in MC360 but don't like the look without a background, go here and download the panel2.png image.  FTP it to your XBMC /skin/MC360/media folder, and restart the script.  Now, you've got the background panel for PMIII, showing up in MC360.
Title: Poker Timer
Post by: nuka1195 on December 31, 2006, 01:13:00 PM
updated: All libraries and graphics are included.

I also added the start at any level that was requested.

here is the thread to post any bug reports and find a download link (It's in SVN). http://www.xboxmediacenter.com/forum/showthread.php?t=23949

This post has been edited by nuka1195: Dec 31 2006, 09:13 PM