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 Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Game Courier Logs. View the logs of games played on Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Mar 12 04:56 PM UTC in reply to H. G. Muller from 02:24 PM:

In your example, the black outlines were also appearing around the pieces in the Captured Pieces section, and this uses the same code no matter what the rendering method for the board. So, it's not the CSS rendering method that's at fault. This black outline is happening because the CSS rendering method is displaying them with the showpiece.php script, and the pieces in question are not in the proper format to work with this script. The pieces in use here are from the alfaeriePNG directory. The reason they are being displayed with showpiece.php is because they are 48x48 instead of the expected 50x50. So that smaller images do not get disproportionately enlarged by a background-size of contain, it runs smaller images through showpiece.php to pad them. However, the image I tested turned out to be a truecolor image, and the transparent color used was black (#000000) instead of green (#00ff00). Because of this, it could not determine and keep track of the transparent color, and instead of coloring the padded border with the transparent color, it colored it an opaque black. To fix this, there are three changes you can make to these images.

  1. Make the images 50x50 instead of 48x48. This will stop the need to pad these images when the squares are 50x50.
  2. Make them palette images, not truecolor images. Even with the image I tested, it had only 141 colors, which is within the capacity of a palette image. So, there was no reason to make it truecolor.
  3. Make the transparent color pure green. This is a convention adopted from Zillions-of-Games, which provides a means to detect the transparent color when other means are not working.

[UPDATE]I added some fallback methods for getting the transparent color, and now the pieces show up without the black border. However, there is an issue with the cross on the king. So, I still recommend modifying the pieces to work better with this script or to even not need it in this circumstance.[/UPDATE]