Check out Glinski's Hexagonal Chess, our featured variant for May, 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

LatestLater Reverse Order EarlierEarliest
Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
Daniel Zacharias wrote on Sun, Feb 18 12:48 AM UTC:

Could I get help with this?

set wbl (e3 f2);
def other cond == #0 #wbl.0 #wbl.1 cond == #0 #wbl.1 #wbl.0 0;
print fn other e3;

The result is always 0, but I would expect f2.


🕸📝Fergus Duniho wrote on Fri, Feb 9 10:32 PM UTC in reply to Daniel Zacharias from 09:49 PM:

If I change the starting position for a game, would it break existing logs for that game?

Yes, it will unless you change the name of the settings file.


Daniel Zacharias wrote on Fri, Feb 9 09:49 PM UTC:

If I change the starting position for a game, would it break existing logs for that game?


🕸📝Fergus Duniho wrote on Thu, Feb 8 08:09 PM UTC in reply to Daniel Zacharias from 07:40 PM:

When a preset doesn't work properly because of something in your code, you can add "&submit=Edit" to the query string to edit your code without running it.


Daniel Zacharias wrote on Thu, Feb 8 07:40 PM UTC in reply to Fergus Duniho from 05:12 PM:

Probably!

I have a bigger problem now. I was working on this game but if I try to open it now I just get a blank page

https://www.chessvariants.com/play/pbm/play.php?game=Overboard&settings=overboard-1


🕸📝Fergus Duniho wrote on Thu, Feb 8 05:12 PM UTC in reply to Daniel Zacharias from 08:06 AM:

Would path be what you want?


Daniel Zacharias wrote on Thu, Feb 8 08:06 AM UTC:

I want a function that returns an array of all the spaces between two inputs. I've tried this

def getrange filter lambda (== direction #start #end direction #0 #end) (b3 c3 d3 e3 f3 g3 h3) =start =end;
set yy fn getrange b3 e3 ;
print #yy;

but the output is just an empty array. what am I doing wrong?


Daniel Zacharias wrote on Tue, Feb 6 03:22 AM UTC in reply to Fergus Duniho from 03:13 AM:

Thanks, that works


🕸📝Fergus Duniho wrote on Tue, Feb 6 03:13 AM UTC in reply to Daniel Zacharias from 02:52 AM:

I made some more corrections and got it to work. Here is what your custom sets should be:

{
    "custom-alfaerie-png": {
        "dir":"/graphics.dir/alfaeriePNG/",
        "pieces": {
            "P": "wpawn.png", "p": "bpawn.png",
            "N": "wknight.png", "n": "bknight.png",
            "B": "wbishop.png", "b": "bbishop.png",
            "R": "wrook.png", "r": "brook.png",
            "Q": "wqueen.png", "q": "bqueen.png",
            "K": "wking.png", "k": "bking.png",
            "I": "wbird.png", "i": "bbird.png",
            "Z": "wzebra.png", "z": "bzebra.png",
            "Y": "wgryphon.png", "y": "bgryphon.png"
        }
    },
    "custom-greenwade-svg": {
        "pieces": {
            "P": "wpawn.svg", "p": "wpawn.svg",
            "N": "wknight.svg", "n": "wknight.svg",
            "B": "wbishop.svg", "b": "wbishop.svg",
            "R": "wrook.svg", "r": "wrook.svg",
            "Q": "wqueen.svg", "q": "wqueen.svg",
            "K": "wking.svg", "k": "wking.svg",
            "I": "wosprey.svg", "i": "wosprey.svg",
            "Z": "wzebra.svg", "z": "wzebra.svg",
            "Y": "wgriffin.svg", "y": "wgriffin.svg"
        }
    }
}

Daniel Zacharias wrote on Tue, Feb 6 02:52 AM UTC in reply to Fergus Duniho from 02:49 AM:

Still doesn't show up with "custom-greenwade-svg" but if I use "custom-greenwade" I see "custom-greenwade" in the set menu but it doesn't work to select it


🕸📝Fergus Duniho wrote on Tue, Feb 6 02:49 AM UTC in reply to Daniel Zacharias from 02:30 AM:

Try it again. I made some corrections to sets.php.


Daniel Zacharias wrote on Tue, Feb 6 02:30 AM UTC in reply to Fergus Duniho from 02:20 AM:

"custom-greenwade-svg" results in the set not showing up at all in the set menu


🕸📝Fergus Duniho wrote on Tue, Feb 6 02:20 AM UTC in reply to Daniel Zacharias from 02:16 AM:

The set name you want is "custom-greenwade-svg".


Daniel Zacharias wrote on Tue, Feb 6 02:16 AM UTC:

I'm also having trouble with custom sets. I have this

{
    "custom-alfaerie-png": {
        "dir":"/graphics.dir/alfaeriePNG/",
        "pieces": {
            "P": "wpawn.png", "p": "bpawn.png",
            "N": "wknight.png", "n": "bknight.png",
            "B": "wbishop.png", "b": "bbishop.png",
            "R": "wrook.png", "r": "brook.png",
            "Q": "wqueen.png", "q": "bqueen.png",
            "K": "wking.png", "k": "bking.png",
            "I": "wbird.png", "i": "bbird.png",
            "Z": "wzebra.png", "z": "bzebra.png",
            "Y": "wgryphon.png", "y": "bgryphon.png"
        }
    },
    "custom-greenwade": {
        "dir":"/graphics.dir/svg/Greenwade/",
        "pieces": {
            "P": "wpawn.svg", "p": "bpawn.svg",
            "N": "wknight.svg", "n": "bknight.svg",
            "B": "wbishop.svg", "b": "bbishop.svg",
            "R": "wrook.svg", "r": "brook.svg",
            "Q": "wqueen.svg", "q": "bqueen.svg",
            "K": "wking.svg", "k": "bking.svg",
            "I": "wosprey.svg", "i": "bosprey.svg",
            "Z": "wzebra.svg", "z": "bzebra.svg",
            "Y": "wgriffin.svg", "y": "bgriffin.svg"
        }
    }
}

but if I try to select Custom set of Bob Greenwade's pieces it just says The set does not exist.


Daniel Zacharias wrote on Mon, Feb 5 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.


H. G. Muller wrote on Mon, Feb 5 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.


🕸📝Fergus Duniho wrote on Mon, Feb 5 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.


Daniel Zacharias wrote on Mon, Feb 5 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.


Aurelian Florea wrote on Mon, Feb 5 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 05:09 AM UTC:

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


🕸📝Fergus Duniho wrote on Mon, Jan 22 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.


🕸📝Fergus Duniho wrote on Mon, Jan 22 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 Sat, Jan 20 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.


Jean-Louis Cazaux wrote on Tue, Jan 16 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.


H. G. Muller wrote on Tue, Jan 16 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.


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.