Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Wed, Oct 11, 2017 11:00 AM UTC:

OK, I made some progress. The pieces of the diagram are now displayed as background image, rather than as cell content. Highlighting can now be done through background color, or an image as cell content. For the board checkering, holes in the board, and from-square/to-square highlights it will always use color. But for the move-target highlights I now made marker images with the names of the color that otherwise is used for highlighting this type of move, like "markerFFC000.png". These will then be displayed on top of the piece images.

A few issues remain:

1) The marker images are now taken from the same directory as the piece graphics. This obviously makes it necessary to put copies of them with each piece set, which is annoying. But has the advantage they can be tailored to the piece set, e.g. to the match the size well. I guess the script could be made smart enough to take them from dedicated directories, switching between them depending on the defined square size.

2) The background images are positioned differently in the cells than the content images. The latter had margins, and to prevent board raks from expanding when you moved a piece to an empty rank, the square size had to be chosen a few pixels larger than the actual piece images (e.g. 53x53 for Alfaerie, which has 50x50 gif images). The background image always starts in the upper-left corner, and the cell is then tiled with as many copies of the image as are needed to cover it completely. This means that a few pixels eear the upper and left edge get repeated near the right and bottom edge. Some pieces are so big that they have visible parts this close to the edge, and then you get ugly artifacts rear the latter edges. This can be prevented by defiing the square size exactly equal to the image size (and perhaps make the marker images a bit smaller, and center those, to prevent their margins would cause cells to expand). But all existing images do not have that.

3) On a color display I like highlighting with background colors better. (I think it is more visible. But perhaps this is because I am now used to this.) With grey scales the colors are a disaster, though. So I am probably going to force marker highlighting automatically on displays with a colorDepth <= 16. For other displays it is now subject to a new diagram parameter useMarkers=1. I set this parameter for now in the two most-recently posted diagrama, the comments to the "Betza notation" and "Wildebeest Chess" articles, so people can judge them. For now useMarkers=1 can only be used with the xboard33 piece set (graphicsDir=/membergraphics/MSelven-chess/), as this is the only place where I uploaded marker images so far.

Please let me know if the new rendering method gives any problems on other browsers, and what you think of the current set of markers on color or grey-scale displays.