# Card Game Extension (alpha release)

**URL:** <https://forum.makecode.com/t/card-game-extension-alpha-release/26024>\
**Category:** Arcade\
**Tags:** extension\
**Created:** [January 16, 2024, 10:49pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024 "2024-01-16T22:49:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvancircle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sylvancircle/32/15811_2.png) [@sylvancircle](https://forum.makecode.com/u/sylvancircle)\
**Post date:** [January 16, 2024, 10:49pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/1 "2024-01-16T22:49:42Z")

</div>

> **[GitHub - AlexSzeto/card-kit: A MakeCode arcade extension for making card...](https://github.com/alexszeto/card-kit/)**
>
> A MakeCode arcade extension for making card based games. - GitHub - AlexSzeto/card-kit: A MakeCode arcade extension for making card based games.

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:

> **[Memory - Card Kit Example](https://arcade.makecode.com/S60931-54644-26123-83594)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here’s a simple match 2 card game. Hopefully this one doesn’t take much explanation to understand.

> **[Solitaire - Card Kit Example](https://arcade.makecode.com/S54554-39447-42742-97188)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

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!

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [January 17, 2024, 6:35pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/2 "2024-01-17T18:35:59Z")

</div>

Wow, YUGIOH!! That would be awesome!! This extension is supercool! 💖

---

<div class="post-metadata">

**Author:** ![CreativeUsername](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/creativeusername/32/9601_2.png) [@CreativeUsername](https://forum.makecode.com/u/CreativeUsername)\
**Post date:** [January 17, 2024, 6:36pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/3 "2024-01-17T18:36:33Z")

</div>

This is really well made, good job!

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [January 17, 2024, 6:37pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/4 "2024-01-17T18:37:31Z")

</div>

This extension is already looking amazing! Will card rotation be a thing? (like in my [Card Game](https://forum.makecode.com/t/card-game-sprites-behaving-in-satisfying-unintentional-ways/20445) 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.

---

<div class="post-metadata">

**Author:** ![VictorGamer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/victorgamer/32/12895_2.png) [@VictorGamer](https://forum.makecode.com/u/VictorGamer)\
**Post date:** [January 17, 2024, 7:04pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/5 "2024-01-17T19:04:33Z")

</div>

Is it possible to make a card battle game?

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [January 17, 2024, 8:19pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/6 "2024-01-17T20:19:02Z")

</div>

Everytime this man posts, it’s a total **slammer** 🔥

---

<div class="post-metadata">

**Author:** ![Future\_Knight](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/future_knight/32/22166_2.png) [@Future\_Knight](https://forum.makecode.com/u/Future_Knight)\
**Post date:** [January 17, 2024, 9:58pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/7 "2024-01-17T21:58:12Z")

</div>

Yes YUGIOH MASTER DUELS IS NOW POSSIBLE TO MAKE

---

<div class="post-metadata">

**Author:** ![sylvancircle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sylvancircle/32/15811_2.png) [@sylvancircle](https://forum.makecode.com/u/sylvancircle)\
**Post date:** [January 18, 2024, 5:15pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/8 "2024-01-18T17:15:16Z")

</div>

Thanks for the suggestions!

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.

---

<div class="post-metadata">

**Author:** ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)\
**Post date:** [January 19, 2024, 6:05pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/9 "2024-01-19T18:05:26Z")

</div>

_woo!_

---

<div class="post-metadata">

**Author:** ![MasterCoder2378](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mastercoder2378/32/15072_2.png) [@MasterCoder2378](https://forum.makecode.com/u/MasterCoder2378)\
**Post date:** [May 8, 2024, 5:36pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/10 "2024-05-08T17:36:20Z")

</div>

cool 😀

---

<div class="post-metadata">

**Author:** ![MasterCoder2378](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mastercoder2378/32/15072_2.png) [@MasterCoder2378](https://forum.makecode.com/u/MasterCoder2378)\
**Post date:** [May 9, 2024, 12:03am UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/11 "2024-05-09T00:03:54Z")

</div>

hi @randomuser ser

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [May 9, 2024, 2:51am UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/12 "2024-05-09T02:51:38Z")

</div>

it is I, randomuserser!

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [May 9, 2024, 2:01pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/13 "2024-05-09T14:01:07Z")

</div>

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!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/6bc05739542d129c837834330954db3b84ccab37.png)

---

<div class="post-metadata">

**Author:** ![top\_hat\_lord](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/top_hat_lord/32/33469_2.png) [@top\_hat\_lord](https://forum.makecode.com/u/top_hat_lord)\
**Post date:** [June 21, 2024, 3:01pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/14 "2024-06-21T15:01:13Z")

</div>

how do you create a custom card on this? I’ve tried but its hard for me to make a new card to add to the deck for the game I’m making.

---

<div class="post-metadata">

**Author:** ![sylvancircle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sylvancircle/32/15811_2.png) [@sylvancircle](https://forum.makecode.com/u/sylvancircle)\
**Post date:** [June 22, 2024, 8:35pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/15 "2024-06-22T20:35:38Z")

</div>

> **[Tarot - Card Kit Example](https://arcade.makecode.com/S11717-82768-26828-94780)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

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:

1. 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.
2. Change all the basic settings like width and height.
3. 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.
4. 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.
5. 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.

---

<div class="post-metadata">

**Author:** ![Reflectfr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/reflectfr/32/32515_2.png) [@Reflectfr](https://forum.makecode.com/u/Reflectfr)\
**Post date:** [August 3, 2024, 12:39am UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/16 "2024-08-03T00:39:42Z")

</div>

thats really cool!

---

<div class="post-metadata">

**Author:** ![Stickman4269](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/stickman4269/32/23582_2.png) [@Stickman4269](https://forum.makecode.com/u/Stickman4269)\
**Post date:** [September 15, 2024, 9:04pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/17 "2024-09-15T21:04:48Z")

</div>

How do you duplicate cards?

---

<div class="post-metadata">

**Author:** ![Stickman4269](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/stickman4269/32/23582_2.png) [@Stickman4269](https://forum.makecode.com/u/Stickman4269)\
**Post date:** [September 16, 2024, 9:20pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/18 "2024-09-16T21:20:58Z")

</div>

I have now realised how

---

<div class="post-metadata">

**Author:** ![ADM\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adm_f/32/19808_2.png) [@ADM\_F](https://forum.makecode.com/u/ADM_F)\
**Post date:** [September 16, 2024, 11:38pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/19 "2024-09-16T23:38:54Z")

</div>

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

Can you help me fix this?

> **[Space Realms Alpha3](https://arcade.makecode.com/48395-98913-22617-37851)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![sylvancircle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sylvancircle/32/15811_2.png) [@sylvancircle](https://forum.makecode.com/u/sylvancircle)\
**Post date:** [September 16, 2024, 11:40pm UTC](https://forum.makecode.com/t/card-game-extension-alpha-release/26024/20 "2024-09-16T23:40:34Z")

</div>

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:

 ![add-playing-card](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/b/5b88e3927aa3bc81ec42c9cc456079e256de7f61.png)

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.

[Next page](https://forum.makecode.com/t/card-game-extension-alpha-release/26024.md?page=2)
