ianfab / fairyground

playground for Fairy-Stockfish in the browser
https://fairyground.vercel.app/
GNU General Public License v3.0
21 stars 5 forks source link

Add complete piece set #2

Closed ianfab closed 6 months ago

ianfab commented 2 years ago

Add SVGs for all piece letters from a-z and from +a to +z for the standard themes (e.g., merida, cburnett) to have visible pieces for all variants.

PraseodymiumSpike commented 2 years ago

I think that it should also be that each piece letter is actually different.

PraseodymiumSpike commented 2 years ago

For example, H and J are the same right now.

PraseodymiumSpike commented 2 years ago

List of Potential Merida Pieces to Add from Other Projects

black "D" piece: https://github.com/abgros/chessboi/blob/master/graphics/shinobimirror/bD.png (somewhat off style) white "Y" piece: https://github.com/gbtami/pychess-variants/blob/master/static/images/pieces/orda/merida/wY.svg

might add more as time goes on

dpldgr commented 12 months ago

I've been working on some graphics that seem to complete this enhancement, is this the kind of thing that you're looking for @ianfab? A grey piece background indicates an unpromoted piece, a gold piece background indicates a promoted piece. Screenshot 2023-10-12 135923 Screenshot 2023-10-12 140037

yjf2002ghty commented 12 months ago

I've been working on some graphics that seem to complete this enhancement, is this the kind of thing that you're looking for @ianfab? A grey piece background indicates an unpromoted piece, a gold piece background indicates a promoted piece. Screenshot 2023-10-12 135923 Screenshot 2023-10-12 140037

This looks much better than the letters theme currently. But what the title means is that we need to find full merida / cburnett SVGs that covers a-z and +a-+z. In most cases, using different graphs for the pieces can help users recognize the pieces faster than using letters.

dpldgr commented 12 months ago

This looks much better than the letters theme currently. But what the title means is that we need to find full merida / cburnett SVGs that covers a-z and +a-+z. In most cases, using different graphs for the pieces can help users recognize the pieces faster than using letters.

Hmmm. The same letter might signify two different pieces in different variants (eg. an A moves as a BN in "capablanca", but a QN in "amazon"), and two different letters might also signify the same piece movement in different variants. In the A example it might be more misleading than helpful to use the same A graphic in both "capablanca" and "amazon". There's also surely more than 26 different pieces just in the variants that fairyground supports by default. It does seem like an impossible task, or am I missing something?

yjf2002ghty commented 12 months ago

This looks much better than the letters theme currently. But what the title means is that we need to find full merida / cburnett SVGs that covers a-z and +a-+z. In most cases, using different graphs for the pieces can help users recognize the pieces faster than using letters.

Hmmm. The same letter might signify two different pieces in different variants (eg. an A moves as a BN in "capablanca", but a QN in "amazon"), and two different letters might also signify the same piece movement in different variants. In the A example it might be more misleading than helpful to use the same A graphic in both "capablanca" and "amazon". There's also surely more than 26 different pieces just in the variants that fairyground supports by default. It does seem like an impossible task, or am I missing something?

Full merida / cburnett SVGs are used by the default theme that applicates to the variants which currently does not have a specialized theme. This is used as a fallback to ensure that all pieces can be rendered (e.g. The stardust variant has most of its pieces not rendered). In terms of "capablanca" and "amazon", they don't have their own themes and uses the default theme as fallback which can cause ambiguous piece moves. The best way is to design specialized themes for all variants, but it is a large work. Letter themes are used for recognizing the piece ids of each piece that are used in fairy stockfish and FEN. They are used for development (e.g. Designing a variant) purposes instead of playing.

dpldgr commented 12 months ago

This looks much better than the letters theme currently. But what the title means is that we need to find full merida / cburnett SVGs that covers a-z and +a-+z. In most cases, using different graphs for the pieces can help users recognize the pieces faster than using letters.

Hmmm. The same letter might signify two different pieces in different variants (eg. an A moves as a BN in "capablanca", but a QN in "amazon"), and two different letters might also signify the same piece movement in different variants. In the A example it might be more misleading than helpful to use the same A graphic in both "capablanca" and "amazon". There's also surely more than 26 different pieces just in the variants that fairyground supports by default. It does seem like an impossible task, or am I missing something?

Full merida / cburnett SVGs are used by the default theme that applicates to the variants which currently does not have a specialized theme. This is used as a fallback to ensure that all pieces can be rendered (e.g. The stardust variant has most of its pieces not rendered). In terms of "capablanca" and "amazon", they don't have their own themes and uses the default theme as fallback which can cause ambiguous piece moves. The best way is to design specialized themes for all variants, but it is a large work. Letter themes are used for recognizing the piece ids of each piece that are used in fairy stockfish and FEN. They are used for development (e.g. Designing a variant) purposes instead of playing.

In the absence of being able to map specific letters to specific graphics, the approach I've used seems to be the only way of guaranteeing that pieces will actually be rendered for an arbitrary variant. End users can also use the "Show legal moves" option to figure out how pieces are moved. For my variants, I actually developed icons that explicitly show how they can move to help users learn how to play much quicker than they otherwise could. I wonder if there's some way of doing that on the fly for arbitrary pieces.

ianfab commented 12 months ago

Exactly, this would just be a first simple step to improve usability. When no SVG is available, the piece is invisible. When having a fixed SVG per letter it might be the "wrong" one from the user perspective. Having it customized per variant and/or user selectable would be the best, but is highest effort. So #5 would likely make this issue obsolete, but this one is way less effort, so I still think it will be the intermediate solution.

dpldgr commented 12 months ago

Exactly, this would just be a first simple step to improve usability. When no SVG is available, the piece is invisible. When having a fixed SVG per letter it might be the "wrong" one from the user perspective. Having it customized per variant and/or user selectable would be the best, but is highest effort. So #5 would likely make this issue obsolete, but this one is way less effort, so I still think it will be the intermediate solution.

Yeah, I ran into those exact problems when I was uploading my variants.ini file to test. Pieces where either invisible or mapped to graphics that didn't make sense. Everything showed up with "letters", but it's quite hard to read on many of the backgrounds. I had to set up a local server and figure out how to configure it to get access to my variant specific graphics and lower contrast board graphics. That's obviously not something your average end user is likely to do.

ianfab commented 6 months ago

Closed in #54