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 Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order EarlierEarliest
Vanguard Chess. Game on 16x16 board, with 48 pieces per player. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝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.


🕸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 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).


💡📝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.


🕸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?


🕸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?


💡📝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 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.


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.


💡📝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 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.


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?


🕸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: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:20 PM UTC in reply to H. G. Muller from 01:22 PM:

You did flush the cache?

I did that in Firefox on my Likebook Mars, but I saw no improvement. 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.


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

screen.colorDepth

My desktop computer, my Likebook Mars, and my Kindle Scribe all report a value of 24. So, this isn't useful for distinguishing between them.


H. G. Muller wrote on Sat, Nov 18, 2023 01:22 PM UTC in reply to Fergus Duniho from 11:40 AM:
  if(screen.colorDepth <= 16) useMarkers = 2, realColor = '#E0E0E0', light = '#FFFFFF', hicol = '#808080'; // assume grey-scale display

'hicol' is what is used as background color on highlighted messages, 'realColor' and 'light' the square shades. I have not tested it on an e-ink device.

I have fixed the default extension. You did flush the cache? (If e-reader browsers have such a thing...)

 


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 01:02 PM UTC in reply to H. G. Muller from 08:46 AM:

The failed attempt to specify the graphicsType does expose the typo in the default value for this; I will fix that.

Let me know when you have. Web Developer Tools in Firefox is still telling me the images have the .pgn extension.


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 11:40 AM UTC in reply to H. G. Muller from 08:46 AM:

I'm still seeing a black bar above the board on my Likebook Mars. Tell me how you check the color depth with Javascript, and I will report back the values I get.


H. G. Muller wrote on Sat, Nov 18, 2023 10:25 AM UTC in reply to Bob Greenwade from Fri Nov 17 10:27 PM:

When the Berserkers appear on this diagram, it'll be ready to be moved into the main article. (Unless it needs to be recolored, which it very well might.)

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.


H. G. Muller wrote on Sat, Nov 18, 2023 08:46 AM UTC in reply to Fergus Duniho from 02:44 AM:

The ID already makes an attempt to recognize e-ink devices (by their color depth), for the purpose of suppressing color highlighting, and forcing the use of marker symbols instead. (Which otherwise would require useMarkers=1.) I could also make that affect the background color of messages like 'Checkmate!'. For the initial message that appears above the board the HTML setting the background is just part of the message, but it is not very critical that this should be red. I could switch it to green.

The ID accepts any string as graphicsType, and would append it to the filenames as an extension (i.e. separated by a dot) if it is not set to the empty string. Except when there is a % in the filename; then the extension (and graphicsDir prefixing) is suppressed, to allow 'guest images' of another, explicitly mentioned type.

The problem with the Diagram below is that it uses the key graphSuffix for specifying the graphics type, which is not recognized by the definition parser. (And then ignored. Perhaps I should emit a warning for unrecognized parameters, instead of the usual meaasge above the board.) The confusion probably arises from that graphSuffix is the internal name of the variable used in the JavaScript for this. The variable names do not always coincide with those of the parameters, as the idea of using the original content of the Diagrams HTML tags to define the Diagram (rather than extra JavaScript between <script> tags) evolved only later, and the variable names did not always seem optimal.

The failed attempt to specify the graphicsType does expose the typo in the default value for this; I will fix that.

[Edit] OK, I think I fixed everything, both in betza.js and betzaNew.js. The default graphicsType is now png, and the red highlighting in the text above the board is now changed to #808080 when the colorDepth of the screen is <= 16. It also displays an error message for the last non-fatal error. (Flush cache to use new version!)


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 05:19 AM UTC in reply to Fergus Duniho from 02:44 AM:

How about purple and light grey?


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 02:44 AM UTC in reply to Bob Greenwade from 01:48 AM:

Your fuschia squares are still white on my Kindle Scribe. On my eink devices, colors with a high red value do not work well. They are too dark on the Likebook Mars and too light on the Kindle Scribe. I recommend staying away from red squares unless H. G. makes them render as a medium grey on eink like I did with red pieces using showpiece.php.


💡📝Bob Greenwade wrote on Sat, Nov 18, 2023 01:48 AM UTC in reply to Fergus Duniho from 01:38 AM:

It wouldn't have rendered the Bowman, Helepolis, or Spy anyway, as those are compound images. (Or would it? I'm not sure.) Still, it's good to know that for something like Hundred Acre Chess (which doesn't use those) that's an option, or soon will be.

PS: I switched to white/fuschia. How is it now?


🕸Fergus Duniho wrote on Sat, Nov 18, 2023 01:38 AM UTC:

I am trying this code, but there is a bug preventing it from working. Instead of appending .svg to the file name, as I have instructed it to, it is appending .pgn. This is probably a typo for .png, as that is a graphics format, and .pgn is a format for storing chess games. Also, since we're able to use SVG images now, it should allow svg as a value for graphicsType or graphSuffix.

files=16 ranks=16 maxPromote=0 promoZone=1 promoChoice= holdingsType=1 graphicsDir=/play/pbm/showpiece.php?white=F9F9F9%26black=666666%26image=/graphics.dir/svg/Greenwade/ squareSize=50 graphicsType=svg lightShade=#F9F9F9 darkShade=#FF6060 whitePrefix=w blackPrefix=b royal=10 royal=21 pawn:P:fmWfcFifmR4:pawn:a3,b3,c3,d3,m3,n3,o3,p3,,a14,b14,c14,d14,m14,n14,o14,p14 morph=N knight:N:WNC:knight:b2,o2,,b15,o15 bishop:B:B:bishop:e1,l1,,e16,l16 rook:R:R:rook:a2,p2,,a15,p15 queen:Q:Q:queen:h1,,h16 princess:Pc:BN:princess:g1,,g16 chancellor:C:RN:chancellor:k1,,k16 falconer:F:FADCG:falcon:d1,m1,,d16,m16 nightrider:Nr:NN:nightrider:b1,o1,,b16,o16 prince:Pr:FN:prince:j1,,j16 soldier:Sl:fsmWfcFifmR4:soldier:e3,f3,g3,j3,k3,l3,,e14,f14,g14,j14,k14,l14 morph=H wizard:W:FafsFafsafFudFudNudC:wizard:f1,,f16 berserker:Br:KANDcaKmcabK:berserker:c2,n2,,c15 ,n15 archer:A:mF3cabN:archer:e2,f2,k2,l2,,e15,f15,k15,l15 bowman:Bo:nNafsafmpafzcabmpafzK:archer--knight:g2,j2,,g15,j15 lancer:L:N2ncDncH:lancer:d2,m2,,d15,m15 helepolis:H:RcamfRidaufmRsb(caf)14R:dabbabah--yaf:a1,p1,,a16,p16 general:Gn:BnDD:general:h2,i2,,h15,i15 sergeant:Sg:fFfW3smW:sergeantpawn:h3,i3,,h14,i14 morph=L spy:SP:W2N:questionmark--man:c1,n1,,c16,n16 king:K:K:king:i1,,i16

25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.