Check out Atomic Chess, our featured variant for November, 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 ]

Comments/Ratings for a Single Item

EarliestEarlier Reverse Order Later
Vanguard Chess. Game on 16x16 board, with 48 pieces per player. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Nov 18, 2023 02:29 PM UTC in reply to Fergus Duniho from 02:20 PM:

My desktop also gives colorDepth = 24. I recall that the 16 was inspired by the browser on my Kobo e-reader. (Which seems to have magically disappeared?!)

OK, so using colorDepth for this won't work. What alternative do we have for recognizing a monochrome display?


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 02:43 PM UTC in reply to H. G. Muller from 02:29 PM:

What alternative do we have for recognizing a monochrome display?

In showpiece.php, I am using this code:

$ua = getenv("HTTP_USER_AGENT");
$eink = preg_match("/(kindle|likebook|meebook|boox|onyx|pocketbook|inkpad)/i", $ua);

I know "kindle" and "likebook" work, and the others are just guesses based on brand and product names.


H. G. Muller wrote on Sat, Nov 18, 2023 02:53 PM UTC in reply to Fergus Duniho from 02:20 PM:

On my desktop, I clicked on Reload Skip Cache, and when I inspected the Javascript-produced HTML with Web Developer Tools, I couldn't find any IMG tags for the pieces. I changed graphSuffix to graphicsType in a preview, but it didn't change the result.

Two things that could play a role here:

  • The Diagram below also uses the wrong key for graphicsDir. So by default it uses /membergraphics/MSinteractive-diagrams/ instead of your rendering script, and there are no .svg files there.
  • The pieces in the Diagram are drawn as background. To know what is actually used as image URL, I always use the images in the piece table (rightclicking those in FireFox, and select 'inspect' from the context menu that appears).

When I corrected the graphicsDir and graphicsType keys in that comment, the pieces did show up in the table. But still not on the board. Perhaps SVG rendering is not supported for background images, in FireFox?


H. G. Muller wrote on Sat, Nov 18, 2023 02:59 PM UTC in reply to Fergus Duniho from 02:43 PM:

In showpiece.php, I am using this code:

$ua = getenv("HTTP_USER_AGENT");
$eink = preg_match("/(kindle|likebook|meebook|boox|onyx|pocketbook|inkpad)/i", $ua);

I know "kindle" and "likebook" work, and the others are just guesses based on brand and product names.

Nice, but that is server side in PHP. The client machine (from the TCP/IP request header) there apparently is stored in an environment variable before Apache invokes the PHP interpreter, so the PHP program can fetch it with getenv().

But the JavaScript is running client side, and does not have access to the server environment variables. If there was a JavaScript method for identifying the machine it runs on, that would be usable.


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 03:09 PM UTC in reply to H. G. Muller from 10:25 AM:

Well, not really, because it relies on images from an external website, which is something we want to discourage. Especially since this is a http website: most people won't be able to see those images at all, since CVP became a https site. It requires a non-default setting of the browser to see them.

Well, I'll wait until you/I/we can get the new system to behave, then.


H. G. Muller wrote on Sat, Nov 18, 2023 03:19 PM UTC in reply to H. G. Muller from 02:59 PM:

I only could find very round-about ways for determining whether a display is greyscale. Like drawing something colored in a HTML canvas element on the page, and then reading back the pixels to see if they are all grey (i.e. have R=G=B).

Getting to know which device you are running on seems to be impossible for security reasons. It is possible to get the userAgent string that the browser sends to the server in the request headers, though. Which is the thing your PHP script retrieves. Normally the computer type is not specified in that string (just OS and browser), but apparently the e-readers are an exception to this. So perhaps I can get this to work in JavaScript as well.

[Edit] I now put in the code

  var ua = navigator.userAgent;
  ua = ua.search(/(kindle|likebook|meebook|boox|onyx|pocketbook|inkpad)/i);
  if(ua >= 0) useMarkers = 2, realColor = startColor = '#E0E0E0', light = '#FFFFFF', hicol = '#808080'; // assume grey-scale display

For my desktop things still look normal. Please try what it does on the Kindle.


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 03:55 PM UTC in reply to H. G. Muller from 03:19 PM:

I tested window.navigator.userAgent, and it gave useful values on my Kindle and in Chrome on my Likebook Mars, but the value it gave in Firefox on my Likebook Mars did not mention the device by name. I cleared the cache in Chrome on my Likebook Mars, but I still saw a black bar over the board.

Please try what it does on the Kindle.

It is only the Likebook Mars that displays red as black. The Kindle displays red as white, which leaves the text legible. However, I now see the text in a grey bar on the Kindle, and I think that previously I just saw the text against the same white background as the rest of the comment.


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 06:57 PM UTC in reply to Bob Greenwade from Fri Nov 17 10:27 PM:

This ID's still having issues:

  • I don't remember what I changed to get the images to show up on the board in Hundred Acres when they were only showing up in the overview.
  • Compound graphics aren't rendering.

🕸Fergus Duniho wrote on Sat, Nov 18, 2023 07:14 PM UTC in reply to Bob Greenwade from 06:57 PM:

I made some changes to get my copy of your diagram to work. I replaced graphDir with graphicsDir, graphSuffix with graphicsType, and & with %26. Are any pieces missing from it?


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 07:23 PM UTC in reply to Bob Greenwade from 06:57 PM:

Compound graphics aren't rendering.

It looks like you are expecting to be able to combine two images into a single image. The showpiece.php script does not do this. Is this something another tool did? Why not just make the compound pieces you want as separate images?


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 07:28 PM UTC in reply to Fergus Duniho from 07:14 PM:

I got the %26 in there (the other changes were already in place), and the pieces are now on the board, except for the compounds (Bowman, Spy, and Helepolis). I'm assuming that compounds (as seen with H.G.'s fen2 program) aren't implemented with showpiece at this time.


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 07:43 PM UTC in reply to Fergus Duniho from 07:23 PM:

Why not just make the compound pieces you want as separate images?

I could do that, though part of the point of some of the images is to minimize having to do that no matter how many different ideas come up. I mentioned earlier having some outliers to add much later (like Anteater, Bharal, and Inquisitor) along with some that are mainly used in Shogi (dog, monkey, etc.), but on the whole these rely somewhat on fen2's ability to compound to make these rarer pieces.

The Spy arguably does deserve an image of its own; for now, I'll start getting some ready for this game and the others I'm trying to get loaded (including full Camel and Zebra QBRM sets, or at least some images usable for such).


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 08:14 PM UTC in reply to Bob Greenwade from 07:43 PM:

The showpiece.php script is not based on fen.cgi, and it would be a lot of work to try to duplicate its ability to edit and combine images. Maybe I could take a crack at compiling fen.cgi over here.


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 10:04 PM UTC in reply to Fergus Duniho from 08:14 PM:

OK, then. I'll whip up what I need for these four games, but anything that's actually a composite I (probably) won't include in the index when I pull it together.


14 comments displayed

EarliestEarlier Reverse Order Later

Permalink to the exact comments currently displayed.