29 July 2011

Publishing Chess Problems on the Internet

There are many more endgame studies I'd like to present — and sooner or later I will. But this week, there is another topic I want to discuss. When you see all those diagrams, in my blog or elsewhere, you might think it would be nice to be able to go through the solution of the chess problems interactively. Believe me, I'd really love to present all these puzzles that way. But it's not as easy as it seems.

Actually, long before I wrote my first blog entry, I had spent a lot of time on pondering how the appearance should be. First of all, all diagrams should have a consistent look. That was a major constraint as I do not only want to insert orthodox chess problems. In fairy chess you may have boards of different sizes/shapes and new symbols or pieces. How to do that? So far, I only know two different ways to accomplish this task.

The first and very flexible way is to use image files for all the squares/pieces/symbols/frames. Then you do a little bit HTML coding to create a diagram. There are no restrictions for you. Well, just one ... you have to have access to the files you use. Either you can use those that others already created and share with the community or you do all by yourself and finally upload all of it somewhere on the Internet and create links to them.

I am not so excited about this approach. In case of a webspace where you host a homepage it might be okay. But, writing on blogger.com, I do not want to bother with that. Interestingly, they allow you to use a certain amount of space for images which would be even more than sufficient. Just, I don't want to put too much effort into it. By the way, I do have assembled a set of such files on my computer's hard disk by now. There are way over 300 files consuming less than half of a megabyte — and I just realize I still have forgotten some symbols, argh!

The second possibility is to create a static image for each diagram. That's what I do making use of the PHP Chess Diagrammer — a PHP script which cannot only handle the FEN but also its extension called Fairy FEN (FFEN). It serves almost all needs for publishing chess problems. Moreover, it is very easy to use and no additional stuff is required.

However, if you prefer a more sophisticated solution, I recommend typesetting your diagrams with using a special style called diagram.sty designed exactly for this purpose. But that's nothing to do properly within a few minutes nor hours. There is also a lot of software, both freeware and shareware, to create images of chess diagrams. But there are often restrictions, e.g. only 8x8 boards or only a few fairy pieces at most.

So far, I have not seen any solution that is capable of producing an interactive diagram for fairy problems. On the other hand, if you only concentrate on the "normal" chess board and pieces, I can mention quite a few good things.

There are several online game viewers you can use for free. You simply insert a pgn file or even just a pgn string and get a nice interface to replay a game. Some of them only can process complete games whereas others allow an arbitrary start position. I like the things offered on the pgn4web pages. The only flaw with respect to chess problems is that it can't step into variations, though showing all the moves in the game notation.

Another good choice is the PGN viewer by Chess Tempo. You can see it in action at Yochanan Afek's Weekly Endgame Study. It's almost perfect — unfortunately, there is also trouble with variations. You have no influence on how to format the moves, except for coloring and highlighting. At least I was not successful at figuring out how to split up variations to increase readability. There is just one long stream of moves with all the left and right parentheses as the only indicators. That's quite irritating in case of many and long variations, the more when they're nested deeply.

Finally, I want to mention the Palview package. This is definitely great stuff, I am sure you agree when browsing the examples. Just ... it is quite old software based on command line actions and not so easy to use. Also, you need webspace for all the files. But the results are fantastic.

So, you see the trouble with showing (fairy) chess problems on the Internet. Maybe, some day, someone will write a piece of software for a fairy chess problem viewer. I have a dream ...

No comments: