Comments/Ratings for a Single Item
It seems that this feature is not working. Whenever I try to make a move in the sample preset, GC responds by saying that the selected set does not exist.
In general, I think this was a bad idea, and if it's not working for you, I would recommend not doing it. The problem with this idea is that it defines a piece set entirely with code, but the preset needs to know how to identify pieces even when not running any code. The alternative, which I would recommend instead, is to use a piece set that includes all the piece images you want to use, then use aliases to specify the notation you want players to use for the pieces during the course of the game. The fairychess include file is set up to use aliases, and the tutorial on it describes how you should make use of them with it.
While we're at it, the Chushin Shogi and Taishin Shogi sets (as well as their corresponding set files) can be deleted from the sets.php file, as the corresponding games no longer exist.
the Chushin Shogi and Taishin Shogi sets (as well as their corresponding set files) can be deleted from the sets.php file, as the corresponding games no longer exist.
Okay, for now I have commented out these sets in sets.php. I used grep to confirm that no settings files are using any of these sets. I also used grep to check the logs, and I found three logs using chushin_shogi_mnemonic_pieces. Here is what I got:
mitsugumi_shogi/sesquipedalian-cvgameroom-2022-45-765.php:chushin_shogi_mnemonic_pieces
suzumu_shogi/arx-cvgameroom-2021-348-992.php:chushin_shogi_mnemonic_pieces
suzumu_shogi/arx-cvgameroom-2021-348-992.php:chushin_shogi_mnemonic_pieces
Easier to just use /membergraphics/MSdealerschess/. It's what I made/am making it for.
I moved your comment here, because I assumed you were responding to A. Dewitt, whose comment I also moved here. The link you provided goes to an Interactive Diagram, but this is Game Courier. Do you plan on making a Game Courier set out of the pieces in your Interactive Diagram?
The directory I cited is full of PNG images, which can be used on Game Courier. There are over 500 pairs of them right now. (The Interactive Diagram is just a demo of how the pieces move.)
As an aside, I do plan to convert most if not all of those that I created (by one means or another) to GIF for putting into the download area.
As an aside, I do plan to convert most if not all of those that I created (by one means or another) to GIF for putting into the download area.
Why would you do that? The GIF images are legacy, and should no longer be used for new projects.
The GIF images are legacy, and should no longer be used for new projects.
I did not know that. I won't worry about that, then. Never mind. :)
Why would you do that? The GIF images are legacy, and should no longer be used for new projects.
Not all GIF images have been converted to SVG. So, if you want to use certain images, GIF is still your only choice. So, he may as well make his images available as GIFs. But if he can, he should also make them available as SVG.
Not all GIF images have been converted to SVG. So, if you want to use certain images, GIF is still your only choice. So, he may as well make his images available as GIFs. But if he can, he should also make them available as SVG.
I'm not sure how well those (the SVGs) would work out. But I can give it a shot.
Update: I tried a converter, and got some very interesting-looking white-on-black impressionistic figures that would work wonderfully if that had been my intent.
Anyone else is welcome to give some PNG-to-SVG conversion a shot to do better.
Not all GIF images have been converted to SVG. So, if you want to use certain images, GIF is still your only choice. So, he may as well make his images available as GIFs.
I think this is a bad plan, because the most-used pieces exist as quality PNG in the alfaeriePNG and alfaeriePNG35 directories, and using GIF files would also use the low-quality images for those. If additional images would have to be added to any directory, it would be better to convert the GIF images for which no SVG version exists to PNG, and add those to the PNG directories. (It should be possible to do that automated in bulk.) These pieces are only very rarely used, and one or two low-quality images don't degrade the experienced quality of a large diagram in a very conspicuous way.
In time the low-quality converted GIFs could be replaced by SVG-derived high-quality PNG, when they are actually used. Diagram-Designer links or Interactive Diagrams using the PNG pieces would then automatically be upgraded to the better quality.
The problem is that there is little incentive to put any effort in creating SVG that is unlikely to be ever used. So use should come first. But when people will be automatically referred to using GIF for their diagrams when they need a rarely used image, no use case for these images as SVG/PNG will ever be created. And if they were, the existing diagrams would not benefit from it.
For the most part, the discussion is academic, at least as far as my original and modified icons are concerned; I've tried several different tools now, and the best SVGs come out blurry, blocky, or both. The only exceptions would be those made up of only horizontal and vertical lines, and out of 151 such images there are only 7 of those, 6 of which are Tifinagh letters.
To be sure, I'd love to have SVG icons for most of these pieces, especially those used in Vanguard Chess, Short Sliders, and Zwangkrieg. My ability with static arts is just too meager.
If additional images would have to be added to any directory, it would be better to convert the GIF images for which no SVG version exists to PNG, and add those to the PNG directories. (It should be possible to do that automated in bulk.)
I can testify that this is not an especially difficult thing to do, as it's what I've done for most all of the other 360+ icons I've handled -- certainly, all of those not already shown in the Play-Test Applet. If you want to copy some of the results, they're right there for the taking (and I can handle anything that's missing).
I have made a large fraction of the existing alfaerie SVGs, (Greg did the others), but I never tried to do it in an automated way. I use Inkscape on Linux, import the GIF image into it (e.g. by 'open with'), magnify it to the desired nominal size of the SVGs (2048 x 2048?), and then trace out all outlines by placing points on those from Bezier curves. You don't need many points; for a circle a hexagon would do. (But of course there is a special function for drawing circles.) After the curve is a closed loop, I select it with the 'edit points' tool. With that I grab all the sides of the polygon that should not be straight lines, to bend those. This makes tow 'handles' appear at the ends of the side, the direction of which I adjust to the tangent of the curve in the GIF, while their length is adjusted to give a smooth curve. Then I adjust the width, color, fill color and corner rounding therough the menu that appears clicking on the lower left of the bottom tools bar. (I often start with red instead of black, to see whether I cover the outlines of the GIF well.) Finally I remove the GIF, and save the lot (after grouping everything with the menu).
This is not difficult, but it is tedious for complex images. This is why I haven't done it for every GIF that exists. That it exists doesn't necessarily mean it is useful. So I convert the remaining images only 'on demand', when I am equiping articles on variants that the AI of the Interactive Diagram can handle with such Diagrams, and the original diagram in that article used an image that doesn't exist as SVG yet.
It seems that Game Courier is having trouble displaying legal moves for pieces in certain situations. Take for example this game from Seireigi:
1. p 3g-3f
1... P 7c-7d
2. n 2i-3g
2... N 8a-7c
3. n 3g-2e
3... N 7c-8e
4. n 2e-1c; +n-dest
4... N 8e-9g; +N-dest // If you click on Black's Heavenly Horse on 1c, it shows only legal mvoes to 1a, 3a, 2b, and 2d. GC should also show legal moves on 2e and 1b, but it doesn't. However, rule-enforcement-wise, there are no problems when the Heavenly Horse moves to the latter two squares.
Here is the function that is probably at fault:
def Black_Heavenly_Horse-Range merge leaps #0 1 1 array where #0 -2 -2 where #0 0 -2 where #0 2 -2 where #0 -1 2 where #0 1 2 where #0 0 -1;
Since your Black Heavenly Horse is on the side of the board, some of the where clauses will return false, but the array of coordinates to check for legal moves on should not contain any false values. To weed out the false values, you should build your array with a lambda function, probably using aggregate. So this code may work:
def Black_Heavenly_Horse-Range merge leaps #frm 1 1 aggregate lambda (where #frm #0 #1) array ((-2 -2) (0 -2) (2 -2) (-1 2) (1 2) (0 -1)) =frm;
I'll leave it to you to test it.
This might also work. It feeds your original array into aggregate to weed out any empty values. Within parentheses, #0 should just be the value of each element passed to the lambda function, not the first argument passed to the function. If it doesn't work that way, you can replace the outer #0 with a named variable, as I did above.
def Black_Heavenly_Horse-Range aggregate lambda (#0) merge leaps #0 1 1 array where #0 -2 -2 where #0 0 -2 where #0 2 -2 where #0 -1 2 where #0 1 2 where #0 0 -1;
I decided to look into why this is a problem. It's that foreach, which is used to go through the values of a -Range function in the stalemated subroutine, exits when it gets a false value. This is because the PHP next function, which the next command uses to get the next value in an array, returns false if the array has no more elements. So, I have a conditional checking whether this value is false, and if it is false, it decrements the scope, which breaks out of the loop. To allow array elements with false values, I need another way to tell whether there are any more elements in the array.
Since each() is deprecated, I used key() to tell whether it had reached the end of the array. Although the documentation said it returned false upon reaching the end of the array, tests showed that it returned null. So, I just checked whether it was empty, which should be safe, as the key will have incremented beyond 0 after calling next(). So, now the foreach command will not terminate early when reaching a false value, and your original code should now work properly.
Thanks for fixing that.
Would it be possible to create a directory at /graphics.dir for Atlantic Graphics?
Well, I don't like them very much (too many of them look like Knights, with only minute differences), and the number of unorthodox pieces is very small. But I don't think that should stop them from being available. I could not find any SVG files in the upload directory for the Atlantic Graphics page, though; it seems you put all the pieces in a single (non-SVG) image there. So there was nothing for me to copy to /graphics.dir/svg/atlantic/ .
Well, that's how most chess fonts handle such designs, I didn't like it either. The quantity is not an issue as I've designed another block of pieces, which covers pretty much all common chess variants as well as Shogi, yet I wanted to try out the original ones before moving forward.
It was impossible for me to directly upload SVG files in the page's directory and I got a message saying 'Upload of ... has been aborted, because it has an extension of: .svg ... To upload any other kind of file, it must be preapproved by an editor who will upload it for you the first time.'
That must be an oversight, as I see no reason to exclude any particular graphics format. I tried to change the file upload script to also allow svg extension, and hope I did this right. So please try again. You could also put them in a zip file and upload that; this was already amongst the allowed extensions.
I uploaded the SVG files in the page's file section, I hope now it works. The Zip file is also available there (Atlantic Graphics.zip), it was originally uploaded at the time the page was created.
Ah, I overlooked that zip file. Perhaps because the name was displayed in quotes, because of the space in it. Anyway, I copied all the svg files to /graphics.dir/svg/atlantic/ .
Thanks. I knew that the space could cause some problems, but didn't bother to change that.
25 comments displayed
Permalink to the exact comments currently displayed.
Easier to just use /membergraphics/MSdealerschess/. It's what I made/am making it for.