Hi everyone, this extension is what I’ve disappeared (for months!) to work on. If you check the version number, it’s currently not quite 1.0 yet. There’s enough blocks to build complete games with it and I’ve fixed the bugs along the way to build two of my demo projects, but I can’t guarantee that every block works as expected, or that there’s be blocks to do everything you want to do for your project:
Here’s a simple match 2 card game. Hopefully this one doesn’t take much explanation to understand.
I added comments for the complicated parts and sections where I have to use unintuitive workarounds.
There is a third demo that I’m planning to build that will test the custom cards features… those would cover the blocks in the advanced section that goes completely unused for the first two demos. The playing cards are built on top of this system and in theory you can use the extension to recreate most card games (Dominion, Yu-Gi-Oh, Magic…)
But I am also excited about letting others test this extension out and want to collect some feedback before I lock down the blocks for the 1.0 release. Please feel free to give me questions, feedback, suggestions, and bug reports (especially the bug reports). I’ll keep this thread updated until the extension is ready for a full release, then probably start a new thread to minimize confusion (and people working with buggy blocks).
I’ll be working on the third demo/testing custom cards in the meantime. Cheers!
This extension is already looking amazing! Will card rotation be a thing? (like in my Card Game that I’m developing) I’m definitely thinking of remaking it when this extension is finished because the current version just has an obscene number of blocks.
Also one final thing, will custom fonts be available for the cards? Squeezing text into such a small area can be really annoying, so having an option to make the font smaller/larger/custom would be quite useful. Also would look nicer and you could use some handpixelled AA to smooth out the font as well.
It’s definitely possible to rotate the card since they are just sprites, but making rotating cards fit into the existing layouts will have to come later - there’s a lot of complications that I’ll have to work out before that can happen.
Currently, the cards are using a custom font - the tiny font that prints the number and letters on the playing cards. Resizable fonts make sense, but custom font is going to be harder unless I open up the font sections of the code for block manipulation as well.
Wow, this extension is incredible, and the examples you created to demonstrate it are some of the best games I have seen on makecode. I had a blast playing this as I like solitaire in general, and this is such a high quality recreation!
Everything you need to create custom card is in the Card Design section, hidden under the Advanced tab. You can view the code for this Tarot example to see how to show custom art and unique names and numbers based on values to assign to each card.
If you export the extension now, the wording for the blocks are slightly different but they still work the same. I had some instructions from the game jam thread that I’ll copy here:
To create a new design:
Use the create a new card design block. All of these blocks are in the “Card Design” group hidden behind the advanced tab. All the blocks that comes after the create design block modifies this newly created design.
Change all the basic settings like width and height.
Change the card front and/or back if you want. Card Kit would try stretch the image like a frame to fit the width/height unless the image is exactly the size of the card.
Add things to draw on top of the cards. You’ll need to start a new group before adding the first draw block, afterwards you can start new groups to place new elements elsewhere. A group is always anchored to one of the corners or the center of the card.
Add draw blocks to the group. This is how you can make each card look unique depending on the card’s attributes. A card can be assigned attributes with text or numbers, like a baked in sprite data extension for the card sprites.
I’d be happy to walk you through the steps if you have an exact card design in mind.
I’m trying to get Your card extension to work i’ve followed the directions given but i still cant get it to work i’ve also noticed that the extension has gotten a update
I’ve gone back and forth on having a block specifically for duplicating cards, but in the end I’ve decided that it’s better to let people use the generic add card block instead. You can find this hidden in the Advanced tab, in Card Design, then scroll to the bottom under the Deck Builder section.
To add new playing cards, you will need a block like this one:
The card must be added to a card container. You will need to change one of the attribute blocks in the array to change the card suit. Also since the rank is a number, you must replace the second attribute block with a number attribute block that you can find under the Deck Builder section.
Mmm, that really is a mouthful. I will probably add a block specifically to create new playing cards in the future, for people who don’t really care about creating custom cards for their game.