Free Tool: Poker Card Generator

Posted by (twitter: @SimianLogic)
April 21st, 2014 11:42 pm

github link
binary link

One of the things I mentioned in my recap post for the last Ludum Dare was that I’d like to build a free/open source tool to automate the annoying task of generating poker card images. This is a very niche tool (I’m not sure it would be useful outside of a game jam, where you’re working on a very limited timeframe) and it’s debatable whether it even fits the spirit of the competition.

I pitched it to Mike first and even he was unsure, suggesting I do this post and put it to the community.

The “make it all yourself” rules are pretty complicated (put in place both to encourage people to get their hands dirty as well as prevent people from grabbing premade art off the net that might be illegal or blow hastily-made art out of the water). Poker cards are weird in that (1) they’ve been around forever (like a chess board) but (2) they’re a pain in the ass to lay out and export.

Pros

  • would save anyone interested in building a poker-style game several hours in the LD format.
  • if someone wanted to make a card-based game, they could theoretically use this tool and no other art programs (though hopefully they’d skin the suits at least)
  • does allow for full skinning (see “dragon cards” in screenshots below)
  • others?

Cons

  • only 4 layout choices, so cards might look very similar across games
    (counter: how many games would even use it?)
    (counter: playing card “look” has been mostly static for a couple hundred years)
  • others?

Open Questions

  • would anyone but me use this tool?
  • does it fit the spirit of the competition? (for jam it wouldn’t matter)
  • others?

Here’s a rough walkthrough on how to use it and what comes out the back end:

1) Choose a Layout, adjust the size of your export images. The box on the right tells you what images you need to provide (and what size).

poker_card_generator_1


2) Choose a font from your system fonts.

poker_card_generator_2


3) Select images for each of your 4 suits.

poker_card_generator_3

 


4) Choose face cards (select either a single J/Q/K, one each for red and black, or a unique image for every face/suit combo)

poker_card_generator_4


5) Export, choose a folder, and you will now have 52 images!

poker_card_generator_5

 


6) For now, I use TexturePacker. If there is sufficient demand, it would be trivial to have the AIR tool export a texture atlas instead of individual images.

poker_card_generator_6


6 Responses to “Free Tool: Poker Card Generator”

  1. sorceress says:

    This is great! Two suggestions:

    1. A checkbox to fix aspect ratio for Poker (1.42), and Bridge (1.57) cards

    2. Language support (eg, J/Q/K is only used in English; French uses V/D/R; Russia uses В/Д/К)

  2. MetroidMan347 says:

    That sounds awesome.

  3. igwb says:

    This is awesome! I’ve actually been looking for a free-to-use set of cards for quite a while now. Thanks for making this!

  4. Bladdock says:

    DAMMIT. I literally just spent about 6 hours last week making a playing card sprite sheet (not for LD, I’m not in). That said though, most of my time was spent doing the art for the face cards (I’m not a brilliant spriter, at all) Oh well, it’s a very useful looking tool and I may use it in the future.

  5. Chaoseed says:

    Pretty niche, but very cool!

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]