Page 1 of 3

new version of the chessboard display: VARIATIONS supported

Posted: Thu Mar 08, 2012 6:11 pm
by Paolo Casaschi
Hello,

Carl just installed a new test version of the chessboard display software for the forum, that SUPPORTS BROWSING VARIATIONS.

Have a look below to a couple of example.

Please try the new software posting PGN games with variations; if you find any PGN game that fails parsing correctly, please let me know by replying to this post. You can also reply here with any feedback.

First example, a good old classic game:


With the new version, you get for free also the support of chess informant symbols; this is a game from chess informant, posted here with permission from the chsess informant publishing company:


You can jump to the position within a variation just by clicking on it.
There's also some keyboard support with the arrow keys:

- arrow up/down: go to game start/end (as before)
- arrow left/right: one move backward/forward (as before)

- shift-arrow up: go to variation start
- shift-arrow down: go to variation end
- shift-arrow left: go to the move before the start of the current variation
- shift-arrow rigth: cycle through alternative moves to the last played move

Last two items require explaination...

assume you have this game: 1. e4 e5 2. Nf3 (2. f4 d5) (2. Nc3 Nf6) Nc6

assume you just clicked on the variation move d5, if you now hit shift-arrow left you jump to e5 (the move preceding the start of the variation, so preceding f4)

assume you just clicked on Nf3, if you now hit repeadetly shift-arrow right you cycle through f4, Nc3 and then back to Nf3 (f4, Nc3 and Nf3 are the alternative moves to the last one played Nf3)

Again, please try posting games with variations and post here your feedback!
Thanks for helping improving the upcoming new release of the chessboard software.

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Thu Mar 08, 2012 6:19 pm
by John Foley
Bravo!

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Thu Mar 08, 2012 6:59 pm
by Carl Hibbard
A nice job yet again Paolo

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 12:45 am
by John McKenna

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 7:59 am
by Ian Kingston
Is anybody else having problems with this in Chrome? I can't replay the variations. Everything's fine in Firefox and Safari.

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 8:02 am
by Carl Hibbard
Ian Kingston wrote:Is anybody else having problems with this in Chrome? I can't replay the variations. Everything's fine in Firefox and Safari.
Whoops yes you are right not working here in 17.0.963.78

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 8:32 am
by Carl Hibbard
Carl Hibbard wrote:
Ian Kingston wrote:Is anybody else having problems with this in Chrome? I can't replay the variations. Everything's fine in Firefox and Safari.
Whoops yes you are right not working here in 17.0.963.78
It seems to be a strange intermittent failure but I am trying to nail down the combinations

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 8:48 am
by Ian Kingston
Carl Hibbard wrote:
Carl Hibbard wrote:
Ian Kingston wrote:Is anybody else having problems with this in Chrome? I can't replay the variations. Everything's fine in Firefox and Safari.
Whoops yes you are right not working here in 17.0.963.78
It seems to be a strange intermittent failure but I am trying to nail down the combinations
Thanks - haven't managed to make it work at all here. I've tried disabling various extensions, but with no effect.

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 11:09 am
by Matt Mackenzie
John McKenna wrote:
Erm, what game is it actually?? :)

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 1:14 pm
by Paolo Casaschi
Carl Hibbard wrote:
Ian Kingston wrote:Is anybody else having problems with this in Chrome? I can't replay the variations. Everything's fine in Firefox and Safari.
Whoops yes you are right not working here in 17.0.963.78
That's unexpecetd, I'm doing all development/debugging on chrome.

Try first to EMPY THE BROWSER CACHE, this sometimes helps

Failing that, if you have a chessboard that does not display correctly, right-click on that chessboard and select "inspect element"; on the frame that opens select "console" and look if there's any error message there. In case post here and I'll have a look.

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 1:17 pm
by Paolo Casaschi
Ian Kingston wrote:Thanks - haven't managed to make it work at all here. I've tried disabling various extensions, but with no effect.
When you say " haven't managed to make it work at all here", could you be a bit more specific?

Does the chessboard show up or not?
If the chessboard shows up, can you click successfully on the main variation?
What actially does not work?

You cant go to the doctor and just say "I dont feel good" :-)

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 1:30 pm
by Mick Norris
Paolo Casaschi wrote:
Carl Hibbard wrote:
Ian Kingston wrote:Is anybody else having problems with this in Chrome? I can't replay the variations. Everything's fine in Firefox and Safari.
Whoops yes you are right not working here in 17.0.963.78
That's unexpecetd, I'm doing all development/debugging on chrome.

Try first to EMPY THE BROWSER CACHE, this sometimes helps

Failing that, if you have a chessboard that does not display correctly, right-click on that chessboard and select "inspect element"; on the frame that opens select "console" and look if there's any error message there. In case post here and I'll have a look.
Emptying the cache worked for me, before that I could see the board and play through the game, but not the variations (in Chrome)

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 1:41 pm
by Simon Ansell
Same for me, wasn't working in Chrome but empty the cache and it works. Chrome sometimes undesirably caches scripts, or it could be something to do with the HTTP 'Expires' header sent from the web server.

BTW good job Paolo, I've thought about writing something similar before but doesn't seem much point as your code is excellent!

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 1:54 pm
by Paolo Casaschi
Simon Ansell wrote:BTW good job Paolo, I've thought about writing something similar before but doesn't seem much point as your code is excellent!
It looks like I just gave you back several coding nights for the next three years :wink:

Re: new version of the chessboard display: VARIATIONS suppor

Posted: Fri Mar 09, 2012 1:56 pm
by Ian Kingston
Paolo Casaschi wrote:
Ian Kingston wrote:Thanks - haven't managed to make it work at all here. I've tried disabling various extensions, but with no effect.
When you say " haven't managed to make it work at all here", could you be a bit more specific?

Does the chessboard show up or not?
If the chessboard shows up, can you click successfully on the main variation?
What actially does not work?

You cant go to the doctor and just say "I dont feel good" :-)
I know, but the doctor wasn't in at the time.

But now you're here: clearing the cache has solved the problem. For the record, the specific problem was that the updated version worked exactly the same as the old one: the game displayed and could be replayed, but the variations remained simply text. Clicking on them had no effect and the cursor did not change when hovering over them.

Thanks for supplying the cure. And thanks for the added functionality - much appreciated!