gbtami / pychess-variants

Chess variant server
https://www.pychess.org
GNU Affero General Public License v3.0
238 stars 115 forks source link

Piece Sets and Boards #15

Closed CouchTomato87 closed 4 years ago

CouchTomato87 commented 5 years ago

I noticed that some people didn't even know you could change the piece sets by clicking the settings button on the top right. I think for a game about one game (like lichess) it's fine to keep it in the overall settings, but in this game where different types of games are played, I think it makes more sense to have this option within the game interface instead of the top menu bar, kind of like what they do in playok.com. As of now, the interface uses a lot of space for just three buttons (abort, draw, and resign). Maybe you can squeeze in graphics options too?

Along those lines, maybe this is already planned, but would you be able to split the piece sets and boards so you can mix and match, like you can do in lichess?

Also, the thumbnail previews when looking at other player's games does not update with your current theme.

gbtami commented 5 years ago

Agreed. I plan to add preferences menu later, similar to lichess.

Will fix thumbnail boards. Thx for noticing it!

CouchTomato87 commented 5 years ago

Another thought: Alternatively, you could have the options for pieces and boards in the top left in that little window that has the game name and the players. There's plenty of space on the right side of that window.

gbtami commented 5 years ago

I plan to add something similar what lichess has. menu

CouchTomato87 commented 5 years ago

Right. The only problem though is that in lichess, your changes apply for the whole site, so it makes sense to put it in the "general menu." However here, you have multiple different games with different sets, so it's hard to do that without changing the menu for each game. And in that case, it's not so obvious (case in point, people have to keep reminding viewers that they can change piece sets by clicking the gear in the top right in games like shogi, etc).

gbtami commented 5 years ago

I agree that my temporary gear solution is far from being ideal :) On the other hand I want to keep as much as I can from lichess UI look and feel. What about adding a so-called hamburger menu right after the movelist navigation buttons? I mean similar what lichess uses on analysis mode. analysis

gbtami commented 5 years ago

You can select available pieces sets in settings panel now. (click on gear button)

CouchTomato87 commented 5 years ago

Hey! If you don't mind, I'd like to add one fourth and final piece set option for the combo pieces (archbishop, chancellor, etc)! I've always preferred them to have their own look rather than just mix pieces together, so I used the designs from http://musketeerchess.net/ (hopefully that's okay). They're also adapted for the Merida style.

Musketeers.zip

gbtami commented 5 years ago

Great, thx! Committed them. Seems https://github.com/gbtami/pychess-variants/blob/master/static/images/pieces/merida/WC2.svg has transparency issue yet.

CouchTomato87 commented 5 years ago

Whoops. That's what happens when Inkscape just gives you a white background the whole time lol. I fixed it now.

gbtami commented 5 years ago

As I see it is still transparent :)

CouchTomato87 commented 5 years ago

Lol, that's insane! I'm pretty sure I fixed it. I just changed it yet again now -- double checked now too :)

gbtami commented 5 years ago

Added boards to settings (independent from pieces).

CouchTomato87 commented 5 years ago

Awesome!!! I'll get out some new shogi and xiangqi boards for you (mostly recolors) :D

CouchTomato87 commented 5 years ago

I put in a replacement shogiban1.png. I also uploaded two new boards... ShogiMaple (based on our favorite chess board), and ShogiCheckeredWood (basically one of the wooden shogi boards, but checkered). I'd replace the gray and red textured boards currently being used. I'm loving the green textured one though :)

gbtami commented 5 years ago

Done.

CouchTomato87 commented 5 years ago

Thanks! Somehow the checkered wood board got messed up, and I had to re-commit that one... Sorry!

gbtami commented 5 years ago

Np. the new boards are cool! Thx!

CouchTomato87 commented 5 years ago

If you add this line to the css wrap: "background-position: center;"

Does that fix the edge line disappearing?

gbtami commented 5 years ago

No it doesn't. At least at some zoom value this is how it renders in Firefox shogi

I think the .png is a little bit taller than expected by piece x/y ratio.

CouchTomato87 commented 5 years ago

Hmm, I used the exact same dimensions as the original svg. The dimensions are also all multiples of 9. I think the problem is simply the fact that the edge will inevitably be cut off if the scaling goes from an odd to even or even to odd number of pixels. The original svg also cuts off (but it's two pixels thick, so it just becomes thinner).

https://css-tricks.com/almanac/properties/i/image-rendering/

I wonder if this helps? Although some of those features like crisp-edges or pixelated work on some browsers, but not others. Otherwise, I wonder if another solution is that for these boards swith grids, can you can add a 1 px stroke to it in the code?

I should also mention that on my MacBook Chrome browser, the boards and scaling bar actually extend outside their box.

Image 9-16-19 at 8 54 AM

gbtami commented 5 years ago

Changing css background-size from cover to contain solved it.

Interesting. On Ubuntu 18.04 Chromium 76.0.3809.100 it is OK.

CouchTomato87 commented 5 years ago

Nice!

I just updated some boards... I updated Shogiban2 and the shogicheckeredwood files. As much as it pains me, could you replace the green shogi board to make room for shogiban2? Also, I think it would make sense to have Shogiban1 and Shogiban2 be 2nd and 3rd in order (so that classic shogi boards come before the more radical checkered boards).

I also added two new xiangqi boards, a paper one and a dark wooden one. :)

I think that's all I've got for boards, haha

gbtami commented 5 years ago

Uploaded. Thx!

Btw. we should offer more boards in settings dialog if we use little/shrinked 1x2 .pgn board thumbnails instead of full board images. They are defined in https://github.com/gbtami/pychess-variants/blob/master/static/site.css#L680

Something like this: Képernyőkép_2019-09-17_11-03-50

CouchTomato87 commented 5 years ago

Is that something you'd want me to do next?

Also, I updated all the internationalized xiangqi graphics now.

gbtami commented 5 years ago

Makruk and Sittuyin has no Guides. If you can write something similar to Shogi/Xiangqi it would be appreciated. Regarding pieces I have on minor thing always wanted to fix. Makruk pieces are little wrong placed vertically. The top of the King is out of square. Maybe all pieces (except pawns) should be moved a little down. makruk

Thx again!

gbtami commented 5 years ago

Seems the blacks pawn lost their circles in updated Xiangqi set.

CouchTomato87 commented 5 years ago

Whoops! Fixed it. Also reduced the gradient on some pieces.

I can do the guides. Yeah, moving the pieces should be no big deal. I was wondering if you ever wanted a replacement set because the files for those pieces are incredibly complex with a million layers. I bet their file size isn't the best.

gbtami commented 5 years ago

After latest Xiangqi update some aliens appeared in black camp :) xiangqi

CouchTomato87 commented 5 years ago

Yikes! They should be fixed now. Not sure why the advisor ring disappeared. It showed up on Inkscape. I fixed that too, somehow.

gbtami commented 5 years ago

Thx! Deployed.

CouchTomato87 commented 5 years ago

I committed updated Makruk pieces. I couldn't find any decent 2D pieces, so I just shifted the ones we have, like you requested (I still don't like the knight).

I'll work on creating Makruk/Sittuyin guides as well as updating the Xiangqi one next.

gbtami commented 5 years ago

Thx a lot! Deployed.

CouchTomato87 commented 5 years ago

Uploaded. Thx!

Btw. we should offer more boards in settings dialog if we use little/shrinked 1x2 .pgn board thumbnails instead of full board images. They are defined in https://github.com/gbtami/pychess-variants/blob/master/static/site.css#L680

Something like this: Képernyőkép_2019-09-17_11-03-50

Do you want me to make these board icons too?

gbtami commented 5 years ago

I think we have enough boards and pieces at this moment users can choose from, so I say no.

The only remaining thing I'm not satisfied is the gray Makruk board I have added before. The white king top and all black pieces bottom are rendered over the grid lines somehow. I'm not sure what would be the better way to fix it. Shorten the pieces a bit or drop this board and find another one? makruk

gbtami commented 5 years ago

Btw I have another interesting issue with Makruk pieces. The concentric circles of pawns produces some kind of visual illusion effect. If I move my eyes vertically while I'm looking at the board I see ghost pawn chains above and/or bellow the real pawn chains. Can you see this effect? :)

CouchTomato87 commented 5 years ago

I saw the pieces overlapping and then I actually kinda liked it. It gave kind of a 3D feeling. For an alternative board, I think it's okay.

And no, I don't see that pawn effect myself, but I can definitely see that happening to people lol.

gbtami commented 5 years ago

OK, if you "kinda liked it", let it as it is now :) If you can find alternative boards for variants having less than 6, feel free to commit them any time.

ghost commented 3 years ago

Woah :octocat: