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 by FergusDuniho

Later Reverse Order EarlierEarliest
Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sun, May 5 04:59 PM UTC in reply to H. G. Muller from 08:18 AM:

The only thing I am still in doubt about is whether the current betza.txt include file on which the PTA-generated code relies tests for a move being the final one in a safe and reliable way. Because it uses mln for the test rather than turn.

I have just added thismovenum and maxmovenum. These will return $mline[$mln]->movenum and $mline[$maxmln]->movenum. It's likely that maxmovenum will be returning the same value as movenum, which returns $movenum, but using it will add clarity to your code.


About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sun, May 5 04:34 PM UTC in reply to Daniel Zacharias from 03:38 PM:

You're using k/K for the general, but the code you copied is using g/G. So kpos and Kpos are not being updated.


🕸💡📝Fergus Duniho wrote on Sun, May 5 01:16 PM UTC in reply to Daniel Zacharias from 12:38 PM:

Your link is missing a query string.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, May 3 10:33 PM UTC:

The print color scheme now has its own small logo too. Since the big logo included 19th century black and white artwork of Chess pieces, I chose a more retro style that displays fairy pieces by changing the orientation of Chess piece images. According to a section of Anthony Dickins' A Guide to Fairy Chess, the inverted queen is the grasshopper, and the reclining bishop is the unicorn.


🕸📝Fergus Duniho wrote on Fri, May 3 10:28 PM UTC in reply to HaruN Y from 04:43 AM:

I have changed forpersonid to author in the link, and it now works.


Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, May 3 06:05 PM UTC in reply to H. G. Muller from 05:45 PM:

if == 0 $mline[$mln]->movenum:

That is mixing GAME Code with PHP. GAME Code does not support classes with properties or write out array elements with brackets, and it doesn't provide read access to $mline. But you can use the value of turn with your knowledge of which side you're concerned with to determine where you are in a game.


Glinski's Hexagonal Chess. Chess on a board made out of hexagons. (Cells: 91) (Recognized!)[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, May 3 05:43 PM UTC in reply to H. G. Muller from 05:25 PM:

I am not familiar with this technique, but a problem could be that it is not just about positioning the images, but also about translating mouse clicks to cell coordinates. (Which must also work for empty cells, for entering non-captures.) In the table version I have attached event handlers to the cells for this.

With grid, you would use a <div> tag instead of a <td> tag for each space, and you could attach event handlers to it just as easily. What I have done in Game Courier, though, is place a transparent image over each empty space, as I have attached event handlers to the piece images.


Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, May 3 05:35 PM UTC in reply to H. G. Muller from 05:20 PM:
set all == mln $maxmln;          // indicates last move

Note there is no $ there, so we might be talking about different things, and this one might be a legacy variable.

This operator just outputs the value of $mln.

I cannot image how this would work if mln was not the current move number.

It works because you are comparing mln with its maximum value. When there are comments, $maxmln will be greater than any move number, but it will be no higher than mln will eventually reach.


Glinski's Hexagonal Chess. Chess on a board made out of hexagons. (Cells: 91) (Recognized!)[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, May 3 05:20 PM UTC in reply to H. G. Muller from 08:19 AM:

The I.D. represents the board through a HTML table,

Game Courier used to use HTML tables for hexagonal boards, but I gave up on this in favor of using either CSS with a board image or drawing the board image. This reminds me that I was working on getting CSS to work with a generated board image so that you could view each position of the game without reloading the page, but I haven't completed that. I think I had two different approaches and wasn't sure which one to go with. I either wanted to change how I generated the board so that the image would be perfectly symmetrical, or I wanted to modify the code to work with the asymmetrical boards I was already generating. I lost sight of what I was doing when I got caught up with other projects.

in theory it should be possible to create a table with a masonry-like tiling, shifting each subsequent rank by half a cell.

I imagine this would be easier to do with CSS grid, because, as far as I know, table columns remain vertical.

I have tried this, though, and it works to some extent. But for reasons that I do not grasp yet it also changes the height of the ranks in a way that I could not control.

Using grid would probably help you avoid this problem too. With grid, you should be able to make one column or row diagonal, though I have not yet tried using grid with hexagonal boards. My CSS code for hexagonal boards uses absolute positioning, as grid was not yet part of CSS when I wrote the code. Anyway, absolute positioning is another alternative to using tables.


Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, May 3 04:59 PM UTC in reply to H. G. Muller from 08:55 AM:

I think the variable 'mln' gives you the current move number in the Post-Move sections.

It does not. I have made that mistake too and had to correct it. To use $mln to get the move number, you need to get $mline[$mln]->movenum. $mline is an array with a separate entry for each line of the movelist, but besides containing actual moves, it contains comments. $mln is the index that a line has in this array, but when some lines are comments, it will go out of sync with the move number.

GAME Code has turn, which will return $mline[$mln]->turn, but it doesn't currently have anything returning $mline[$mln]->movenum.


Glinski's Hexagonal Chess. Chess on a board made out of hexagons. (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, May 3 04:43 PM UTC in reply to Daniel Zacharias from 03:08 AM:

The Official Glinski Coordinates preset has CSS rendering which isn't working right for hexagonal games

The board image it was using had two separate elseif clauses dealing with it in a long series of elseif clauses in image_dimensions.php, and changes I was making to the second one had no effect. But when I noticed that it had two and combined them into one, I was able to set a value for $offy that worked for the board.


Glinski's Hexagonal Chess. Chess on a board made out of hexagons. (Cells: 91) (Recognized!)[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, May 3 02:30 AM UTC in reply to HaruN Y from Thu May 2 02:56 PM:

Is it possible to make an Interactive Diagram use a hexagonal board?


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, May 2 07:42 PM UTC in reply to Fergus Duniho from Wed May 1 09:17 PM:

I may make a logo for it with some of Tenniel's black and white illustrations from Through the Looking-Glass, though I'm open to other ideas.

I have now done that except that I cropped and divided one illustration instead of using two separate illustrations. Also, most of the small piece images I used are based on characters Alice encounters in Lewis Carroll's books.


Featured Chess Variants. Chess Variants Featured in our Page Headers.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, May 2 01:55 AM UTC:

Glinski's Hexagonal Chess is the featured variant for May, 2024.


🕸📝Fergus Duniho wrote on Wed, May 1 09:23 PM UTC in reply to Lev Grigoriev from 06:12 PM:

Hey! New month started!

Oh, right. I was focused on updating the color schemes. I should exercise now, but I'll remember to do this soon.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, May 1 09:17 PM UTC:

The color scheme code I was working on yesterday and into today is now on the site. As I mentioned before, it will now change the theme with JavaScript as long as JavaScript is enabled. This is done mainly as a backup for older browsers that do not support :has() in CSS. It uses both JavaScript and CSS to change the color scheme so that if one method fails, the other one might still work. Generally, the CSS method will fail on older browsers, and the JavaScript method will fail if someone has JavaScript disabled.

One new feature is the Print color scheme. This is a more minimalist version of the Light color scheme. I may make a logo for it with some of Tenniel's black and white illustrations from Through the Looking-Glass, though I'm open to other ideas. For now, it uses the same logos as the Light color scheme.

Internally, I have moved the color scheme CSS to colors.css, where it is better organized and more maintainable than before. First, it creates individual custom properties for each color in each color scheme. The light ones begin with --light-, the dark ones with --dark-, etc. Since it has to define each color scheme multiple times for different selectors, it defines them in terms of the individual custom properties already created. So if I decide to change a color, there is now only one place it has to be changed.

Also, this provides page authors with the ability to customize color schemes for a particular page. By adding a style section in which you add custom properties to :root, you can rewrite individual values for particular color schemes.


🕸📝Fergus Duniho wrote on Wed, May 1 12:44 AM UTC:

On the page /index-test.html, I have augmented the CSS implementation of the color schemes with a JavaScript implementation. The CSS implementation works without JavaScript, but it requires the use of :has(), which earlier browsers do not support. The JavaScript implementation is working on both my Kindle browser and on both Chrome and Edge on my iPad 2, though the latter two require you to save your change before it takes effect. I don't think there are browsers more primitive than these that still need to be supported. By providing both a CSS and a JavaScript way to change the color scheme, this expands the number of browsers it will work well on. I plan to add the code for this to the site tomorrow. In the meantime, try it out and let me know how it works for you, particularly if you have some older device I am not using.


Hannibal Chess with Manticore and Falcon. Expansion for hannibal chess. (10x9, Cells: 90) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Apr 30 03:43 PM UTC in reply to Aurelian Florea from 06:11 AM:

I could not figure out what closing tag you were mentioning.

I already fixed that bug, and it was in my code, not yours.

This ID still does not work properly!

I tested it in Safari, Edge, and Firefox this morning, and it was working in all of them, though I did have to reload the page in Firefox before the board would display.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Apr 30 01:58 AM UTC in reply to Daniel Zacharias from Mon Apr 29 09:52 PM:

When I go to any person information page and try to view unpublished submissions, it just shows my own submissions.

Okay, I corrected that.


Waffle Chess with Gryphon and Falcon. Expansion for waffle chess. (10x9, Cells: 90) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Apr 29 06:45 PM UTC in reply to Aurelian Florea from 03:59 PM:

There was a typo in implementing a new property I had added. I added the displayPieces property, which when set above zero will display the piece table when the page loads. This much worked as it should, but when it was not set, it omitted the closing > in the tag, which caused what followed it to not be displayed.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sat, Apr 27 07:50 PM UTC in reply to Jean-Louis Cazaux from 05:52 PM:

It's important to maintain backwards compatibility, and anyone who doesn't like the name of Aanca is free to use a different name with an alias.


Hectochess. 10x10 variant that can be played with 2 mismatched Chess sets.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Apr 23 06:54 PM UTC in reply to A. M. DeWitt from 06:34 PM:

For some reason, it cannot find the description even though the path to that file is correct, but I'm not really concerned about that.

It wasn't prepending ROOT to the filename. So it was actually incorrect. I have now fixed that.


🕸Fergus Duniho wrote on Tue, Apr 23 04:57 PM UTC:

I fixed the PHP script behind this page to display the description, rules, and credits for this page, but it could not find some of the expected files.


Play Chess Variants with Jocly. Missing description[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Apr 23 04:25 PM UTC in reply to H. G. Muller from 12:17 PM:

Therefore Fergus created separate HTML pages for individual variants, which embed the Jocly applet preconfigured to run the corresponding variant, with a rule description. The overview page you refer to contains links to those individual game pages.

While I used to make separate HTML pages for individual variants, I replaced this practice with a PHP script that gets called through a semantic URL whose relative part starts with "/play/jocly/". If you want to review its code to see how it works, you can find the script at "/play/jocly/control.php". It relies on certain files being in place to display the description, rules and credits. It should work with games that have not been indexed yet, and if you do use it with unindexed games, you can, as an editor, add them to the index.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Apr 23 04:10 PM UTC in reply to Lev Grigoriev from 09:04 AM:

Please remove these unneeded lines from Edit Metadata also. I’ve written new page, thank you, but when I tried to revert it to Members-only, error repeated. It shows that I’m veteran contributor with nine or more submissions, so I cannot publish more if I have nine submissions to review (even if it’s not).

While it was giving you the same error message, it wasn't due to extra code again. This time, another variable was undefined, which caused its counts of the database to return the wrong values, and the solution was to add a new line assigning its value.


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.