Check out Janggi (Korean Chess), our featured variant for December, 2024.

Enter Your Reply

The Comment You're Replying To
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.


Edit Form

Comment on the page Interactive diagrams

Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Avoid Inflammatory Comments
If you are feeling anger, keep it to yourself until you calm down. Avoid insulting, blaming, or attacking someone you are angry with. Focus criticisms on ideas rather than people, and understand that criticisms of your ideas are not personal attacks and do not justify an inflammatory response.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.