Check out Symmetric Chess, our featured variant for March, 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

Earlier Reverse Order Later
Spring Cleaning my pages[Subject Thread] [Add Response]
Charles Gilman wrote on Mon, Apr 11, 2016 06:50 AM UTC:
Over the past two months or so I have used the new virtual single images, and this range of images in particular, to refresh my variant pages. They have allowede me to drastically reduce multiple uses of piece images and the related confusion. Where there still is multiple use, it is generally for pieces in different geometries. All the ones that were easy have been done, and most of the ones that I had to think more about. Over this week I hope to refresh even Flipped-return Nichtschach, Bachelor Hunterbeest, Hunterbeest, and Westfield Chess.

Of course I still have a few variants that do not suit this method of array presentation, and unfortunately but perhaps inevitably they are the ones that did not suit ffen diagrams either. Therefore I am still lumbered with a few actual single images. I am still minded to get rid of Square Versus Hex and Xiangcata on those among other grounds, if no-one calls for them to be retained. I am even wondering about Kennet, as suffragan bishops are a bit of a stretch and the variant is not really that distinctive of its setting. I have however managed to strip out such images in 3 player Honeycomb, Crouching Stepper Hidden Rider, Mixed Radial hex Chess, Heathen Europe Chess, and Yoto and as far as I am concerned the redundant image files can be deleted from the site. The space freed up should make it possible to add movement diagrams to my Man and Beast articles, and I can see a case for putting piece images on the index pages now that my choice of images is so much more distinct.

Another group of pages that I have been unable to edit are, of course, the ones predating post-your-own. It would be useful if an editor could use the new system to match with later variants (e.g. Magna Carta to use a subset of the piece images in 3d Magna Carta, Pink Panther of those in 2 Jewels, Mitregi of those in Mitregi with compounds of duals). On only one page, however, is it urgent to change the array diagram as it is currently misleading. This is Bachelor Kamil, which should have the array image:


Charles Gilman wrote on Thu, Apr 14, 2016 07:52 AM UTC:
I have managed a further improvement with the new "no coordinates" feature - it has really cut down the length of some of the array diagram specifications.

Charles Gilman wrote on Fri, Apr 22, 2016 10:43 AM UTC:
<p>One idea that occurs to me might be useful would be to have a way of setting a whole swathe of text to use a given piece image set. My conception of it would be that it would be between two markers similar in principle to the a href= and /a markers.</p> <p>The code in the piece set could then be inserted in braces and be intrepreted as inserting a line break followed by the image of the piece. Even better would be to set it out as a table with one column for the images and one for the text, with each perce on one row of the table. Either way the lines</p> <p>{M}The MARSHAL moves as a Rook or Knight.{.RJ}The CANVASSER moves as a Rook or Camel.{A}The CARDINAL moves as a Bishop or Knight.{.BJ}The CALIPH moves as a Bishop or Camel.</P> <P>within such markers specifying the Alfaerie-many set would present the description of each mixed-range Ecumenical Chess preceded by the image that I use for them.</P> <P>I have no idea how practicable these ideas are, but I would be interested to know, and I wish that I had thought to suggest it before embarking on my Spring clean! </p>

🕸Fergus Duniho wrote on Fri, Apr 22, 2016 12:26 PM UTC:
The diagram designer provides you with the HTML code for all the pieces in
your diagram. All you have to do is cut and paste it. And as long as you
are sticking to a single piece set, plain HTML is the best way to go.

What you have in mind would require an extra parser on top of the HTML
parser, and I would rather you just use plain HTML.

An alterative more like what you have in mind is to use the
play.chessvariants.com/pbm/showpiece.php script I designed for use with
displaying rules within Game Courier presets. It takes two parameters,
piece and set. But it adds to the work of the server. I recommend using the
HTML code provided to you by the Diagram Designer.

Charles Gilman wrote on Mon, Apr 25, 2016 06:51 AM UTC:
Plain HTML is of course what I am already using, but it does mean adding a lot of code each time I resume displaying images after text when I am calling the same piece set each time. Putting everything in tables would add even more, which is why I have not done so despite the aesthetic advantages.

I did wonder about turning it the other way, of incorporating text into multi-piece diagram. I realise, however, that it is not just a matter of putting the text in the rank labels as this would give problems if the text ran beyond the bottom of the neighbouring cell.


Charles Gilman wrote on Mon, Apr 25, 2016 01:56 PM UTC:
Oh, and of course space is the separator for rank lables and so could not be used within them anyway!

🕸Fergus Duniho wrote on Mon, Apr 25, 2016 02:08 PM UTC:
> Plain HTML is of course what I am already using, 

Good. Keep it up, but start using the figure-enclosed direct links provided
to you within the diagram designer, and stop using the diagram designer to
generate drawdiagram.php links for displaying individual pieces.

> but it does mean adding a lot of code each time I resume displaying
images after text when I am calling the same piece set each time.

Is that somehow a problem?

> I did wonder about turning it the other way, of incorporating text into
multi-piece diagram.

That would be a very bad idea. Diagrams should be pictures, and text should
be entered as text.

Charles Gilman wrote on Thu, Apr 28, 2016 07:07 AM UTC:
Fergus Duniho asks whether it is a problem that it takes a lot of code to add a single piece image before the text describing it. The answer, after much thought, is that it seems inefficient compared to the improvement in array diagram design. As well as eliminating huge numbers of individual piece - and empty cell - images on multiplayer variants and Neutral Subject Chess (Hans Bodlaender's ffen diagrams never worked with coloured images in all my time on these pages) it offered a wide enough range of piece images to allow me to replace 23 array image files, which I have relegated to the Recycle Bin on my own computer and do not expect to ever restore. It has even inspired me to discontinue Square Versus Hex and Xiangcata pages, whose diagrams were not suited for conversion at least with the board properly joined up, allowing deletion of 7 further files ¹.

Thanks more to eliminating piece images and Ascii Art from my pages' Setup sections, these now have a uniform simplicity, making Pieces sections look untidy in comparison. It is true that my initial use of drawdiagram.php highlights the duplication, but replcing one long string of code with another doesn't really address the issue. In fact it would not increase code much to substitute a complete movement diagram for each piece in 2d variants ². Is it really impossible to devise a table with one column of images based on a single setting and one column of text - with the two lining up appropriately horizontally, of course?

True, the number of pieces is not on the same scale as the total number of cells in the array diagram. FIDE Chess has 6 as against 64, for example. It does however soon mount up. Shogi has 10 pieces, including promoted forms - and more if one distinguishes Goldgenerals resulting from different promotions. Yonin Toyang Mitregi ³ has 8 piece types that are always array ones, 2 that are array in one variant and promotee in the other, and 6 that are always promotee - 16 in all. In 3d it mounts up still further. Ladies and Generals ³, as an extrapolation of Okisaki to 3d - has 30 piece types, 17 array and 13 promotee, and showing the array piece and its promoted for run together is a significant code saving. Weltschach, as an attampt to square the FIDE back rank in composition as well as number, has 29 array pieces once differently-promotable Stockbrokers are distinguished - which they now are.

If there really isn't any way of streamlining the Pieces section, fair enough, but it would be good if someone (not necessarily the FD, but probably an editor) could design one.

¹ Once I have decided whether to discontinue Kennet, eliminating two further image files, I will issue a full list so that they can also be deleted from the CVP website.

² I would be interested to know whether other CVP participants would welcome such a change. It would make particular sense in Nimrod Chess, Hunterbeest, their Bachelor forms, and Westfield Chess.

³ Rerouting appears to have broken the traditional links to this page, but they can be found by clicking my name, "Items invented...", and the relevant initial letter.


🕸Fergus Duniho wrote on Thu, Apr 28, 2016 01:40 PM UTC:
<P>What you're asking for is an interpreter that would translate non-HTML into HTML each time the page is loaded. This would be less efficient than just having the HTML there to begin with. If taking the time to write the HTML is the problem for you, the <A HREF="/play/pbm/diagram-designer.php">Diagram Designer</A> will handle that for you. Below the section where you can copy code for inserting your diagram is a section for copying code for displaying piece images with descriptions. Instructions are provided on the page for using it.</P>

Charles Gilman wrote on Fri, Apr 29, 2016 06:41 AM UTC:
Having already rewritten most of my pages, and having discussed rewriting them again, I struggle to see how anyone could think that time is my issue! Any improvement takes longer than doing nothing. In any case, I now have enough practice writing virtual multi-cell images to cut and paste within the master document and replace the middle bit correctly than to paste the raw string of braces, tildes, and exclamation marks into the Diagram Designer. Nor only that, I can do the former entirely offline save for uploading the whole. I am currently adding movement diagrams to Man and Beast without even looking at them online. If I find errors when I do upload them the quickest way to correct them is by seeing how the page appears and changing the master document accordingly.

What I meant by inefficient was the problems that I have learned always accompany duplicate code. Over the last few years one of my major tasks at work has been refactoring and centralising tracts of duplicate code. The issues that I know of are that duplication takes up more space, is more susceptible to errors such as typos, and makes extra work if a sudden change is made. The first two I can see applying similarly to substituting another long piece of code. Single-array page will certainly use a single piece set for the array diagram, piece images, and (if any) movement diagrams, and I find it hard to imagine even a multi-array page (be it 3d or multi-subvariant) doing otherwise.

If my idea really is impossible, say so and I will live with it, but don't suggest ways of addressing an imaginary time issue by doing something even more time-consuming.


🕸Fergus Duniho wrote on Fri, Apr 29, 2016 02:43 PM UTC:
You're often unclear in expressing yourself. But now that you have
explained your concerns, they can be addressed.

> The issues that I know of are that duplication takes up more space, 

The hosting account for this website allows for unlimited storage space,
and even a few hundred text files do not take up that much space.

> is more susceptible to errors such as typos, 

If you use the code automatically generated by the Diagram Designer, that
will not be a problem. And it is easy enough to spot typos in the URLs to
images. You just have to load the page and check whether the image shows
up.

> and makes extra work if a sudden change is made.

A sudden change was made recently, and it was taken care of without
changing the image URLs. That change was to start using
play.chessvariants.com semantic URLs for user-submitted Game Courier
presets. This broke all the relative image links in these files, and it was
handled by creating a pseudo membergraphics directory in the play subdomain
with an .htaccess file redirecting to the one in the main domain.

If a change happened that did require editing the files, duplicate code
would make it easy enough to fix it with a search and replace. So, even in
that circumstance, duplicate code is not going to make that much extra
work.

> If my idea really is impossible, say so and I will live with it

Impossible is not the only reason things don't get done. I am not in
support of your idea, and I have more important things to do than work on
this.

11 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.