PySolFC icon indicating copy to clipboard operation
PySolFC copied to clipboard

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

Open Alucard648 opened this issue 1 year ago • 15 comments

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.

Alucard648 avatar Nov 05 '24 21:11 Alucard648

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:

  • At least three appropriately licensed cardsets - one lower res in the style of earlier versions of PySol for smaller screens, one high res for more modern displays (in the style of https://github.com/joeraz/neo-cards if possible), and one other for some variation.
  • Images for the global cardset bottoms/find card display.
  • A number of examples of games that would use the new cardset type. I really don't want to add a whole new cardset type for a single game (unless there are a lot of variants of said game).

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

joeraz avatar Nov 05 '24 23:11 joeraz

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

Alucard648 avatar Nov 06 '24 00:11 Alucard648

Card search table. search

Alucard648 avatar Nov 06 '24 01:11 Alucard648

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.

Alucard648 avatar Nov 06 '24 01:11 Alucard648

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.

joeraz avatar Nov 06 '24 01:11 joeraz

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 avatar Nov 06 '24 12:11 Alucard648

Base bottom images. master_base_bottom.zip

Alucard648 avatar Nov 06 '24 23:11 Alucard648

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

  • 4 variants of default Master cardset, with English/Russian indexes and low/high definition.
  • False Dominoes 16x16 cardset inspired by dominoes. Top half is card rank, bottom half is card suit.
  • Card search and base bottom images.
  • And text file containing ides for 16 solitaire games. Unfortunately, they are mostly adaptations of classic solitaire games, sometimes with crazy twists, like special card placement and non-standard victory conditions.

master_deck.zip

Alucard648 avatar Nov 10 '24 04:11 Alucard648

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

joeraz avatar Nov 10 '24 15:11 joeraz

@Alucard648 Sorry this took longer than expected. I had some other priorities to handle.

In the https://github.com/joeraz/PySolFC/tree/master-deck branch in my fork, I've set up a basic prototype for the "Master Deck", though thus far, I only added the first game from the list you provided. Though I named it simply "unobtanium", as the full name is a bit of a mouthful. To add a deck of this type, the cardset type ID should be made 13 (though this number may change depending how things happen).

So next step would be to test the functionality and the individual games as they're slowly added. Both for functionality and for game balance. Once we get more confirmation that this core logic is working, I'll continue to add the remaining games.

We might need to update the find card images to be the same style as the other cardsets - the current images were too small, and even when I did a bulk resize, they didn't fit the window right. The visual style might need some modifications, as it feels different from the other games.

joeraz avatar Jul 04 '25 03:07 joeraz

How much the card search images need to be upscaled? I find the current size too big on my 1280x1024 screen. As for updating visual style, what are your suggestions? I am hoping, just recoloring background to white should be enough. P.S. What is your suggested character limit for solitaire names? I might update game names to suit it, with full name still be preserved in docs.

Alucard648 avatar Jul 04 '25 17:07 Alucard648

Currently, the finder images are all 38x34 for each card label - the find card dialog expects the images to be that size, so if you give it something smaller or larger, it won't look right. If there's an issue with the screen size, that should probably be a separate issue. If you're dealing with a cardset type with more cards (see Dashavatara Ganjifa), it's difficult to keep it from getting in the way with smaller screens, but it shouldn't be cut off on 1280x1024.

For style, the current images are all in the folder data/images/cards/finder.

As far as solitaire names, it's not like there's a hard and fast rule. I guess looking at the basic trends, most game names are one or two words, with the occasional three-word name. I don't want to be pedantic about this (we are bound by the existing names for established games after all), but adding a lot of 4+ word names stands out a bit.

joeraz avatar Jul 04 '25 21:07 joeraz

Redrawn card search images from scratch. Included shortened names suggestions.

master deck game ideas.txt

Image

Alucard648 avatar Jul 05 '25 00:07 Alucard648

The document lists two games with the short name "Zortuthu", but otherwise, I can work with this.

That finder image works. It's actually a bit nicer than some of the finder images we currently use. Could you let me know what font/font size you used so I can replicate a few more images to update the other cardset types?

joeraz avatar Jul 05 '25 01:07 joeraz

master deck game ideas.txt Renamed one game to resolve conflict. Font: Cambria, size 18, bold.

Alucard648 avatar Jul 05 '25 03:07 Alucard648