Check out Smess, our featured variant for February, 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
Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
Bob Greenwade wrote on Mon, Nov 20, 2023 02:49 PM UTC in reply to H. G. Muller from 08:39 AM:

I'll agree with H.G. about the lack of unorthodox pieces in this set. Expand it a bit, and I might even find a use for these!


Max Koval wrote on Mon, Nov 20, 2023 09:46 PM UTC in reply to Bob Greenwade from 02:49 PM:

Well, this set covers mostly the games that I liked, sort of.

I think now this set can be listed in sets.php .


🕸📝Fergus Duniho wrote on Tue, Nov 21, 2023 01:54 AM UTC in reply to Max Koval from Mon Nov 20 09:46 PM:

I think now this set can be listed in sets.php .

That can't happen until it has a set file in the /play/pbm/sets/ directory.


Max Koval wrote on Wed, Nov 22, 2023 05:09 AM UTC in reply to Fergus Duniho from Tue Nov 21 01:54 AM:

I think I missed something. The white pieces were not uploaded in the Atlantic Graphic's File Manager fully. I uploaded ten missing SVGs there, so, they can be added to the directory, and then I will make a set file.


🕸📝Fergus Duniho wrote on Sun, Jan 14, 2024 07:41 PM UTC:

I have added a section on creating Custom Sets. This is a new feature that does not rely on using GAME Code like the old method for creating custom sets did. So, it will work even in Edit mode, which does not run any code. It will also support multiple sets, and it will not break the ability to use other sets.


Jean-Louis Cazaux wrote on Mon, Jan 15, 2024 07:58 AM UTC:

@Fergus: I would like to have the Vao represented by an Archer instead of a Crocodile in Alfaerie for Metamachy.

I believe I can't do it myself. Could you please do it for me?


H. G. Muller wrote on Mon, Jan 15, 2024 08:35 AM UTC in reply to Fergus Duniho from Sun Jan 14 07:41 PM:

I would leave out the second paragraph, about JSON vs PHP. I don't see how that information would benefit a non-programmer user that wants to create a preset in any way, other than scare him off. The purpose is to explain how to use Game Courier, not to justify why it was designed like it is.


🕸📝Fergus Duniho wrote on Mon, Jan 15, 2024 01:36 PM UTC in reply to H. G. Muller from 08:35 AM:

Only the last sentence even mentions why JSON is being used instead of PHP. And it’s not a technical comparison of JSON vs PHP.


H. G. Muller wrote on Mon, Jan 15, 2024 02:08 PM UTC in reply to Fergus Duniho from 01:36 PM:

The fact that you mention JSON or PHP at all makes it technical. The reader couldn't care less whether GC was implemented in PHP, Javascript or COBOL. It is totally irrelevant for him. Just as whether the server uses AMD or Intel chips. To non-programmers the term JSON is just gobbledegook, not telling them anything useful, and to programmers it would likely not be telling anything new.


🕸📝Fergus Duniho wrote on Mon, Jan 15, 2024 06:18 PM UTC:

To make it easy to convert the old style of custom set, which made use of GAME Code, to the new style, which does not, I have added some code to populate the Custom Sets field with your GAME Code created custom set when you click on Run in Edit mode. All you have to do after clicking Run is to check that it looks accurate, delete your lines of GAME Code for creating a custom set, and switch your game to using the "Completely Custom set" in the Set Group called Custom.

This works appropriately only if you had a single custom set. If you had multiple custom sets for one game, then you probably know something about programming, and you can consult the documentation to figure out what to do.


Jean-Louis Cazaux wrote on Mon, Jan 15, 2024 09:24 PM UTC:

I confirm that for a guy like me, it is quite difficult to understand what is JSON, etc.

Well, I've tried to see how is going with the new Play-test Applet and the new Custom set. I've chosen Teramachy, because it is one of the least popular of my variants, to make a test.

See here: https://www.chessvariants.com/play/pbm/play.php?game%3DTeramachy%26settings%3DDefault-Alternate

  1. The graphics are NOT those I expected. For example I wanted Archers and I get Crocodiles.
  2. The Pawns which were correct on the ID, are wrong on the GC. They are moving diagonally forward even for a non-capture.

May I have your help?


H. G. Muller wrote on Mon, Jan 15, 2024 09:41 PM UTC in reply to Jean-Louis Cazaux from 09:24 PM:
  1. The graphics are NOT those I expected. For example I wanted Archers and I get Crocodiles.
  2. The Pawns which were correct on the ID, are wrong on the GC. They are moving diagonally forward even for a non-capture.

Well, (1) is caused by the fact that you have 'Set group' specified as 'Metamachy'. To use what you copied to the 'Custom set' text entry you should set that to 'Custom'. And the 'Set' then to "Completely Custom Set'. Now you are using the Metamachy set, which apparently has V for Crocodile. It just uses what you select. It doesn't help to define a custom set if you don't select it. (But Fergus advocated the definition, even of multiple custom sets, just for creating the opportunity to switch to those.)

As to (2), I am pretty sure that the Pawns will not only move diagonally forward, but also sideways and backward. Because they are in fact Princes. Note that the Prince was also represented by a Pawn image. The problem is that you defined P to stand for both Prince and Pawn. This is probably also why setting the Set Group to Custom does not work, but gives you an error message; only when you do that it starts to look at the text you posted, and will discover the double P.


Jean-Louis Cazaux wrote on Mon, Jan 15, 2024 10:51 PM UTC in reply to H. G. Muller from 09:41 PM:

Thank you. I have corrected my mistake for the Prince.

I've made those corrections for the set, but now I get that message: A Custom set cannot work unless it is described in JSON format as a super constant. And a diagram with only question marks.

I don't understand nothing there, JSON, super constant, I don't know how to fix that.


🕸📝Fergus Duniho wrote on Mon, Jan 15, 2024 11:30 PM UTC in reply to Jean-Louis Cazaux from 10:51 PM:

I've made those corrections for the set, but now I get that message: A Custom set cannot work unless it is described in JSON format as a super constant. And a diagram with only question marks.

Okay, first I updated the error message, because I abandoned the practice of calling anything a super constant. The problem is that your custom set description has an error in it. It is on this line:

"pieces: {"

It should instead be this:

"pieces": {


H. G. Muller wrote on Tue, Jan 16, 2024 06:31 AM UTC:

Oops, I misplaced one of the double quotes that had to be added, and hadn't noticed it on visual inspection. It should be fixed now.


Jean-Louis Cazaux wrote on Tue, Jan 16, 2024 06:33 AM UTC in reply to H. G. Muller from 06:31 AM:

It works fine now. Tonight I will update more GC from my side, this method is pretty efficient, thks to Fergus and HG.


🕸📝Fergus Duniho wrote on Sat, Jan 20, 2024 02:20 AM UTC:

Until now, Game Courier had no support for generating boards with square spaces using CSS. But now it does. The newly supported combination of a Square shape with the CSS rendering method will use CSS Grid to display the board. Note that CSS Grid is completely unrelated to the Custom Grid shape, as I created the Custom Grid shape before CSS Grid was ever a part of CSS. The shape here is Square, not Custom Grid, and it produces square spaces in solid colors.

Like Interactive Diagrams, it will display pieces as background-images. This allows for consistency of size in the borders that show up on spaces to indicate legal moves or past moves, as these borders belong to an image placed on each space, and now they can all be empty images of the same size instead of some being piece images.


🕸📝Fergus Duniho wrote on Mon, Jan 22, 2024 12:01 AM UTC:

While working on the CSS Square combination, I added support for the $font value, and I noticed that the Table Square combination was not supporting it. So, I gave it proper support, added a font menu to the form for customizing an ongoing game for both Table and CSS methods, and made some changes to the font selections. While leaving some support for fonts people have used, I removed unused fonts, deprecated little used fonts, and added some new fonts. The deprecated fonts are supported for backwards compatibility, but they are not featured as options. The removed or deprecated fonts included some decorative fonts and some from CD ROM collections, and the new fonts were mainly serif or sans-serif fonts from Google fonts. Some of the new fonts include Literata and Noto Sans, which are the serif and sans-serif fonts used throughout this site. Because each page loads these fonts, they should always work with the Table or CSS method even if you don't have them installed. Also, Courier will use the loaded Courier Prime font. But other fonts will not work with the Table or CSS methods unless you have them installed. In case you don't have them installed, some include some lookalikes in the font list. Notably, the Table method had been using Noto Sans by virtue of not using the chosen font. So, if you got used to that font, you may want to switch your font to Noto Sans. I also added a System-UI option, which is not a specific font. It will use the UI System font on your computer, and for GIF, JPG, and PNG boards, it will use Noto Sans, which is effectively the UI System font for this website.


🕸📝Fergus Duniho wrote on Mon, Jan 22, 2024 12:29 AM UTC:

I have changed two default values for Game Courier. The default for render is now css, and the default for font is now Noto Sans. As the loaded serif font for this site, Noto Sans is one that should always work, and its look will be the most consistent with the look of this site. While the Table method is still supported, all it was working for was the Square shape, which the CSS method now works with. Besides using a table, the Table method sticks to HTML for things, so that it still works on old browsers. But for newer browsers, the CSS method is better and more lightweight, and it avoids using deprecated HTML, such as the FONT tag.


Daniel Zacharias wrote on Mon, Feb 5, 2024 05:09 AM UTC:

Is there a simple example of a game using a piece that can move more than once on a turn?


Aurelian Florea wrote on Mon, Feb 5, 2024 07:22 AM UTC in reply to Daniel Zacharias from 05:09 AM:

Chu shogi, elven chess, atlantean ballroom shatranj.


Daniel Zacharias wrote on Mon, Feb 5, 2024 07:52 AM UTC in reply to Aurelian Florea from 07:22 AM:

Chu shogi, elven chess, atlantean ballroom shatranj

Of those three only chu shogi has rules enforced and I'm not sure I can understand out how it works with such complicated rules.


🕸📝Fergus Duniho wrote on Mon, Feb 5, 2024 02:56 PM UTC in reply to Daniel Zacharias from 05:09 AM:

Chess. When a Pawn promotes, it moves twice in a turn. The official and up-to-date version of movepiece.js that Game Courier runs handles this by recognizing that multiple legal moves for the piece begin with the same initial move. It then opens up a requester asking the player which of these multipart moves he wishes to make. It works this way so long as each Pawn promotion was previously listed as a separate multipart legal move. The same principle may be applied to other multi-movers.

Marseillais Chess, which is currently being featured, allows any piece to move twice. It does this by rewinding the move and splitting it into separate parts. So after a player has moved once, he will be given the option to move again. Unlike the first method, which treats a multipart move as a single and distinct legal move, this treats a multipart move as one legal move followed by another. Pawn promotion in Chess used to work this way on a smaller scale. Instead of rewinding a move, it would use the askpromote command to ask what to promote to.

So you have two options. One is to precalculate all possible combinations of two moves a piece may make and list each as a separate legal move. The other is to list only the first move as legal, then to handle the second part after the first part has been made. The latter works better for Marseillais Chess, because it also allows two different pieces to move on the same turn, and that could become difficult to calculate if you tried to handle each combination of two moves as a separate legal move. The former method may be better when double moves are limited to one piece.

Note that when you allow double moves for one piece, you also have to take precautions against other pieces having double moves. With the Pawn, its second move was of a different move type than its first move, and the code had to make sure other pieces were not promoting. With a piece that has two normal moves on one turn, making sure other pieces do not make a second move will be more complicated.


H. G. Muller wrote on Mon, Feb 5, 2024 04:53 PM UTC in reply to Daniel Zacharias from 05:09 AM:

I suppose that 'moves more than once per turn' always means 'can move on after capturing', as making multiple non-captures per turn is indistinguishable from moving once, directly to the final destination. Even in the case of multiple capture it is a matter of taste whether you consider it moving more than once. (E.g. does the Ultima Long Leaper make one or two moves, when it jumps over two enemies?)

If it is expressible in XBetza notation, GAME code for it can be shown by the Play-Test Applet. But ths is probably not what you want.


Daniel Zacharias wrote on Mon, Feb 5, 2024 11:11 PM UTC in reply to H. G. Muller from 04:53 PM:

I suppose that 'moves more than once per turn' always means 'can move on after capturing'

Specifically, I need the same piece type moving one or more times in a turn, so XBetza isn't enough.


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.