shlomif / PySolFC

A comprehensive, feature-rich, open source, and portable, collection of Solitaire games.
http://pysolfc.sourceforge.net/
GNU General Public License v3.0
463 stars 105 forks source link

Feature request - Support for cardsets with arbitrary number of ranks and suits. #410

Open Alucard648 opened 1 week ago

Alucard648 commented 1 week ago

Title says all. I found many crazy decks with, like 16 ranks and 16 suits + jokers. Here is one: cardset-master.zip French uses 13 ranks and 4 suits, Hex-A-Deck uses 16 ranks and 4 suits (+ 4 ranked jokers), Hanafuda uses 4 ranks and 12 suits, Ganjifa decks use 12 ranks and 8 or 10 suits. And so on. We are hoping that some original decks of cards can be used in many crazy solitaire games.

joeraz commented 1 week ago

A cardset type is more than just a number of suits/ranks/trumps. There are the base bottom images, find card images, and compatibility rules that determine which games can be played with which cardsets.

I am definitely willing to add more cardset types, including original ones. There was previously some discussion about trying to get a sixteen-suit deck supported. I also tried to get Politaire's six and eight suit decks added, but I lack the image editing support needed to get those to work. While I can do some of the images myself, my own image-editing skills are only passable, so I would need support from someone good at graphics.

At bare minimum, to add a new cardset type, I would need:

If I can get support with those three things, I'll be more than happy to help get more original cardset types in.

Alucard648 commented 1 week ago

Thanks for roadmap. Will work on it further. For kick start, feel free to use bottoms from this cardset. Actually I did it.

Alucard648 commented 1 week ago

Card search table. search

Alucard648 commented 1 week ago

Also here is my SVG file used for making cardset: карты

Russian and English index languages are available in this file. Feel free to downscale it for low-res cardset and upscale for hi-res thing done. Hope you are good with Inkscape.

joeraz commented 1 week ago

I am not that good with Inkscape. I can export images at various sizes, and sometimes rescale them (with considerable difficulty), but when I try to do something else, it never acts how I expect. I do know how to slice images after they export, but not all images slice cleanly.

For bottoms, I'm also looking for the standard cardset bottoms - the images currently in data/images/cards/bottoms.

Alucard648 commented 1 week ago

For image to slice properly, his size, in pixels, must be divisible, in both width and height, by number of cards in sheet. If not, sheet must be cropped to exact size. Also cards in sheet must have no gaps in between. Tools used to make the afromentioned cardset are listed in Copyright info file.

The real pain for me was renaming 320 output files manually to suit PySolFC needs. Cardset Maker (latest version) don`t support non-French decks at all. He can only autogenerate drop shadow images, which is still helpful.

Alucard648 commented 1 week ago

Base bottom images. master_base_bottom.zip

Alucard648 commented 6 days ago

And here is what I have done for this cardset type:

master_deck.zip

joeraz commented 6 days ago

I'll see what I can prototype with that, though it will take some time.