Check out Grant Acedrex, our featured variant for April, 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

LatestLater Reverse Order EarlierEarliest
Zillions of Games. It can play an endless variety of abstract board games, and we have a large collection of Chess variants you can play on it.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Oct 17, 2021 01:49 AM UTC in reply to Robert Mate from Sat Oct 16 10:08 AM:

Guess I could try emulating windows 95

I don't think that will help. I think you just need to coordinate with another person who is willing to play against you at a certain time.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Oct 16, 2021 12:55 AM UTC in reply to A. M. DeWitt from Fri Oct 15 10:43 PM:

The Edit Comment scripts aren't working properly. Whenever I try to edit a comment it fails. Posting comments still works though.

Until I'm feeling better, I have simply reverted this to Sunday's version. I have been having fever symptoms. I had chills last night, and now I'm feeling too warm. I will continue debugging code when I'm feeling better.


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 Thu, Oct 14, 2021 12:22 PM UTC in reply to A. M. DeWitt from 04:06 AM:

If something similar could be used to detect the type of piece affected by the suicide, that should be everything I need to enforce the burning rules using suicides, at least in theory.

That information is in #pfore. Just use the coordinates of the spaces with missing pieces as keys to this array.


🕸📝Fergus Duniho wrote on Mon, Oct 11, 2021 06:48 PM UTC:

I realized the role that $width and $height play in centering the borders for highlighting spaces, and with that in mind, I simplified the code in draw_grid_png.php and made adjustments to the $width and $height of Shogi pieces and to the values of $offx and $offy in image_dimensions.php. By using proper values for $width and $height, the code will always apply CSS for margins and padding to the space class rather than to each element of the space class.

I didn't immediately recognize the importance of $width and $height, because I created these variables years before I ever added the ability to display legal moves by highlighting spaces. These variables describe the width and height of spaces, and they are used when automatically generating a board to know what dimensions to give to spaces. But sometimes an image of a board is used instead, and when it is used, $width and $height should match the size of the spaces on the image.

This is what I was neglecting to do. The highlighting in Shogi was a bit off, because the value of $height did not match the height of the spaces on the images of Shogi boards.

Since Shogi divides each space by lines, there are two choices on how to specify the dimensions of a space. One is to use the inner space between the lines, and the other is to extend the size to include the lines. I tried both and chose the latter for Shogi.

For automatically-generated boards, the centering of borders for highlighting should now be done automatically. But for boards provided as pre-drawn images, it's important to match them up with the correct values for $width and $height. One way would be to size the board with spaces the same size as the dimensions given for the piece sets to be used with it. Abstract and Alfaerie sets both normally use 50x50 spaces. Another way would be to provide correct values for your board. I could add these to the image_dimensions.php script for specific boards.


🕸📝Fergus Duniho wrote on Sun, Oct 10, 2021 11:15 PM UTC in reply to A. M. DeWitt from Sat Oct 9 01:23 AM:

Another possibility for detecting a suicide move is to store the board position before the move into a variable, then compare the new position after the move to the stored position and see what differences there are.

This could potentially solve the problems of detecting a suicide move if I knew how to do it.

Here's a preset I made to demonstrate how to do this:

https://www.chessvariants.com/play/pbm/play.php?game%3DChess%26settings%3Dspotcaptures

This records the position of every piece on the board in an array whose keys are coordinates and whose values are piece labels. It does this both before and after a move. It then goes through the current positions of pieces. For each empty space, represented with the @ piece, it compares it with the previous value to see if it was empty before. If it wasn't empty before, it records it as a capture.

Since I am already writing this, would the system used for the multi-move variants be able to handle moves with three or more parts (i.e. that of the Lion Dog in Maka Dai Dai Shogi)?

You could adapt it. For the multi-move variants, there are usually the same number of move parts each turn. So, it makes sense for these games to do the multi-part analysis globally for all pieces. But for games that include pieces with multi-part moves, you may want to reserve the multi-part analysis for specific pieces and tailor it to each piece that needs it.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sun, Oct 10, 2021 02:15 AM UTC:

I've been working on this more today. Thanks to having a development server, I've been able to make extensive changes without regularly introducing bugs into the scripts people were using to play games. I realized that I could use margins to position the highlighting, and I moved as much of the CSS as I could from each IMG's STYLE element to some STYLE tags. This reduced the HTML code and the filesize of the page. I also added some code that is more adaptive to grids with unusual geometries, though I didn't test it on anything more unusual than Shogi. I made the highlighting of the last move made always the same color as the other highlighting, and I increased the border size for the piece that last moved to 5px, which fits the space better. As mentioned before, I'm now using circular borders to highlight hexagonal spaces. I slightly reduced the size of borders highlighting empty spaces from the size I made them yesterday, because it looks better that way, though I kept them larger than they used to be.


🕸💡📝Fergus Duniho wrote on Sat, Oct 9, 2021 02:13 AM UTC in reply to A. M. DeWitt from Fri Oct 8 01:01 AM:

What I meant to say was the the highlights for empty squares are slightly off center.

I've been working on that today, and I just copied over the changes I made. The highlight area is now larger. It had been small to fit on hexagonal spaces. Instead of using the same CSS for square and hexagonal spaces, I made the highlight area for hexagonal spaces round and increased its size. I'll see if anything more needs to be done tomorrow.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 09:12 PM UTC in reply to A. M. DeWitt from 06:49 PM:

Pieces are normally centered, but if you have odd-sized pieces on an even-sized space, or vice versa, 100% alignment may not be possible. Also, centering works best for pieces with nothing beyond the image of the piece itself. Some piece sets, such as Alfaerie, make all piece images a fixed size by adding extra space around most images. If the image of the piece is not properly centered in an image with extra space on the sides, it will not look properly centered on the board.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 06:05 PM UTC:

I added max-length: 100% !important to the STYLE field for the board image, and this fixed the problem. The squares for highlighting pieces and legal moves now align correctly.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 05:52 PM UTC:

Checking a screenshot of a Rook's legal moves in Chess in a graphics program, the squares for legal moves were at the right pixel locations, but the board was smaller than it should be. The image was 427x431. For comparison, I loaded the image by itself, took another screenshot, and checked its size. This time, it was 436x440. So, the browser is shrinking the image to fit the space, and after the browser has shrunk it, the precalculated positions for the empty images do not align with it. Therefore, I have to prevent the browser from shrinking the image.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 05:23 PM UTC:

While the right-shifting was more readily apparent, I also checked for vertical shifting by creating a position where a Rook covered a whole file. What I found is that there is also downward-shifting. No matter whether the board is rotated for Black, the empty gifs in the lower right are closer to the lower right corner than empty gifs in spaces more to the left or top. This is consistent with right and down being the two directions that increase as the x or y position of the image increases, since 0,0 is in the top left corner.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 02:16 AM UTC:

So far, I can't tell what the problem is. It affects both Square and Grid boards. I have been testing Chess, and the numbers look right when I examine the generated source code. Each square is 50x50, and after file a, each empty image for displaying a legal move has a left position that is 50 pixels greater than that for the file to its left. The a file starts at 16 pixels left, and each empty image for an empty space on that file starts at 23 pixels left. The h file starts at 366, and each empty image for an empty space on that file starts at 373. In each case, the difference is 7. Also, 373-23 and 366-16 are both 350, which is the expected value when each square is 50x50. With all these values being correct and equivalent, it remains a mystery why the empty image shifts slightly to the right with each file from left to right.


🕸💡📝Fergus Duniho wrote on Wed, Oct 6, 2021 05:44 PM UTC in reply to Fergus Duniho from 01:55 AM:

As I've been editing code to not show warnings in the PHP error log, I have made lots of edits to draw_grid_png.php. I'll have to take a look at it and see what's causing this.

It does not appear to be caused by any recent edits to draw_grid_png.php. I temporarily reverted to an earlier version, and the problem remained.


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, Oct 6, 2021 04:52 PM UTC in reply to A. M. DeWitt from 02:17 PM:

Is there a way to detect suicide moves in GAME code?

There are two ways of doing a suicide, and these have different effects on the $old variable. Adding an @ to a space works like a promotion, which leaves the value of $old unaffected. Moving a piece nowhere gives $old an empty value. This may give a better indication that the move included a suicide, but it would come at the expense of the information about where the piece moved to.

Since it sounds like your Fire Demon piece is making a multi-part move, you may want to break down the whole move and analyze it step-by-step. You will find examples of this in multi-move variants like Marseillais Chess and Extra Move Chess.

With that in mind, another option would be to move the Fire Demon to the piece's space, then immediately move it back.

Another possibility for detecting a suicide move is to store the board position before the move into a variable, then compare the new position after the move to the stored position and see what differences there are.


Gods on Pluto ZIP file. Plays with extremely weak pieces, no pawns, and drops.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 01:28 PM UTC in reply to Christine Bagley-Jones from 12:19 PM:

The problem is that there is no file to download. As the author of this page, it is up to you to fix this. Please upload it with the file manager in the same way you have uploaded images. There is a link to the file manager in the Edit menu.


Changes to PHP Code[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 02:06 AM UTC:

One more reason for no longer supporting offline pages is that many pages now include script-generated images with the drawdiagram.php script. These will work on a website running PHP, but they will not work offline. If I wanted offline pages to support them, I would have to write a script that finds each link to a script-generated image, creates a copy of the image with a unique name, and replaces the link to the script-generated image with a link to the copy of its output. That's too much work for something no one probably needs anyway, and archive.org can already make copies of them.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Wed, Oct 6, 2021 01:55 AM UTC in reply to A. M. DeWitt from 01:30 AM:

I noticed that in one of your games yesterday, and when you mentioned it, I thought perhaps it was because there were no adjustments for your boards in the image_dimensions.php script. But I just tested Shogi and Xiangqi, and I am seeing the same thing. As I've been editing code to not show warnings in the PHP error log, I have made lots of edits to draw_grid_png.php. I'll have to take a look at it and see what's causing this.


Chess Variants Query. More options for searching in these pages.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 01:45 AM UTC in reply to Ben Reiniger from Tue Oct 5 10:08 PM:

I have been working on replacing absolute URLs with relative URLs. But I had mainly been looking for chessvariants.com URLs. I guess I'll have to look for chessvariants.org URLs too.


Changes to PHP Code[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 01:42 AM UTC in reply to Ben Reiniger from Tue Oct 5 09:59 PM:

I did occasionally use the "info" page, previously linked to from the icon of an index entry. But I do not consider this worth keeping either. Those pages can still be reached from the "info" link in the footer of the item's actual page (except perhaps for multi-item pages?).

That's why I figured it would be okay to get rid of the link from the icon. The link in the footer had been the only link to the info page I had been aware of, and I figured it would be enough for anyone who wants to go to that page. I think most people would be unaware that the icon links to an info page or would just be interested in the link to the actual page rather than the link to a page with metadata about it. The index page really gave no indication that the icons linked to something different than the actual page, and most people who clicked on an icon would probably be surprised that it didn't go to the actual page.


🕸Fergus Duniho wrote on Tue, Oct 5, 2021 08:58 PM UTC:

Since I can now work on code on the development server, I took the time to remove the remaining code for creating offline pages. While David used to make offline versions of the website, I have never done that. For one thing, I wasn't familiar with how he went about it. But I also didn't see the use for it. Things have changed since David wrote the code for this. Back when we got on the internet with 2400 baud modems that used the phone line, it would have been convenient to have an offline version of the site. But now that broadband and WIFI-enabled mobile devices are both common, it is easy enough to connect directly to the website. When the site is down, as it was recently, archived copies of pages can be found at archive.org. So, an offline copy is not needed for archival purposes. Additionally, the website has grown more interactive than it used to be. While it was originally a set of static HTML pages, it now includes comments, database-generated pages that may be revised on the website, and ongoing games. Finally, when I program code, I write it simply for a website, and I do not want to have to take care to build in support for generating offline pages.

Besides code that was run with the condition $foroffline or $offlineindex, I replaced every instance of echoandwrite with echo, and I removed the function definitions for echoandwrite and echoorwrite. The latter wasn't even being used anyway.

Removing some of the $foroffline code created a bug, and this happened to draw my attention to the icons that appear to the left of links. I had thought of these as slightly informative decoration, but they included links to information pages and included a bunch of ALT text telling some things about the item linked. I got rid of the links to the information pages, changed the ALT text to TITLE text, and reduced the provided information to just telling what the icon meant. With this done, I was able to remove the remaining $foroffline code in make_author_line, and I also removed the $foralttext option from it. There was really no need to include author information in the ALT text for the icon when it was already on the screen anyway. Removing the little-used links to info pages and reducing the information provided by what is now a tooltip should reduce page size and make index pages quicker to load. With that in mind, I may look into extending how many links may appear on an index page.


MPsuzumu-shogi[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Oct 5, 2021 02:23 AM UTC in reply to Daniel Zacharias from Mon Oct 4 09:06 PM:

The problem was that the board was too large to rotate 180 degrees. When I switched the shape from Grid to Square, it worked. To make it work for the provided background images, I replaced imagerotate() with imageflip(), which could get the same effect as rotating by 180 degrees by simply mirroring the image across both dimensions. Because this used fewer resources, it could handle the images provided for this game.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Oct 5, 2021 01:19 AM UTC in reply to A. M. DeWitt from Mon Oct 4 08:53 PM:

Okay, I deleted them and the database entries for them too.


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 Mon, Oct 4, 2021 08:41 PM UTC in reply to Jean-Louis Cazaux from 07:12 PM:

There was a syntax error in one line. It's now corrected.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Mon, Oct 4, 2021 01:32 PM UTC in reply to Aurelian Florea from 09:28 AM:

This is now fixed. In one line of the rays operator, I was using !empty() instead of isset(), and that's what introduced the bug that affected the operation of rays from some spaces.


🕸📝Fergus Duniho wrote on Mon, Oct 4, 2021 01:02 PM UTC in reply to Aurelian Florea from 09:28 AM:

Thanks for reporting this. Although I'm doing most of the development over on the other server, I do copy over changes toward the end of the day after they seem to be working, and then it's Europeans who are the first to encounter any bugs I may have introduced into the code, because they start the day earlier than I do.

The bug here is preventing the Rook's legal moves from being displayed, but it does not seem to be preventing you from manually typing in the move and making it. I will now look into this and try to fix it.


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, Oct 3, 2021 01:23 PM UTC in reply to Daniel Zacharias from 04:42 AM:

I was looking for a global way to eliminate some PHP warnings, but that requirement proved to be too restrictive. So, I have removed it.

I then tried requiring minimal argument counts instead, but even that caused problems for unary, binary, and mixed unary/binary operators. But since they seemed to work with operators requiring 3 or more arguments, I left those minimal argument count requirements in.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, Oct 1, 2021 06:25 PM UTC in reply to A. M. DeWitt from Thu Sep 30 04:41 PM:

After thinking about it, I decided to cancel the renaming of Futashikana Shogi. Please delete both presets for Dai Shosu Shogi.

It looks like someone has taken care of this.


🕸📝Fergus Duniho wrote on Thu, Sep 30, 2021 04:28 PM UTC in reply to A. M. DeWitt from Wed Sep 29 02:54 PM:

I decided to rename Futashikana Shogi to Dai Shosu Shogi.

While it has apparently been done, or is in the process of being done, I would like to advise against renaming in general. When you release a game, it takes on a life of its own that may extend outside of this site. While I was working on the taginfo.php script today, I was testing it with the Ai Ai tag, and one line on the page was displaying as empty. When I tracked down what was causing this, it was the ItemID for Futashikana Shogi. Apparently, someone has programmed Futashikana Shogi for Ai Ai, where it remains known by that name and not by the name Dai Shosu Shogi.

Additionally, the name has been changed without updating the RelocatedPages table. This table should have a row added to it for each page whose URL and ItemID both change. It may be done by editing the table in PHPMyAdmin, which the main editors have the URL, userid and password for.

When the page gets rewritten, it should mention the original name and why the name was changed.


Yangsi. A very playable chess variant with 12 different pieces on a 10x10 board.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Sep 30, 2021 12:11 PM UTC in reply to A. M. DeWitt from 02:35 AM:

See the Ai Ai tag at the bottom of the page.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, Sep 29, 2021 09:22 PM UTC in reply to Ben Reiniger from 04:52 PM:

I'm open to feedback on how best to manage this sort of thing. One possibility is to create a new Item with the new name, we can move over the references in the database I've mentioned, and leave the old page with just a link forwarding to the new page (possibly even an automatic redirect, though I'm not sure if that'd work in a member submission view script).

The database has a RelocatedPages table. Just add an entry that includes its old URL and its new ItemID, and the 404 script will take care of the details.


Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Mon, Sep 27, 2021 09:06 PM UTC:

I now have a script set up that runs from the backup server to make daily backups of both the /home/chessvariants/public_html/ directory and the chessvariants database every midnight at Eastern Standard Time. The script looks like this, but with the actual database password. It doesn't need the server password, because it is using an SSH key pair to connect.

#1/bin/bash
mv /root/chessvariants.sql /root/chessvariant-backup.sql
ssh [email protected] mysqldump --opt --user=root --password=XXXXXX chessvariants > /root/chessvariants.sql
/usr/bin/rsync -ae ssh --delete [email protected]:/home/chessvariants/public_html/ /home/chessvariants/public_html/
touch /home/chessvariants/public_html/
mysql --password=XXXXXX chessvariants < /root/chessvariants.sql

Pandemonium (Surajang修羅場). Capablanca chess + Crazyhouse.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Sep 27, 2021 08:55 PM UTC in reply to Ben Reiniger from 08:39 PM:

Okay, I closed the A tags, and now the text is no longer red in regular mode, and it's no longer blue in Reader mode.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 05:35 PM UTC in reply to Daphne Snowmoon from 01:46 PM:

I fixed the problem by no longer enclosing each section in SECTION tags.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 01:52 PM UTC in reply to Daphne Snowmoon from 01:46 PM:

It might be. It looks like Safari's Reader mode makes inappropriate decisions about what to exclude. In another page I looked at, it showed the Pieces section but skipped the Rules section. My advice would be to not use its Reader mode on this site. It should be unnecessary anyway, since mobile pages here leave out sidebar ads.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 01:42 PM UTC in reply to Daphne Snowmoon from 06:33 AM:

On my iPad, Safari's Reader mode is skipping the whole Pieces section. Without Reader mode, things look fine in both Safari and Chrome. I also tried Firefox's Reader mode on my Likebook Mars. It did not skip the Pieces section, though it did mess up your ASCII diagram.


🕸Fergus Duniho wrote on Sun, Sep 26, 2021 08:29 PM UTC in reply to Daphne Snowmoon from 10:01 AM:

Try using only alphanumeric and punctuation characters found in ASCII in your file names. Korean letters may not be recognized by all software.


Comemnt search doesnt work[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sun, Sep 26, 2021 05:56 PM UTC in reply to Bn Em from Sat Sep 25 11:00 AM:

Are there any plans to restore this functionality?

I tried to yesterday and failed. I have not been able to get MariaDB 10 to work reliably on either server, HostSlayer or RackNerd. It used to work before I tried updating the HostSlayer VPS to Rocky Linux via updating to CentOS 8 first. So, maybe there is some setting that has to be corrected. For now, chessvariants.com runs on HostSlayer with CentOS 7, PHP 7, and MariaDB 5.5, while chessvariants.org runs on RackNerd with Rocky Linux 8, PHP 8, and MariaDB 10. Until I can get things working correctly on the new RackNerd VPS, I will continue to use MariaDB 5.5, and comment searching will remain disabled.


🕸Fergus Duniho wrote on Sun, Sep 26, 2021 01:25 AM UTC:

There appears to be some kind of corruption from the MariaDB 10 installation that is preventing a reinstallation of MariaDB 5.5 from working. When I check its status after reinstalling version 5.5, it says "Failed to start MariaDB 10.6.4 database server." I expect I will have to reinstall CentOS, but I don't want to get it started right now, because it is late. Unfortunately, the new VPS also seems to be having issues with MariaDB 10. It frequently loses connection with the MySQL server, and I have to refresh a page a few times before it connects.


🕸Fergus Duniho wrote on Sun, Sep 26, 2021 12:58 AM UTC:

Since I haven't gotten MariaDB to work on the original server, I switched the domains of the servers. However, there are still things to fix, and I still have to deal with the original server.


🕸Fergus Duniho wrote on Sat, Sep 25, 2021 06:37 PM UTC:

My attempt to update chessvariants.com to MariaDB 10 has not been successful, and I have been unable to revert to MariaDB 5.5 without errors. So, chessvariants.com is currently without a working database. At least I made a backup and copied it to chessvariants.org. If the problem on chessvariants.com continues, I might not continue with HostSlayer. As long as I have things backed up on RackNerd, I may try reinstalling the OS on HostSlayer. But for now, I have floaters in my eyes, and I need to have lunch.


Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 01:05 PM UTC in reply to Fergus Duniho from 02:50 AM:

The touch command was used on the new server's /home/chessvariants/public_html/ directory at 12:00:14 AM EST. So, the automated daily backup worked when it was expected to. I'll look into including a backup of the database into the same script today. But since there are some different files in the folders for the database on each server, I want to fix that by making them both use the same version of MariaDB.


Comemnt search doesnt work[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 12:33 PM UTC in reply to Bn Em from 11:00 AM:

It depends on a feature of MariaDB 10, but when I restored the server earlier this year, MariaDB 10 was frequently losing the connection to the database, and MariaDB 5 proved more reliable. So, I switched to MariaDB 5 and manually removed the details that required 10. On the new server, I have installed Rocky Linux 8, PHP 8, and MariaDB 10. Since it also has reverse DNS, which should make email more likely to be delivered, I have plans to make it the main server when everything is working correctly on it. For now, I have to update scripts to work with PHP 8. The new server has less storage space, but it has more than enough for the site. It has less RAM, but this server usually doesn't use even half the available RAM. Both sites have 4 cores, and the new VPS uses faster CPUs. Although the new server is on chessvariants.org, it will not support comment search until I add support for this back into the database. To start with, I will look into updating to MariaDB 10 on this server.


Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 02:50 AM UTC:

I have set up some cron jobs to do backups with rsync. On this server, rsync will create hourly, daily, weekly, monthly, and annual backups. These are in case it's important to revert a change to a script or page. Editors with access to the server can find these in /home/chessvariants/backups/.

The new server has a cron job to make a daily backup of the public_html directory on this server. I set up an SSH key pair to allow it to do this without a password. This will copy the /public_html/ for chessvariants.com to that for chessvariants.org. This is expected to happen at midnight EST. To be sure of what time it does it, I'll check the timestamp on the /public_html/ directory tomorrow, since I also made the script use the touch command on it when it is done updating. I still have not added commands for backing up the database. It will be important to do both together to keep their backups in sync.


@ Fergus Duniho[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Sep 24, 2021 06:46 PM UTC:

Testing whether posting here meets same error as posting on new server.


Apothecary Chess Tournament[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, Sep 23, 2021 05:39 PM UTC in reply to Aurelian Florea from 10:03 AM:

I made a test copy of one of these games, and I successfully moved in it. If Oisin had around two days left, that's consistent with him having less than a day now, because the site has been back online for a few days already. Tell him to move before his time runs out.


McCooey's Hexagonal Chess. Chess on a board, made out of hexes. (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, Sep 23, 2021 02:45 PM UTC in reply to Kevin Pacey from 02:25 AM:

My opponent sent an email to me saying he cannot move in the following log:

https://www.chessvariants.com/play/pbm/play.php?game=McCooey%27s+Hexagonal+Chess&log=panther-tim_olena-2021-204-636

He's in check and has few legal moves. Also, the ASCII diagram he is using will not display legal moves or allow moving with the mouse. I was able to get as far as previewing a move after changing the rendering method. Not being him, I couldn't go any further.

UPDATE: Upon further testing, I found no problem with being able to move. I created a test log that just changed userids, and I successfully moved. Since the log had no time controls, the time the site spent offline had no effect on anything.


Apothecary Chess Tournament[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, Sep 23, 2021 02:39 PM UTC in reply to Aurelian Florea from 10:03 AM:

I still see time on the clocks, and I already gave additional time to all interrupted timed games. I'll do some testing later if he still hasn't moved.


Server crash[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Sep 22, 2021 09:45 PM UTC:

I have made additional changes to the following scripts on both servers:

  • footer.php
  • index/database-funcs.php
  • index/drawemail.php
  • index/editcomment.php
  • index/listcomments.php
  • index/login-funcs.php
  • index/randgame.php
  • play/pbm/drawdiagram.php
  • play/pbm/logs.php
  • play/pbm/play.php

🕸Fergus Duniho wrote on Wed, Sep 22, 2021 06:35 PM UTC:

The new server is running PHP 8. So, I have updated some scripts over there to work with PHP 8, and I have copied the updated versions to the main server. These include the following:

  • 404.php
  • footer.php
  • ads/adlocale.php
  • index/commentsinc.php
  • index/database-funcs.php
  • index/displayusersubmission.php
  • index/fpd-indexing-funcs.php
  • login/header.php
  • play/pbm/play.php

One change is that {curly brackets} may no longer be used to specify characters within a string. [Square brackets] must be used instead, as they are already used for array elements. The other is that parentheses must now be used to specify the order of evaluation for nested ?: statements.

I will check more pages later to see if any more scripts need updating.


🕸Fergus Duniho wrote on Tue, Sep 21, 2021 12:49 PM UTC in reply to dax00 from 11:18 AM:

I can't access my game that was interrupted. I hope that timed-out games (due to the site being down) will be playable soon.

It appears that the problem with your game affects only Chu Shogi, and it has nothing to do with the game being interrupted, as I encountered the same problem when I tried to simply move pieces in Chu Shogi. What happens is that the page stops displaying partway through the menu, and it doesn't give me any clear indication of what is wrong. It looks like this is going to be a problem for Adam DeWitt to solve, as it stems from his chu settings file.


🕸Fergus Duniho wrote on Mon, Sep 20, 2021 10:28 PM UTC in reply to H. G. Muller from 08:32 PM:

Please back it up ASAP!

I copied a backup of the files and the database to the backup server. When I extracted the tar file, it overwrote the .htaccess file, which caused chessvariants.org to go to chessvariants.com. I will have to rewrite the .htaccess file so that the same file can work properly on both servers. Then I'll be able to test that the database and pages are working correctly over there.


🕸Fergus Duniho wrote on Mon, Sep 20, 2021 09:09 PM UTC in reply to H. G. Muller from 08:32 PM:

The server never crashed. I was simply unable to boot it back up after attempting a reboot. For those who don't know, this is because the host's website was down, which left me without the ability to access the control panel for the VPS. The host is now back online, and I now have a second VPS with a different company, which has been assigned to the chessvariants.org domain. I will now work on backing up my websites to the other server.


Grand Apothecary Chess-Classic. Very large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Sep 2, 2021 04:31 PM UTC in reply to H. G. Muller from 07:13 AM:

the idea behind the Play-Test Applet is that it would make things as easy as riding a bicycle, where otherwise they are as complex as assembling your own car from parts, and learning how to drive it.

That's not quite correct. The alternative to using the Play-Test Applet will often just involve copying a preset that already works, writing FEN code for the board, assigning piece labels and notation to the correct pieces, and saving. As long as a game uses pieces already programmed in the fairychess include file, has a fixed setup, and mainly follows the rules of Chess, it should be easy enough to create a programmed preset for it without knowing how to program.


🕸Fergus Duniho wrote on Wed, Sep 1, 2021 02:14 PM UTC in reply to Aurelian Florea from 12:08 PM:

The labels w and W are using paths that do not exist. The value for $dir should be an absolute relative path, not one whose value depends on another path value already being set. The value "/graphics.dir/alfaerie/" specifies a specific directory, but "../graphics.dir/alfaerie/" does not, or it specifies the wrong one, such as "/play/graphics.dir/alfaerie/". While "../" should not be used in $dir, it may be used in the location of a specific piece, because this will be relative to the absolute value in $dir. For example, w may be "../alfaeriemisc/compounds/%zebrawazir.gif".


Zillions of Games. It can play an endless variety of abstract board games, and we have a large collection of Chess variants you can play on it.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Aug 31, 2021 08:46 PM UTC in reply to Robert Mate from 04:48 PM:

I haven't used it that way since I had Windows 95. When I did, I arranged with another person regarding the time and game we would play together, and I believe I was in communication with him while setting up the connection for Zillions-of-Games. But I do not remember the steps we went through to do that. Also, back then, I had a dial-up internet account. I now have broadband, which works differently, and I don't know if that will make a difference.


Grand Apothecary Chess-Classic. Very large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Aug 30, 2021 08:31 PM UTC in reply to Jean-Louis Cazaux from 11:37 AM:

I'm quite interested by this possibility as I understand that this is a way to get rid of the creation of new sets.

It doesn't get rid of the creation of new sets. It just changes how you make them. Instead of writing a PHP file and having it put in the /play/pbm/sets/ directory, you can create a set using the GAME Code language.

However, I'm not very skilled in coding, I mean less than you all, and I don't understand everything. Is there any example in some files?

The only example is in comment 42275 on the Developer's Guide page. But this is an example of creating five different sets that each have only the standard Chess pieces in them. If you understand how it works, then you may be able to adapt it to create a set for a specific game. However, I might need to add some details to it to handle pieces that do not match up with pieces already in the set it is loading before running GAME Code.

Instead of creating a new set from scratch, you may prefer to work with an existing set that happens to include everything you need, then use the update-piece-set subroutine to define a new set in terms of it.


🕸Fergus Duniho wrote on Mon, Aug 30, 2021 07:57 PM UTC in reply to Jean-Louis Cazaux from 07:35 PM:

I don't understand what means "the available includes files" ?

An include file is a file containing programming code that is available for including in larger programs. The purpose behind this is to avoid rewriting code for different programs. Instead of writing each program from scratch, you can include include files to handle things that someone has already written code for. When writing GAME Code, you can use the include command to include the code in a particular include file. These are written as text files and have the .txt extension, which is the default extension for text files. But they are normally included without including the extension in the file name. The include files I have written are all in the /play/pbm/includes/ directory. To include one with the include command, just give its base name, which is the part before the .txt extension. H. G. Muller has written some include files in a different location, and these, I believe, are included by giving its full path and file name.


🕸Fergus Duniho wrote on Sun, Aug 29, 2021 10:18 PM UTC in reply to H. G. Muller from 08:48 PM:

Where can I find this include file?

It's in the includes directory. So, you just include it by name.

BTW, I did stumble on the method for defining a piece set through assigning to $pieces. Perhaps this is the best method to convert Interactive Diagrams to GAME code, as these Diagrams do specify the filenames of the piece images, the directory where these images are to be found, and the piece IDs (which can be used as labels). So it would just be a matter of dumping this internally held info in the form of a GAME-code associative array, in the code generated for the Pre-Game section.

Yes, that could work, though there is one caveat. When Game Courier is in Edit mode, it does not run any code unless someone clicks Run. This is a safety precaution to allow someone to edit buggy code that would otherwise disable the preset. Consequently, the board may not look right in Edit mode until someone clicks Run. If you use a set file in conjunction with the update-piece-set subroutine, though, it will avoid that problem. However, there could be a discrepancy between the labels used for the FEN code and the notation used in the preset.

To avoid that discrepancy, I was thinking of letting custom piece sets be stored as constants. However, constants are stored in logs, not in settings files. So, I'm not sure I have a good solution for this yet.


🕸Fergus Duniho wrote on Sun, Aug 29, 2021 06:31 PM UTC in reply to H. G. Muller from 03:46 PM:

I think the unexpected result is due to a space missing between * and 2 in the .dog definition.

Yes, when I corrected that, .dog gave me the correct result.

If I understood the 'new method' correctly, it would require help of an editor to define a new piece set in a PHP file.

No, the new method was provided to eliminate the need to make new set files. I have now written a subroutine that will do the job once you feed it the data. It is in the include file update-piece-set, and the subroutine is called update-piece-set. Just feed it the notation you will use. To make preparation of data easier, you may feed it all the data it needs in a single array. Each array element should be a single piece label or an array including the piece label first and the new notation second. Where a piece label is by itself, it will reuse the same label for the same piece. Where it comes paired with new notation, it will use the new notation for the piece and discard the old piece label.

This method allows the designer to write the FEN code using the original labels, but within the code, it will change the piece labels to the desired notation, and it will strip the $pieces array of all pieces not being used.

You may get data on what notation to use from the user. For each piece, just include an extra field on what notation to use for the piece. When it's left empty, use the original piece label.


🕸Fergus Duniho wrote on Sun, Aug 29, 2021 03:22 PM UTC in reply to H. G. Muller from Sat Aug 28 05:36 PM:

@Fergus: can there be a problem with functions that have a name starting with a period?

It would appear so. I ran this code to test this:

def cat * 2 #0;
def .dog *2 #0;
set p fn cat 8;
set q fn .dog 8;
dump;

And the result I got was this:

array(1) {
  [0]=>
  array(1) {
    ["main"]=>
    array(2) {
      ["p"]=>
      int(16)
      ["q"]=>
      array(2) {
        [0]=>
        string(1) "8"
        [1]=>
        string(2) "*2"
      }
    }
  }
}

This may be because GAME Code uses the period to separate array elements from arrays. I would recommend using aliases (old way) or rewriting the $piece array (new way) to avoid the need for writing functions with names that start with a period.


Folding Magnetic Chess. fold between D&E files, play on both sides.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sat, Aug 28, 2021 06:05 PM UTC:

I did not invent this variant, but I don't see the "submit a variant you've heard of but can't find on this website" button.

I have corrected that. You are no longer listed as the inventor, and I deleted the "but ..." part from the page, since it was mainly a note to the editors.


🕸Fergus Duniho wrote on Sat, Aug 28, 2021 06:01 PM UTC:

I added a photograph, edited some text, and approved this page. Although my magnetic set folds the wrong way for this game, I put the board on its side, placed the pieces on in reverse along the side files, and reversed the image, so that everything looks correct for this game. I'm not sure this game truly counts as a 3D game, because it does not have a third dimension of movement. Instead, it is a flat surface wrapped around a 3D object, such that there are connections between spaces on the edges that don't normally exist in Chess.


MSimperium-2[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sat, Aug 28, 2021 04:09 PM UTC in reply to Jean-Louis Cazaux from 06:35 AM:

I don't see the page, only these lines:

Any members can see unpublished pages when they're logged in. I expect you were not logged in yet.

(later on, I will try to draw a diagram)

So we're still waiting for a diagram. Okay.


MSsej[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 10:40 PM UTC in reply to Simon Jepps from 08:48 PM:

They are just decorative bullet points.

If you mean to use bullet points, you should use the UL and LI tags. Also, it's not clear to me why these particular paragraphs would be bulleted.


MSall-piece-drops-chess[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 06:43 PM UTC:

The external images on this page are all broken. Be sure to use only locally-hosted graphics for your page.


MSimperium-2[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 06:23 PM UTC:

Can anyone read this? I think it's in Spanish.


MSakb48-team-8-shogi-variant[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 06:21 PM UTC:

Why is this game named after a J-Pop group?


The Starbound Sliders. A Chess With Different Armies team featuring rook-inspired sliders.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 06:18 PM UTC:

Why are there numbers on the setup diagram?


vis-a-vis chess. Missing description[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 06:15 PM UTC:

I modified the formatting of the rules and removed the redundant text, but I do not understand this game. Rapprochement is not a common everyday word, and even after looking it up, it doesn't help me understand the object of this game.


Chess vs Strong Makruk. Chess against an enhanced Makruk army in an 8x8 board.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 06:07 PM UTC:

I made the description of the Nobleman clearer for someone who cannot see or follow the link, and then I approved this page.


E-Chess. The chess pieces appear on the board during the game.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 05:47 PM UTC:

I revised the wording of the rules a bit and approved this page.


Battle of the Kings. You start with eight pawns. The rest chess pieces appear on the board during the game.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 05:36 PM UTC:

I replaced the setup diagram with a local one and approved this page. This game uses reproduction in an interesting way.


MSdouble-king-chess-960[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 05:23 PM UTC:

This could use some more detail, particularly regarding its connection with Fischer Random Chess, a.k.a. Chess 960. There are more than 960 possible positions, but there are only 960 that are possible by the rules in Fischer Random Chess for selecting the position.


High Chess. Drawn games are instead won by the player whose King is closest to the centre.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 05:18 PM UTC:

Published.


MSgrand-shogun-cavalier-chess[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Aug 27, 2021 05:00 PM UTC:

I'm still waiting for changes to be made to this page, as indicated in my previous comment.


Folding Magnetic Chess. fold between D&E files, play on both sides.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Aug 26, 2021 09:52 PM UTC:

I wanted to take a photograph of this, but my folding magnetic set folds between the fourth and fifth ranks. So, all the spaces would be the wrong color. Does anyone have a magnetic set of the sort used in this game? And would you be willing to take a photograph of it with the pieces in place?


MSsej[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Aug 26, 2021 09:38 PM UTC:

I don't understand the use of ≽ and ≅ on this page.


Two Move Chess. Designed to alleviate the first move advantage for White using double moves, while retaining the tactics of international chess.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Aug 26, 2021 07:32 PM UTC:

I modified the rule regarding notation, because the rules of a game cannot specify the notation to such detail unless they are for a specific tournament or something like that. Some games are recorded with different kinds of notation, and software like Game Courier or Zillions-of-Games will use their own style of notation for all games.

I unhid this page, but I did not examine the notes section in detail.


Dou Shou Qi: The Battle of Animals - The Jungle Game. Simulated conflict between animal kingdoms. (7x9, Cells: 63) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Aug 25, 2021 10:43 PM UTC:

I have removed the See Also section, because the links are in the Related menu.


🕸Fergus Duniho wrote on Wed, Aug 25, 2021 10:23 PM UTC in reply to Jean-Louis Cazaux from 01:22 PM:

Since what you sent me was not an HTML page with images embedded into it, I mixed what you had written in with what Hans had written, and I included selected photographs. I broke up the image of pieces into individual pieces so that it would flow better. I commented out most of what Hans wrote but left it on the page so that I can later check whether any of it should be included.


🕸Fergus Duniho wrote on Tue, Aug 24, 2021 09:44 PM UTC in reply to Jean-Louis Cazaux from 08:45 PM:

I don't see it, and I may not have that address anymore. Please go to my profile and use the address provided there.


Grand Apothecary Chess-Alert. (Updated!) Very large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Aug 24, 2021 04:49 PM UTC in reply to H. G. Muller from 02:00 PM:

I just updated explode to work with an empty separator, and I wrote and tested this function:

def nolowercase allfalse lambda (islower #0) explode "" #0;

🕸Fergus Duniho wrote on Tue, Aug 24, 2021 04:15 PM UTC in reply to H. G. Muller from 02:00 PM:

would it be possible to have GAME code support operators nolower and noupper, as analogs to isupper and islower?

No, those are already in use for returning arrays of spaces. Also, PHP doesn't have a ctype function for what you want.

E.g. nolower would return true if its string argument would not contain any lower case characters, i.e. if it is all upper case, digits or punctuation.

With #0 standing in for the space with the piece in question, try using match #0 nolower. This will check whether it's among the spaces whose pieces have no lowercase letters in them. Or with #0 as the piece label, you could try not fnmatch "*[a-z]*" space #0. This checks it against a wildcard pattern for containing any lowercase ASCII characters, then negates the result.


🕸Fergus Duniho wrote on Tue, Aug 24, 2021 12:15 PM UTC in reply to H. G. Muller from 08:36 AM:

Perhaps Fergus can tell if there are alternatives to islower and isupper that ignore non-alphabetic characters, (or judge only the first letter in the string), and thus can be used to reliably recognize color in an environment of names that contain digits / punctuation. My first thought would of course be to outlaw such piece names in the fist place: it seems totally silly to allow such names. There doesn't seem any need for it.

My recommendation is to change the piece labels, which I have previously documented how to do. This would require extra programming, though, which could defeat the purpose of having all the code generated for you. Perhaps code for changing piece labels could be automatically generated with the other code. This would require you to enter both the original piece label and the notation you want to use for the piece. See recent comments to the Developer's Guide for details on what kind of code is needed to do this.


🕸Fergus Duniho wrote on Mon, Aug 23, 2021 10:19 PM UTC in reply to Aurelian Florea from 01:26 PM:

I am not familiar with how these automatically generated presets work. It looks like it might be trying to emulate logical directions without using the built-in support for logical directions. I cannot tell what piece the Mortar is or how it moves from this code.


85 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.