Check out Makruk (Thai Chess), our featured variant for March, 2025.


[ 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 LaterLatest
Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
Bob Greenwade wrote on Wed, Sep 27, 2023 12:51 AM UTC in reply to Bob Greenwade from Tue Sep 26 10:17 PM:

Update: I figured out how to make pieces available without having them in the opening setup. I was right; my brain just wasn't processing it right.


💡📝H. G. Muller wrote on Wed, Sep 27, 2023 04:37 AM UTC in reply to Bob Greenwade from 12:51 AM:

Perhaps pieces should be considered participating automatically when they were present in a morph board or the capture matrix, in addition to being in the start position. That still leaves pieces mentioned only through the promoChoice, though.

If you have multiple pieces that morph, you must assign a morph board and/or capture-matrix row to each of those.

I am thinking of some shortcut for the ofter occurring situation where an entire rank would need the same piece. As it is now placing a piece in an already occupied square would replace the old occupant. But a double click on the leftmost square (i.e. placing the same piece as what was already there) could be made to fill the entire rank. And a double click in the b-file every even squre, and in the c-file every odd square. In the capture matrix doubly clicking could place the piece in every cell to the right of it too. (There should be a way to revert cells back to empty, though; this is now not possible other than clearing the entire thing by closing and reopening the morph section.)


Bob Greenwade wrote on Wed, Sep 27, 2023 02:30 PM UTC in reply to H. G. Muller from 04:37 AM:

Would it be possible to have a check box to the right of the piece selection for pieces to keep? The box would be automatically checked (and greyed-out to prevent from being unchecked) when the piece is on the board for setup.

As for reverting a cell on the capture matrix to empty, perhaps that could be done by simply clicking on the space when the piece selected is already there? Or with a right-click? Or by putting a Hole in that spot, and then double-clicking the hole?

Tangentially, maybe the "more rules" section could also include a box to specify Royal piece(s)?

Another tangent: Is there any way to add graphics to this? Besides not seeing an antelope, bison, or buffalo, I'm surprised to see zebrabishop but not zebrarook or zebraqueen (or camelqueen, while I'm at it). There are a handful of others in Short Sliders and other games that just don't fit with any of the existing graphics.


💡📝H. G. Muller wrote on Wed, Sep 27, 2023 04:53 PM UTC in reply to Bob Greenwade from 02:30 PM:

Would it be possible to have a check box to the right of the piece selection for pieces to keep? The box would be automatically checked (and greyed-out to prevent from being unchecked) when the piece is on the board for setup.

The problem here is space. The new Applet page looks pretty wide, but that is because it has no add sidebars, like it would get if it would ever become an ordinary article in the database, rather than a separate html page. (Which of course would be a good reason to keep it as a separate page.) The table is already so wide that sometimes you need horizontal scroll, although that problem has been ameliorated now that the new definition of n on obliques has very much shortened the XBetza for the Falcon move.

Putting a single button 'starts off board', e.g. next to the Apply button, which you have to click after selecting a piece, wouldn't take up any space. The advantage of a checkbox per piece is that you can see at any time whether it is checked, though. But this could also be indicated by, say, changing the background color of the piece name in the table.

As for reverting a cell on the capture matrix to empty, perhaps that could be done by simply clicking on the space when the piece selected is already there? Or with a right-click? Or by putting a Hole in that spot, and then double-clicking the hole?

The problem is that left-clicking replaces whatever was there with the piece that is selected in the table, (or with a hole if the Create Holes button had been pressed last), and that there is no way to deselect that. And for the holes, just like the pieces, a double-click would fill the rank with those. A right-click would be possible, but would people ever discover that? Eventually I will need some additional buttons anyway, to indicate other things than a piece or a hole. E.g. check and win squares for the morph board, evaporate / explode for the capture matrix. 'Blank' could be another button in that group.

Tangentially, maybe the "more rules" section could also include a box to specify Royal piece(s)?

Good idea.

Another tangent: Is there any way to add graphics to this?

It uses the graphics that it finds in the alfaeriePNG35 directory. If any new image appears there, it will be automatically added to the piece table. E.g. the 'wolf' image I recently added is already in the table, without making any provision for it on the Applet page. So this isn't really an issue for the Applet, just that you want more pieces added to the Alfaerie set.

Also note that the Play-Test Applet is just an aid to creating HTML code for Interactive Diagrams. You don't have to leave the whole job to it, and it would be easy to edit the HTML code afterwards, e.g. to replace some of the graphics by images outside the alfaeriePNG35 directory. Even to images you uploaded yourself.


Bob Greenwade wrote on Wed, Sep 27, 2023 05:05 PM UTC in reply to H. G. Muller from 04:53 PM:

The advantage of a checkbox per piece is that you can see at any time whether it is checked, though. But this could also be indicated by, say, changing the background color of the piece name in the table.

That would work great! (Personally I'd prefer light green.)

Eventually I will need some additional buttons anyway, to indicate other things than a piece or a hole. E.g. check and win squares for the morph board, evaporate / explode for the capture matrix. 'Blank' could be another button in that group.

Yeah, that makes more sense.

You don't have to leave the whole job to it, and it would be easy to edit the HTML code afterwards, e.g. to replace some of the graphics by images outside the alfaeriePNG35 directory. Even to images you uploaded yourself.

That would be great; I didn't know I could direct some of the graphics to another directory. Is there a tutorial or guide or anything for doing that?


💡📝H. G. Muller wrote on Wed, Sep 27, 2023 05:26 PM UTC in reply to Bob Greenwade from 05:05 PM:

I suppose I never documented that; just announced it in a Comment.

But it is simple enough: if you replace the root name of the image with a string that contains a percent sign, it uses that string, with the % replaced by the color prefix, as the URL in the HTML img tag, without paying attention to the specified graphicsDir or even graphicsType (if the string already specifies a file extension). The only requirement is that the 'external' images use the same color prefixes.


Bob Greenwade wrote on Wed, Sep 27, 2023 05:45 PM UTC in reply to H. G. Muller from 05:26 PM:

Yeah, sticking that information under Pieces on the Interactive Diagrams page would be helpful. :)

Thanks. I think I can make some better-looking diagrams for both Vanguard and Short Sliders now, and possibly others as well.


Gerd Degens wrote on Fri, Sep 29, 2023 02:52 PM UTC in reply to H. G. Muller from Mon Sep 25 08:55 PM:

@H.G.: I would like to be able to play my variant 'Bull's eye' on 'GAME Courier'.

With the 'Play-test applet for chess variants' ( new one) I thought I could realize this. Maybe it works and I didn't understand it correctly. Anyway, you say:

This falls within the standard capabilities of the Interactive Diagram, so that it can be implemented without any programming. Just specify two versions of each piece, one for in the bull's eye, one for everywhere else. And then specify a morph board for each of those that makes them change into the version that belongs in the zone. The morph board for the 'eye pieces' can also be used to make the bull's eye inaccessible to them.

The ability to implement two options for each character (normal/bull's eye) I can only find in your description for 'Interactive diagrams'. In the 'Play-test applet for chess variants' I did not find this option - and only there seems to exist the ability to define the 'morph board'. To get from 'Interactive diagrams' to 'Play-test applet for chess variants', I have so far used the function 'Paste an existing diagram:'. This also works, but then I fail at the definition of the 'morph board'.

I've been witching at this point for days and can't get any further.

Have I got it all wrong, or could it be advantageous to harmonize 'Interactive diagrams' and 'Play-test applet for chess variants'?


💡📝H. G. Muller wrote on Fri, Sep 29, 2023 04:41 PM UTC in reply to Gerd Degens from 02:52 PM:

For clarity: the Play-Test Applet does not allow the user to exploit every feature of the Interactive Diagram, and the automatic GAME-code generation by it does not support every feature you can use through the Play-Test Applet. This doesn't have to be a major obstacle when you want to create HTML or GAME code for use elsewhere, as these are both texts, which can be easily modified afterwards for 'filling in the blanks'.

Now the original Play-Test Applet did not have an interface for specifying morph boards, and the GAME code that would be generated by it also knew nothing about morphing. This, however, happens to be exactly what I am working on to correct, by creating a new version of the Play-Test Applet. I modified the include file used by the Applet-generated code earlier already, for performing morphing when instructions to do this are included in the Applet-generated code. And the new Applet includes an interface for defining morphing.

Defining two versions of each piece doesn't really need a special interface, as the whole point of this is that they would be considered different pieces (so they can have different moves). If you want them to have identical images this would be a problem, though, for there only is e.g. a single Knight image in the table. So to create a Diagram that has two different Knights, one for in the bulls eye, and one for outside it, you would have to pick an alternative image for in the bulls eye. But you can always correct that afterwards, by editing the piece line in the Diagram for the bulls-eye Knight, replacing the image name (say you used a Unicorn) by 'knight'. You would of course have to assign the desired bulls-eye move to the Unicorn. The Diagram would allow you to also use the same piece ID. (It is smart enough to understand that a piece should never morph into itself, so if you specify N as the result, it would take it to mean the other N.) But Game-Courier presets would not like that a bit, for those all pieces need to have a different 'label'. So if the goal is to create GAME code, you should make sure every defined piece has a unique ID.

It is possible to change the ID even after pasting an existing Diagram into the Applet. In fact, if you paste a Diagram where the duplicats use the same image that immediately solves the problem of the duplicat images, as pasting a Diagram replaces the piece table as well as the board position. The new table would then contain two images of every kind. You would only have to give them different piece IDs. You could not specify new morph boards in that case, though, as the new piece table would not specify you hold any pieces 'in hand' that you could drop on the morph board for specifying promotions.


Bob Greenwade wrote on Sat, Sep 30, 2023 12:08 AM UTC in reply to H. G. Muller from Wed Sep 27 04:53 PM:

Eventually I will need some additional buttons anyway, to indicate other things than a piece or a hole. E.g. check and win squares for the morph board, evaporate / explode for the capture matrix. 'Blank' could be another button in that group.

AFAICT this getting done, plus a clear way to assign a morph board and/or capture matrix to a piece, would complete the improvements.


💡📝H. G. Muller wrote on Sat, Sep 30, 2023 08:04 AM UTC in reply to Bob Greenwade from 12:08 AM:

AFAICT this getting done, plus a clear way to assign a morph board and/or capture matrix to a piece, would complete the improvements.

What is not clear about the assignment? The page already mentions in three places that you have to do this by clicking on the move of the piece in the table (In the permanent help text below the table, the help text that appears when you open the morph & confine section, and the introductory text).

A row of buttons for the win and explode options could be located above the table for setting the capture matrix.

I realize that there still is a problem w.r.t. "hidden morphing". In the Interactive Diagram each piece has a fixed move, used everywhere on the board. (The exception for this is the initial moves indicated by the Betza i or ii, which are dropped as soon as the piece moves from its initial location.) So pieces with location-dependent move rules will have to be implemented as a set of different pieces, each with one of the possible moves, which then morph into the applicable type for the square they move to. I consider it a legitimate wish to represent all pieces in such a set by the same image (and possibly piece ID). E.g. represent Soldiers in Xiangqi by the same image whether they have crossed the River or not.)

The piece table of the Play-Test Applet contains each image only once, though. (And it is already very large as it is.) So setting up a position with (say) two different Knights is currently not possible. I would like to make it possible, though.

Perhaps there should be a button 'Duplicate', which would create a duplicat of the currently selected piece type in the table. It would be easiest to program if that duplicat was put that at the end of the table, but probably quite inconvenient in use. So I should probably insert it immediately behind the selected original, and then renumber all pieces on the board and in the capture matrix to correspond to the new ordering in the piece table. (This would be a royal pain in the *** to program, so perhaps I should simply require that duplicats should be created before any pieces are placed anywhere (including creation of morph boards), and disable the button after that.)

You could then change the move and possibly other properties of the duplicat. Advantage is that you could make as many versions with the same image as you like, this way.


Bob Greenwade wrote on Sat, Sep 30, 2023 03:47 PM UTC in reply to H. G. Muller from 08:04 AM:

What is not clear about the assignment? The page already mentions in three places that you have to do this by clicking on the move of the piece in the table (In the permanent help text below the table, the help text that appears when you open the morph & confine section, and the introductory text).

D'oh! Once again, I miss the painfully obvious.

A row of buttons for the win and explode options could be located above the table for setting the capture matrix.

And don't forget the "blank" button (for removing entries placed by mistake). :)

Perhaps there should be a button 'Duplicate'...

That seems a little awkward, but much better than anything I could come up with. (My best idea was allowing a space-slash-space in the move section, separating the two different moves.)


💡📝H. G. Muller wrote on Sat, Sep 30, 2023 04:29 PM UTC in reply to Bob Greenwade from 03:47 PM:

I know put in the 'Duplicate' button, and I actually think it works pretty smooth. It was important to have it always in view, though (first I had it at the top of the scrolling table, next to the 'Create holes' button). I relocated both buttons now to below the scroll window. It doesn't enforce yet that it only should be used before you placed any pieces.

I also put the row of buttons above the capture table (appearing together with it). But I still have to make those do the right thing. I still have to decide how to represent the events the buttons are for on the board and in the capture table. I could do that by coloring the squares, just as the holes colors those black. E.g. grey for vanish, yellow for explode, red for win, orange for check. Giving the buttons the the color they would distribute would make them do double duty as legend. This might not be convenient on monochrome displays, though. So perhaps I should use the highlighting markers instead.


Bob Greenwade wrote on Sat, Sep 30, 2023 06:52 PM UTC in reply to H. G. Muller from 04:29 PM:

Monochrome monitors are pretty rare these days. In fact, I don't think I've ever set my eye on one since the 1990s. So, I think your color scheme would work fine. If you're really worried about it, you could tweak the shades of the colors so monochrome displays show them in distinctive shades of grey.

Other than that, the only thing I'd say is that pieces on the board should have their moves on the table shaded green, just like the Absentees. If you think they should be differentiated, then perhaps cyan would do.

And did you make any changes to the piece selection list? A couple dozen of them seem to have vanished, including several that I was relying on for Short Sliders.


💡📝H. G. Muller wrote on Sat, Sep 30, 2023 08:32 PM UTC in reply to Bob Greenwade from 06:52 PM:

Well, e-readers do have monochrome displays, and this was originally the reason why I introduced the board markers as an alternative for back-ground-color highlighting. For the current application it seems less essential to be able to distinguish the colors, though. It would be rare that the different 'special actions' would be needed in the same variant; in fact it would already be rare that they would be used at all. And if you don't make any mistakes you would just be spreading around a special action you just selected over empty squares / table cells. And even if you did make a mistake that need overwriting you would know what you are spreading around, and where it had to go, and it would not be of interest what was there before by mistake.

As a legitimate application for overwriting I could imagine a piece that can in general not be captured, except by just one or two types, in a variant with a great many types. You could then use double-clicking to fill the entire capture row (to be used as column here) with holes, and then overwrite those for the few piece types that actually can capture by clearing the holes again.

Other than that, the only thing I'd say is that pieces on the board should have their moves on the table shaded green, just like the Absentees. If you think they should be differentiated, then perhaps cyan would do.

Yeah, this is what I was thinking too, but since placing on the board is a normal operation of the ID that is also used in playing games with piece drops (where we definitely would not want the table pieces to be marked) I didn't figure out yet how I could achieve that by code embedded in the Applet page, without modification of the general Diagram script.

And did you make any changes to the piece selection list? A couple dozen of them seem to have vanished, including several that I was relying on for Short Sliders.

I did not make any conscious changes in the table. And even if I would have deleted pieces from the table defined on the page, the initialization script there would scan the piece-image directory, and add all pieces it finds there to the table. The reason I included any piece table at all on  the page is to make sure important pieces have the appropriate move defined for them (the script would not know this for the images it adds), and to make the most commonly used pieces appear early in the table in a sensible order (rather than in the order they would have in the directory listing, which might be alphabetical).

Can you tell me which piece(s) you are missing, so that I can see if I have this problem too, and if so, what causes it?


Bob Greenwade wrote on Sat, Sep 30, 2023 11:18 PM UTC in reply to H. G. Muller from 08:32 PM:

Can you tell me which piece(s) you are missing, so that I can see if I have this problem too, and if so, what causes it?

Oddly, it's now the problem that seems to have vanished. I had been missing at least the plane, templar, wolf, and zebrabishop, to name just the ones that I wanted to use.


💡📝H. G. Muller wrote on Sun, Oct 1, 2023 05:44 AM UTC in reply to Bob Greenwade from Sat Sep 30 11:18 PM:

It might have been a network glitch. After the page gets loaded it must again connect to the CVP server to fetch the listing of the piece image directory, so it can add pieces that are still missing to the list (and delete those from the list that aren't really there). If this fetch request times out, you would not get to see any error message, but the additional pieces in the directory would not be added.


Bob Greenwade wrote on Fri, Oct 6, 2023 03:08 PM UTC:

Do the columns labeled nr serve any real purpose? If not, removing them could free up a little space.


💡📝H. G. Muller wrote on Fri, Oct 6, 2023 04:42 PM UTC in reply to Bob Greenwade from 03:08 PM:

To allow pieces to be dropped (or sometimes chosen for promotion) the number of those you have in hand should be non-zero. And if it is non-zero it will be displayed. You would only have or get pieces in hand when you need those for dropping, or as possible promotion choices, and in both cases it seems important to know how many you still have in hand.


Bob Greenwade wrote on Mon, Oct 9, 2023 08:27 PM UTC:

I poked around for a bit on the new version of the applet a bit this morning. I think this is pretty close to ready. I'd love to have things like saving a setup as a file locally and reloading it later (so I don't necessarily have to do these large, complex ones like Short Sliders in a single sitting) or being able to reorder the pieces (so that, again referencing Short Sliders, all of the starting pieces are together, then all of the first-promotion pieces, then the second-promotion), but those things can wait for some future release.


adella hardy wrote on Thu, Oct 12, 2023 09:47 PM UTC in reply to H. G. Muller from Sun Oct 1 05:44 AM:

Dear respected Mr.muller,

How to express the 4th item of a row, but non-crossable? and how about 5, 6, 7, 8, 9, items, non-crossable? Thank you very much.


Gerd Degens wrote on Sun, Oct 15, 2023 08:54 AM UTC in reply to adella hardy from Thu Oct 12 09:47 PM:

@H.G.:
When I want to use the 'Paste an existing diagram' function in your 'Play-test applet', I often get the error message 'Cannot make a diagram with 0 pieces on an 8x8 board!'. I have tried this with the interactive diagrams for my variants 'Conquer', 'Borderline', Bull's eye' and 'Avatar Chess' - always with the same result.
Is there a simple way to avoid this or does it require programming skills (which I don't have)?


💡📝H. G. Muller wrote on Sun, Oct 15, 2023 09:05 AM UTC in reply to Gerd Degens from 08:54 AM:

I typically get this when I try to copy-paste the Diagram definition from the Page Source of another page. Apparently copying from such a page is not 'clean', but puts a lot of invisible HTML tags on the clipboard as well, which might or might not be included depending on where you paste it. Apparently it is included when you paste it into a HTML context, (such as the Play-Test Applet's page), and the Diagram parser than chokes on it.

A solution I found for this is first copying the Diagram definition into NotePad, then select and copy it again from there, and finally paste it into the Play-Test Applet.

If I would know what kind of unwanted stuff comes with a copy from a Page Source, I could make the Diagram's parser ignore it. But it is not so easy to figure this out, as an attempt to directly display on a HTML page what was pasted would probably makes this extra stuff as invisible as it is on the Page Source. So I never got to doing that.


Gerd Degens wrote on Tue, Oct 17, 2023 03:16 PM UTC in reply to Gerd Degens from Sun Oct 15 08:54 AM:

@H.G.
Could you kindly help me:

I have been trying to get my variant 'Conquer' onto Game Courier for some time.

The function 'Paste an existing diagram:' in your 'Play-test applet for chess variants' can't be realized via the indirect way of 'Notepad' - thanks for the tip, would have been nice if!

I have the impression that the variant brings a slightly different speed to the already existing variants.

If I am not wrong I would be glad if you could point out the way to Game Courier. Thank you very much.


🕸Fergus Duniho wrote on Tue, Oct 17, 2023 03:34 PM UTC in reply to Gerd Degens from 03:16 PM:

The function 'Paste an existing diagram:' in your 'Play-test applet for chess variants' can't be realized via the indirect way of 'Notepad' - thanks for the tip, would have been nice if!

It's not clear what you're saying or what you're trying to do.

If I am not wrong I would be glad if you could point out the way to Game Courier. Thank you very much.

Game Courier is at this link.


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.