I’ve created an extension that can represent playing cards. It has poker, pinochle, and euchre decks built-in, plus the ability to create shoes (à la blackjack). You also can create your own, custom decks! See the code in the sample project for more information on that. In that sample project, I build a deck of cards for the wonderful card game called Rook.
The card images are built on-the-fly as you need them, so there isn’t as much overhead compared to rendering all of the images when the deck is created. If you are only showing a few cards on the screen at a time, you should only be using up the memory required to display those cards on the screen (plus a little bit of overhead to represent the card “bases” for each suit).
The extension is JavaScript-only for now. Card games are often a bit complex, and JavaScript seems like an appropriate environment for creating these games. Besides, the blocks interface definitely did not like this library. It works in Blocks, now, too! See reply later for more information.
@Vidget, there are a few code snippets in the README.md file. You also can get code samples of much of the extension’s functionality out of the sample projects that I’ve posted in this thread. If something doesn’t make sense, just let me know. If you have any bug fixes or suggestions, I’d love to hear about them!
Also, the Blocks interface doesn’t have all of the functionality exposed. The get the full functionality (e.g. custom card decks), you’d need to switch to JavaScript.
Ooh … don’t make me start on another project, @gbraad!
Acey Deucey was the simplest card game that I could think of, but additional solitaire games are an interesting thought. What do y’all think: What is the simplest solitaire game that you can think of, as far as game play is concerned?
I’ve noticed the new tags, @peli. Thanks for that! It’ll help us find games, extensions, and authors as this community continues to grow.
okay, I need some help here. I know this topic hasn’t been used in a while from the notification next to me, but I need to know, how do you make new cards?!?! I’m trying but its so complicated, and there’s no tutorial’s on it here. could anyone help?
The only way right now to change the card design is to use JavaScript. There aren’t any blocks to change card designs.
If you are comfortable with programming in JavaScript, then take a look at the code in the playground (first post) to see how I built the deck for the card game Rook. It shows how to create a custom deck.