Autoplay PGN All Games

Sort:
EricFleet

I would like to have a program that can play through all games in a PGN file automatically. I use SCID vs PC which can play one, but I would like to be able to work out and watch the moves of the game in pretty rapid fire succession... especially opening collection PGNs that I have.

 

Thanks in Advance!

MrEdCollins

Hi Eric,

I read your question seven days ago and I thought it was a great idea.  I could see some neat uses for this.  For example, I could load a pgn file, start this autoplay feature, lean back in my chair and put my feat up and never have to touch the keyboard or mouse again, as I watched the program replay all of the games in the file.  I envisioned the games could be chess games or maybe just test positions.

However no, I didn't know of a program that could do this.

One of the neat things about using shareware/freeware programs is the accessibility of the author.  They are often open to suggestions for improvements.  Furthermore, they actually care about the program! I contacted Steven Atkinson and suggested this feature for Scidc vs. PC (along with a couple of other suggestions and a couple of bug reports).

Earlier this morning, he implemented the change for me for a test version.  (Acutally, he wrote the code and I modfied the scid.gui myself, to implement it.)

It works fine.  As I type this, the program is autoplaying/animating/replaying (whatever you want to call it) all of the games in one of my PGN files, at 1 second per move.  (In a way, it's a poor-man's screensaver!)

I noticed it doesn't "wrap around."  After playing the last game in the file, the animation stops, rather than wrap-around to the first game in the file, but there's nothing wrong with that and may actually be preferable. 

Also, I noticed a slight glitch... the program doesn't pause for x number of seconds after the last move is made in the game. When that last move is made the program immediately loads the next game and begins that animation.

You can make this change yourself, providing you are comfortable editing the scid.gui text file with any text editor.  (I use TextPad since Notepad sucks.)  The code to change it is here.   It's the middle change of the three changes listed. 

Once the text file has been edited, you right-click the animation button (rather than your normal left-click) if you want the program to immediately load the next game in the file.

Thanks for the suggestion.

ilgambittoo

chess base can do this.

Love..

EricFleet

Thank you so much for taking this and following up with it! I will check this out right away and let you know how it works out for me.

MrEdCollins

You're correct.  I wasn't aware Chessbase can do this.

For those who don't know how, select the games you want to play and then right-click.  Select "Replay Games Automatically."  Choose the animation speed with the slider. 

Unlike Steven's recent code change in Scid vs. PC, Chessbase does "wraparound."  After the last game you selected has been animated, the first game you chose is animated again.

EricFleet

I'm confused... I see the file scid.gui and can open it in notepad. I do not see main.tcl however... what am I doing wrong?

MrEdCollins

Just open the scid.gui file with your chosen editor and look for

button .main.button.trial -image tb_trial -command {setTrialMode toggle}

in the file. Your first change will come right above this line. You will add the following:

# Right-click Autoplays all games in filter
bind .main.button.autoplay <Button-3> {toggleAutoplay 2}

The second change for this fix is a bit further down in the file. Basically you replace

proc toggleAutoplay {} {
with
proc toggleAutoplay {{mode 1}} {

and then replace

set autoplayMode 1
with
set autoplayMode $mode

and then finally replace

cancelAutoplay
with
if {$autoplayMode < 2} {
cancelAutoplay
} else {
# If autoplayMode is 2 load next game (if any) and continue
if {[sc_filter next] == 0} {
cancelAutoplay
} else {
::game::LoadNextPrev next 0
after $autoplayDelay autoplay
}
}

in the appropriate spots.

Click on the "Switch to side-by-side view" toggle to see what the code looks like before and after. This made it easier for me to make the changes.

Save a copy of the scid.gui file before you edit it, in case you really screw up and wish to begin again.
EricFleet

Is there anything I need to do after I edit the file? I launch scid after doing this but nothing appears to have changed

MrEdCollins

No, there is nothing else to do.  Save the file and then restart the program.  But remember to right-click to implement the change.  (A left-click does just replays that single game you have loaded.)

EricFleet

Hmmm, I am right clicking the button (triangle with an arrow over it... but nothing is happening). I even made a minor modification to what appears to be menu text but I am not seeing the change in scid when I restart it... I'm obviously missing something.

MrEdCollins

Hmmm... I'm not sure what you might be doing wrong.

MrEdCollins

And you loaded a PGN file with more than one game, correct?  And the game you loaded is not the last game in the file?

EricFleet

I realized I did something stupid... I had two versions of scid on my computer and was editing the wrong version. Thank you very much for your help with this. Now I am off to run through many, many Berlin defense games :)

MrEdCollins

Good work!

EricFleet

Thanks again for your help on this. It is really nice to be able to go through games rapid fire like this. I also modified the delay so I could get 1/2 second instead of just 1 second per move. I'm amazed at how much I can do in the text editor to modify the behavior of the program.

MrEdCollins

No problem.

Yea, I edit my gui file quite a bit.  I remove all of the data for all of the piece fonts, and just point to the ones that I like that are in an external file.  I replace the color schemes with my favorite colors... I replace the textures...

I also have my own move.wav file and my own player photo files, etc.

It's wonderful to be able to configure the program to your own preferences.

In fact, one of these days I need to update my Scid vs. PC tribute page.  I can see there's more to it that I can add.

halogenic

Thanks for posting this topic!  I too would like to be able to go through master games in rapid succession and will be trying this out.

EricFleet

I'm glad you like it. It is indeed a useful tool and I'm thankful for the help I had getting it to work :)

halogenic

I'd do it now, however I'm having SCID analyze 635 of my games and it's about half way through.  It will be another 24 hours before it's done!  hehe

EricFleet

:)

Guest3637656171
Please Sign Up to comment.

If you need help, please contact our Help and Support team.