Page 5 of 20

Re: How to post chess games

Posted: Tue Jun 22, 2010 11:43 am
by pgn4web
kingliveson wrote:
hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.

Anyone else noticed this?
Just noticed now that you said it. I posted a list of pgns and one has this bug.
you are right, for instance this PGN generates the problem:

e4 d5 Ke2 d4 a3 d3+ Ke1

It's related to Jeremy's customizations, I guess the portion that adds + and # chars to the game. That PGN works fine with the original pgn4web code.

Re: How to post chess games

Posted: Wed Jun 23, 2010 3:34 pm
by pgn4web
UncombedCoconut wrote:Agreed, it would be nice if it quietly displayed an error message in the chessboard's place.
I find it annoying to open several threads in background tabs and have one pop to the foreground because an alert thought it needed my attention. Sure, it needs the attention, but (IMO) from the poster and not the reader.
Had second thoughts about this and I'm heading towards a softer way to handle exceptions.
The new behavior, for instance when an incorrect move is found in the PGN game, will be:
- the error is logged
- no popup alert is automatically shown
- the chessboard is still shown (obviously up to the bogus move)
- the chessboard starts gently to signal the exception, some colors flashing in the chessboard every 10 seconds or so, not much intrusive but noticeable
- clicking on square A8 the error log can be reviewed

Same for incorrect FEN strings and for failures to read the pgn data.

A new version of the tool should be out in few days for jeremy to review.

Paolo

Re: How to post chess games

Posted: Wed Jun 23, 2010 3:38 pm
by kingliveson
pgn4web wrote:
UncombedCoconut wrote:Agreed, it would be nice if it quietly displayed an error message in the chessboard's place.
I find it annoying to open several threads in background tabs and have one pop to the foreground because an alert thought it needed my attention. Sure, it needs the attention, but (IMO) from the poster and not the reader.
Had second thoughts about this and I'm heading towards a softer way to handle exceptions.
The new behavior, for instance when an incorrect move is found in the PGN game, will be:
- the error is logged
- no popup alert is automatically shown
- the chessboard is still shown (obviously up to the bogus move)
- the chessboard starts gently to signal the exception, some colors flashing in the chessboard every 10 seconds or so, not much intrusive but noticeable
- clicking on square A8 the error log can be reviewed

Same for incorrect FEN strings and for failures to read the pgn data.

A new version of the tool should be out in few days for jeremy to review.

Paolo
Thanks, your work is very much appreciated.

Re: How to post chess games

Posted: Wed Jun 23, 2010 4:02 pm
by pgn4web
kingliveson wrote:Thanks, your work is very much appreciated.
Here you have an example of the new behaviour:
http://pgn4web-test.casaschi.net/phpbb/ ... hp?f=2&t=7

Re: How to post chess games

Posted: Wed Jun 23, 2010 6:12 pm
by Uly
pgn4web wrote:- no popup alert is automatically shown
Thank you!

Re: How to post chess games

Posted: Wed Jun 23, 2010 6:51 pm
by Jeremy Bernstein
pgn4web wrote:
kingliveson wrote:
hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.

Anyone else noticed this?
Just noticed now that you said it. I posted a list of pgns and one has this bug.
you are right, for instance this PGN generates the problem:

e4 d5 Ke2 d4 a3 d3+ Ke1

It's related to Jeremy's customizations, I guess the portion that adds + and # chars to the game. That PGN works fine with the original pgn4web code.
Crap. OK, I'm returning to the non-customized version for now -- I'm in an internet hole in Greek Chalkidiki right now, so I'll deal with this next week.

Re: How to post chess games

Posted: Wed Jun 23, 2010 11:04 pm
by Hagen
What about Shuffle Chess or Fischer Random Chess positions? I've been trying to get the code to work for this and I get errors. Any ideas on that? Fischer Random Chess is a must.

Re: How to post chess games

Posted: Thu Jun 24, 2010 8:02 pm
by pgn4web
Hagen wrote:What about Shuffle Chess or Fischer Random Chess positions? I've been trying to get the code to work for this and I get errors. Any ideas on that? Fischer Random Chess is a must.
Fischer Random, Shuffle Chess and other variants are not supported. My tool is just about classical chess and there's no plan at the moment for anything else, sorry.

What breaks with Fischer Random and other variant that only have a different starting position are the castling rules. You can start the game from an arbitrary position using the SetUp and the FEN PGN tags, but the castling O-O and O-O-O wont be properly recognized.

Re: How to post chess games

Posted: Mon Jun 28, 2010 11:52 am
by Jeremy Bernstein
Jeremy Bernstein wrote:
pgn4web wrote:
kingliveson wrote:
hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.

Anyone else noticed this?
Just noticed now that you said it. I posted a list of pgns and one has this bug.
you are right, for instance this PGN generates the problem:

e4 d5 Ke2 d4 a3 d3+ Ke1

It's related to Jeremy's customizations, I guess the portion that adds + and # chars to the game. That PGN works fine with the original pgn4web code.
Crap. OK, I'm returning to the non-customized version for now -- I'm in an internet hole in Greek Chalkidiki right now, so I'll deal with this next week.
OK, I've fixed the bug and merged in Paolo's changes for 2.0.2:
pgn4web wrote:Had second thoughts about this and I'm heading towards a softer way to handle exceptions.
The new behavior, for instance when an incorrect move is found in the PGN game, will be:
- the error is logged
- no popup alert is automatically shown
- the chessboard is still shown (obviously up to the bogus move)
- the chessboard starts gently to signal the exception, some colors flashing in the chessboard every 10 seconds or so, not much intrusive but noticeable
- clicking on square A8 the error log can be reviewed

Same for incorrect FEN strings and for failures to read the pgn data.
This is looking good for me. Please let me know if you run into any issues.

Jeremy

Re: How to post chess games

Posted: Mon Jun 28, 2010 11:55 am
by Jeremy Bernstein
There was a recent post which was throwing errors when attempting to display a board which began at move 23, white to move. If you want to post such a game excerpt, you need to do it as follows:

Code: Select all

[pgn]
[FEN "r2r2k1/5p1n/1pp1b2Q/p1p5/q3P2N/3P3P/1PP3P1/3RR1K1 w - - 0 23"]
[SetUp "1"]
23. Nf3! Qb4 24. Re3 Qxb2
25. e5 Qxc2 26. Rf1 Rxd3 27. Ne1 Rxe3 28. Nxc2 Rxe5 29. Qf4 f6 30. Qg3+ Rg5 31.
Qc7 Bxh3 32. Rf2 Rc8 33. Qxb6 Be6 34. Re2
[/pgn]
You need both the "FEN" and "SetUp" tags in order for this to work.

[FEN "r2r2k1/5p1n/1pp1b2Q/p1p5/q3P2N/3P3P/1PP3P1/3RR1K1 w - - 0 23"]
[SetUp "1"]
23. Nf3! Qb4 24. Re3 Qxb2
25. e5 Qxc2 26. Rf1 Rxd3 27. Ne1 Rxe3 28. Nxc2 Rxe5 29. Qf4 f6 30. Qg3+ Rg5 31.
Qc7 Bxh3 32. Rf2 Rc8 33. Qxb6 Be6 34. Re2

Hope this helps,
Jeremy