Check out Modern Chess, our featured variant for January, 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]
🕸📝Fergus Duniho wrote on Wed, Jun 22, 2016 05:03 PM UTC:

Block scope is too embedded into the language to extract. My only real alternative is to write a new version of GAME Code and allow developers to choose which version they will use. I'm motivated to do this, because I don't like the piecemeal design of the language. This language grew by bits and pieces from what originally wasn't even a programming language, and it contains various artifacts from earlier ways of doing things and from earlier limits of PHP. Now that the language is more mature, and I have a clearer conception of how it is used, a rewrite could be in order. But before I rewrite it, I should create specifications for what it should do. But since it is a big project, I may put it on the backburner for a while.


Jose Carrillo wrote on Sat, Oct 22, 2016 02:00 AM UTC:

Hi Fergus,

I'm trying to get an unchequered board 8x10 and 8x12, but don't seem to find one.

I attempted to use the 8x8 plain ashtapada in the preset below, but that didn't work well:

http://play.chessvariants.com/pbm/play.php?game%3DSingle+Stone+Latrunculi+XXI%26settings%3DSet9

I made a new board copying and pasting the plain astapada board:

http://www.chessvariants.com/membergraphics/MSpetteia-latrunculi-xxi/Plain-Ashtapada-8x12.jpg

Can you please upload this board to the list of boards?

Thanks.

Jose


🕸📝Fergus Duniho wrote on Tue, Nov 22, 2016 01:38 AM UTC:

Okay, it's now there.


Jose Carrillo wrote on Sat, Dec 3, 2016 02:07 PM UTC:

Thanks Fergus.

The new 8x12 Plain Ashtapada board solved my 8x12 needs, but had an expected result on my 8x10 presets:

http://play.chessvariants.com/pbm/play.php?game%3DPetteia+XXI%26settings%3DSet7

Somehow I thought the 8x12 board would have been cut down to 8x10.

Can you please also upload the 8x10 board to the list of boards?

http://www.chessvariants.com/membergraphics/MSpetteia-latrunculi-xxi/Plain-Ashtapada-8x10.jpg

Thanks.

Jose


🕸📝Fergus Duniho wrote on Sat, Dec 3, 2016 05:14 PM UTC:

Okay, I have added this. When you use an image that is larger than the area needed for the playing area, it uses the whole image and centers your playing area within the image. This allows your image to include decoration outside the playing area. For these uncheckered boards, the border around the board counts as a very minimal decoration.


Jose Carrillo wrote on Sat, Dec 3, 2016 05:33 PM UTC:

Thanks again Fergus.

>> When you use an image that is larger than the area needed for the playing area, it uses the whole image and centers your playing area within the image.

I did not know that.

It offers opportunities to create some decoration around the boards.


🕸📝Fergus Duniho wrote on Sat, Jan 7, 2017 04:27 AM UTC:

I just added documentation for regmatch and filter. The former is in the binary operators section, and the latter is in the lambda function section. I also corrected documentation for the aggregate function.


🕸📝Fergus Duniho wrote on Thu, Sep 28, 2017 11:08 PM UTC:

I fixed the script for displaying fonts, and I updated or replaced some of the fonts that were missing. Some fonts went missing when I was forced to move to a VPS earlier this year, because I kept them outside of public_html, and I neglected to keep copies of them all.


🕸📝Fergus Duniho wrote on Sat, Nov 11, 2017 04:47 PM UTC:

Noticing that the % operator was giving a division by zero error, I modified the % and mod operators in GAME Code to return the first argument when the second argument is zero. Here is my reasoning for this. x % y = x - floor(x / y) * y. Since anything times zero is zero, the value of floor(x / y) does not affect the product of floor(x / y) * y when y is zero. So, even if x/y is undefined, the final product of floor(x / y) * y should still be zero when y is zero. When this is subtracted from x, the result is x.


Aurelian Florea wrote on Sat, Nov 11, 2017 05:53 PM UTC:

@Fergus

Hello,

I did deleted the wrong logs. Could you tell me if and when will I be able to play?


Aurelian Florea wrote on Wed, Oct 31, 2018 11:06 AM UTC:

I think I had asked that before, but I don't remember where nor I remember the answer :(!

Is there a way to control from the GC program the content of the  caputred pieces box? Or the system just collects all pieces that have dissapeared. I ask that because for example in a centennial chess game I play against Anthony he has moved and reoriented his spearman and now his spearman (in straight orientation) appears captured although it is not the case :(!


🕸📝Fergus Duniho wrote on Wed, Oct 31, 2018 04:21 PM UTC:

Yes, use setsystem to set the value of capturedpieces. This is an associative array of captured pieces to display. The keys should be piece labels, and the values should be numbers of how many captured.


Aurelian Florea wrote on Wed, Oct 31, 2018 07:39 PM UTC:

Ok, thanks !


🕸📝Fergus Duniho wrote on Wed, Nov 27, 2019 04:17 PM UTC:

It looks like the documentation for copyfn had been incorrect. It had said the new name could go on the left. But like with copy, the new name goes on the right, and the name of what is being copied goes on the left. Since this is how I prefer it to work, I'm glad the mistake was in the documentation, not in the code for the command. That means I can correct the documentation without breaking any code.


Aurelian Florea wrote on Mon, Feb 24, 2020 08:13 AM UTC:

@Fergus,

Hello!

In the chess2 include file what is the sub castlepos supposed to do?


🕸📝Fergus Duniho wrote on Mon, Feb 24, 2020 05:21 PM UTC:

It is used to evaluate possible castling moves without producing error messages. If you search for it, you will find it being used in the stalemated subroutine.

 


Aurelian Florea wrote on Mon, Feb 24, 2020 05:24 PM UTC:

Fergus, thanks. I was missing it.


Aurelian Florea wrote on Tue, Mar 10, 2020 12:37 PM UTC:

Fergus,

I have 3 things I'm needy about and can't do. These are not questions as if it would only be about some sideway task I could ask you and do it myself, but things to take a look if you have the time.

1. fast castle subroutine. Fast castle means castling in any place between rook and the king with the rook moving to the king's place. A pseudocode would be:

if the king and rook have not been moved

then if the destination field is empty 

then if the king is not in check then move the king to destination, move the rook to source.

2. lyon movement code for chu shogi. Chu shogi is not that different of orthodox chess and it's implementation should be rather mundane. The only problem is the lyon. This seems to me over my current ability.

3.movement code for the joker (also, jester, fool, imitator). This piece imitates the last move of the opponent. For years I'm thinking about it, but just observing the it has to do something with the moved variable was not much from me. I need that for apothecary chess which is a mouth full anyway, so I'd really apreciate your help.


🕸📝Fergus Duniho wrote on Tue, Mar 10, 2020 06:30 PM UTC:

I was recently thinking about how to do a Chameleon piece with the new fairychess include file, though I haven't done anything yet. Here's what could work. Use a global variable to keep track of the last piece moved by the previous player. For example, put "set lastpiece $moved;" at the end of the Post-Move sections. Then define the piece like so:

def Joker fn const alias #lastpiece #0 #1;
def Joker-Range fn join const alias #lastpiece "-Range" #0;
If you're not using aliases for any pieces, you can omit the "alias" keyword. For earlier include files, the principle would be the same, but the code would be different.


🕸📝Fergus Duniho wrote on Tue, Mar 10, 2020 08:35 PM UTC:

I don't yet have a clear idea of what you mean by fast castling. Are the King and Rook just swapping places? If that's what's going on, Game Courier has a swap command that should prove useful.


🕸📝Fergus Duniho wrote on Tue, Mar 10, 2020 08:41 PM UTC:

I don't play Chu Shogi, but I'm aware that the Lion moves twice. I have programmed Marseillais Chess and Extra Move Chess, which both allow double moves more generally. These include the ability to prompt the player for a second move before completing that player's turn. While I have programmed double moves on the scale of a whole game, I have not done it for an individual piece. You might have to program the game in general to handle double moves by a single piece.

Actually, I have done this for Pawn promotions in Chess. So, you might be able to do it for the Lion more easily than I thought. You want to look into the continuemove command.


Greg Strong wrote on Wed, Mar 11, 2020 12:49 AM UTC:

"Fast castling" isn't just the King and Rook changing places - the Rook goes to the King square but the King can go anywhere in between so long as it is not attacked.  But squares in between can be attacked and need not even be empty.

This comes from Kevin Pacey's Waffle Chess.  Here is his description:

A king that has never moved, and is not in check, can 'leap' once a game, along the first rank, to any unattacked empty square between it and an unmoved rook, followed by said rook 'leaping' to the king's initial square so as to complete castling in one single move. It does not matter if any squares in between are occupied or under attack.


🕸📝Fergus Duniho wrote on Wed, Mar 11, 2020 01:25 AM UTC:

The difficulty in programming fast castling is that a King might castle by moving just one space, and that needs to be distinguished by a regular King move. When this has come up in other games that allowed the King to castle by moving one space, the solution was to give that castling move to the Rook.


Aurelian Florea wrote on Thu, Mar 12, 2020 09:51 AM UTC:

Thanks Fergus for the input and Greg for the clarification!....


H. G. Muller wrote on Fri, Mar 13, 2020 08:08 AM UTC:

Just an idea: some chess GUIs allow 'reverse' entry of moves, by first clicking the destination square, and then the piece that should go there. (Usually in combination with some 'auto-complete' mode, where the move is executed immediately if only a single piece could reach the clicked empty square, and pieces that you click move immediately if there is only one place they could go.)

If you would in general allow the origin and destination of a move to be swapped, the difference could in exceptional cases (such as fast castling) be given a special meaning. Such as the reverse order (empty square x King) would indicate the castling, and move the Rook as a side effect.


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.