{"id":4774,"date":"2022-03-08T08:36:23","date_gmt":"2022-03-08T08:36:23","guid":{"rendered":"https:\/\/brightchamps.com\/blog\/?p=4774"},"modified":"2026-02-02T13:10:45","modified_gmt":"2026-02-02T13:10:45","slug":"create-a-scratch-card-matching-game","status":"publish","type":"post","link":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/","title":{"rendered":"Step By Step Guide to Create Scratch Game of Matching Cards"},"content":{"rendered":"<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/brightchamps.com\/blog\/\">Home<\/a><\/span> \u00bb <span><a href=\"https:\/\/brightchamps.com\/blog\/code-for-kids\/\">Code for Kids Corner<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\"><strong>Step By Step Guide to Create Scratch Game of Matching Cards<\/strong><\/span><\/span><\/div>\n\n\n<p class=\"wp-block-paragraph\">Wondering how to create a simple yet satisfying card-matching <a href=\"https:\/\/brightchamps.com\/blog\/create-flying-game-scratch\/\">game on Scratch<\/a>? We have got an easy step-by-step guide for you!&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, we will help you learn how to plan for projects of intermediate difficulty and code them on Scratch.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Concentration and Match Pair are two common names for the card matching game. It is a card game where you can flip two cards each turn to see if they match. The game is played with an even number of cards facing down.<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<p class=\"wp-block-paragraph\">It is quite popular because of how easy it is to get into and it offers the player a test of memory. People of all ages can play this game. Additionally, it is pretty simple to create this scratch game using block based coding.<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-how-to-plan-for-such-a-project\" data-level=\"3\">How to plan for such a project&nbsp;<\/a><\/li><li><a href=\"#making-concentration-using-block-based-coding\" data-level=\"3\">Making concentration using block-based coding&nbsp;<\/a><\/li><li><a href=\"#so-let-s-go-through-the-entire-process-of-making-a-card-matching-game-in-scratch\" data-level=\"2\">So let&#8217;s go through the entire process of creating the scratch game<\/a><\/li><\/ul><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Frequently Asked Questions<\/li>\n<\/ul>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-1.png\" alt=\"How To Create A Card Matching Game On Scratch\" class=\"wp-image-4775\" width=\"560\" height=\"422\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-1.png 560w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-1-480x362.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 560px, 100vw\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-to-plan-for-such-a-project\"><strong>How to plan for such a project&nbsp;<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A concentration game has several phases, including shuffling, placing the cards face down, and playing until you find all the matching cards.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To recreate this <a href=\"https:\/\/brightchamps.com\/blog\/guides\/scratch-programming\/\">Scratch<\/a> game, follow the same steps and break the project into smaller chunks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can begin by preparing for the project by gathering the necessary sprites and backgrounds.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then you can create an algorithm to shuffle the cards into various positions. Following that, you can add game logic to the game.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, you can add the finishing touches to the game to make it that much more special!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"making-concentration-using-block-based-coding\"><strong>Making concentration using block-based coding&nbsp;<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Block-based coding has made it really easy and fun for beginners of every age to get into coding. It is especially engaging for kids because they get visual feedback of the coding running in real-time.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Through <a href=\"https:\/\/brightchamps.com\/blog\/block-based-coding\/\">block-based coding<\/a>, the process of creating the concentration game can be easily understood. It will be a concentration game with 16 cards. <\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"so-let-s-go-through-the-entire-process-of-making-a-card-matching-game-in-scratch\">So let&#8217;s go through the entire process of creating the scratch game<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: Getting started&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"choosing-a-background\"><strong>Choosing a background&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing to do when you are getting started with a <a href=\"https:\/\/brightchamps.com\/blog\/create-first-scratch-project\/\">scratch project<\/a> is to add a backdrop. You should choose a plain background to avoid the player from getting distracted. It will also increase the visibility of the cards later on.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-2.png\" alt=\"How To Create A Card Matching scratch game\" class=\"wp-image-4776\" width=\"422\" height=\"522\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"choosing-sprites\"><strong>Choosing Sprites<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can choose 8 distinct sprites for this project. You want to choose different sprites so that they can be easily distinguished.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-3.png\" alt=\"How To Create A Card Matching Game On Scratch\" class=\"wp-image-4777\" width=\"563\" height=\"301\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-3.png 563w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-3-480x256.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 563px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"editing-costumes-for-the-sprites\"><strong>Editing costumes for the Sprites&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because this is a card game, you must turn the sprites into cards. We can accomplish this by going to costumes and drawing a rectangle around the existing sprite.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, using white paint, fill in the rectangle. Then, select the sprite and bring it to the front layer by clicking the forward button. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now duplicate the costume and <strong><em>fill <\/em><\/strong>the rectangle with a different color. This will be the back of the card.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-4-1024x533.png\" alt=\"How To Create A Card Matching Game On Scratch\" class=\"wp-image-4778\" width=\"768\" height=\"400\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"adjusting-the-size\"><strong>Adjusting the size&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you must adjust the size parameter for each sprite until they are all the same size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make them small enough, so that 4 cards can fit the stage vertically and horizontally.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-5.png\" alt=\"How To Create A Card Matching Game On Scratch\" class=\"wp-image-4779\" width=\"559\" height=\"548\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-5.png 559w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-5-480x470.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 559px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: Coding for Card Shuffles&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For beginners, this may appear to be a daunting task. But once you apply a logical way of thinking, you can figure this out. You\u2019ll create a card grid in which the cards will be shuffled.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"creating-an-empty-sprite\"><strong>Creating an empty sprite&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will create an empty sprite first by hovering over the <strong><em>Choose a sprite <\/em><\/strong>button and clicking on the <strong><em>paint <\/em><\/strong>options. We are doing this so that we can avoid clutter in one sprite and we can easily manage the shuffling from one place.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-6.png\" alt=\"How To Create A Card Matching Game On Scratch\" class=\"wp-image-4780\" width=\"302\" height=\"224\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-6.png 402w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-6-300x222.png 300w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-6-150x111.png 150w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-6-400x298.png 400w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"creating-variables\"><strong>Creating variables&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Variables are important coding concepts, and we will use them to store the starting point of the card grid you are attempting to create.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will name them <em>startX<\/em>, which will store the starting position on the X-axis, and <span style=\"background-color: rgba(102, 102, 102, 0.2);\"><i>sta<\/i><\/span><em>rt Y<\/em>, which will do the same on the Y-axis.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You must also create a variable called a <em>pick<\/em>, which will contain the card number so that we can select the correct cards for the correct positions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-7.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4781\" width=\"194\" height=\"128\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-7.png 258w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-7-150x99.png 150w\" sizes=\"auto, (max-width: 194px) 100vw, 194px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"creating-lists\"><strong>Creating lists&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lists are one of the more underutilized blocks in scratch. It is a very useful data structure. We will create Three lists here for all sprites.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two of them, <strong>posX <\/strong>and <strong>posY <\/strong>will be used to store the various positions on the stage that we want the card to appear on.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last one will be a <strong>picklist, <\/strong>which will allow you to keep track of which card has been chosen for which position.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"301\" height=\"168\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-8.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4782\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-8.png 301w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-8-150x84.png 150w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"code-for-shuffling-on-the-empty-sprite\"><strong>Code for shuffling on the empty sprite&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will first select the starting position for the first card to appear. We&#8217;ve chosen the top left card position in this case. Set the X and Y position values for the variables startX and startY, respectively.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, using a repeat loop, populate both position lists with the values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The value of startX will be stored in the posX list in this loop. To find the next X position on stage for the next card, we will add a number to startX.&nbsp;<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<p class=\"wp-block-paragraph\">And, in order to avoid going out of bounds, you must reset startX if its value is greater than maxX. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You must do the same for the posY list, and you must use the pick variable to store 1,2,3,&#8230; in the picklist, which will eventually be used to identify each card.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we repeat this loop 16 times, we will have our 16 positions stored in separate position lists and the card numbers in the picklist.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"856\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-9.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4783\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-9.png 345w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-9-121x300.png 121w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-9-60x150.png 60w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"shuffle-code-for-the-empty-sprite\"><strong>Shuffle code for the empty sprite&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After the loop ends, we will <strong>broadcast <\/strong>\u2018shuffle\u2019. This will trigger the shuffling process. We add a separate script on the empty sprite with the <strong>when I receive \u2018shuffle\u2019 <\/strong>block.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, you will create another variable called random pick. This will be used to pick a random number between 1 to the number of times in the picklist and you will get the number assigned to the pick variable from the picklist. And at the end of this, we broadcast \u2019place\u2019.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-10.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4784\" width=\"512\" height=\"220\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-10.png 512w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-10-480x206.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 512px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"shuffle-code-for-the-first-card\"><strong>Shuffle code for the first card&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The \u2018place\u2019 message broadcasted from the empty sprite will be received here. And the first thing we do is to check whether the number in the pick variable is equal to 1.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will change this number for the other cards. Now we create another variable called <strong>Random Position.&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will be used to choose a random number between 1 and the length of the posX list. Now, choosing the Random Position variable as the index number, we will assign this sprites X and Y position as the value from the posX and posY list respectively.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will set the position of the first card. After that we delete the used posX, posY, and picklist values, ensuring that we can\u2019t select the repeating value ever.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the end of this, we broadcast \u2018shuffle\u2019 again, so this keeps happening till all the cards are placed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-11.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4785\" width=\"398\" height=\"437\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Applying Game Logic&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After shuffling the cards, you&#8217;re ready to apply the logic that determines whether a pair of cards match, and the best part is that we can do it on just one sprite and simply duplicate it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"creating-a-flip-function\"><strong>Creating a flip function&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because we will be flipping a lot according to the game, we should make it into a function so that we can reuse it without having to repeat ourselves.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can go to My <a href=\"https:\/\/brightchamps.com\/blog\/new-code-blocks-in-scratch-3\/\">Block<\/a> and make a <em>Flip<\/em> Block.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flipping the card here means switching from one costume to the next, and to make it more interesting, we&#8217;ll add some fisheye and color-changing effects while we&#8217;re at it.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All of this together creates a nice and cool effect.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"331\" height=\"547\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-12.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4786\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-12.png 331w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-12-182x300.png 182w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-12-91x150.png 91w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"creating-local-variables\"><strong>Creating local variables&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To check the various conditions in the game, we should start by creating some local variables.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can create 3 variables called <strong>Flippable?<\/strong>, <strong>Matched? <\/strong>And <strong>Match number <\/strong>selecting <strong><em>For this sprite only <\/em><\/strong>option.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will use the boolean variables Flippable? and Matched? to determine whether the card can be flipped and whether it has already been matched.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The match number will contain a one-of-a-kind number assigned to this card and the matching copy of this card. We\u2019ll assign their values at the beginning of the already existing <strong>when I receive \u2018place\u2019 <\/strong>script as you can see below in the image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-13.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4787\" width=\"524\" height=\"237\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-13.png 524w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-13-480x217.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 524px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"game-logic\"><strong>Game Logic&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now it is time to implement the card-matching game logic. We will use it <strong>when this sprite clicks <\/strong>and immediately check whether the card can be flipped or not.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are a few reasons for this. We don\u2019t want to flip a revealed card if we have matched the pair.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We also don\u2019t want to immediately flip the card if it was flipped to reveal it.&nbsp;<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<p class=\"wp-block-paragraph\">So, if the <em>Flippable? <\/em>the variable is set to \u2018yes\u2019 and <em>Matched? <\/em>is set to \u2018no\u2019. Only then can we flip it.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We will use the Flip block we made earlier inside the if conditional. Followed by setting the Flippable? Variable as \u2018no\u2019.&nbsp;<\/li>\n\n\n\n<li>Now we will make a variable for all sprites called Checking, which will temporarily hold the Match number value of the recently revealed card.&nbsp;<\/li>\n\n\n\n<li>We will also create another variable for all sprites called match count that will track how many cards have already been matched.&nbsp;<\/li>\n\n\n\n<li>Then we will check whether this number equals the match number of the currently flipped card. If it matches, we will change the <em>match count <\/em>by 1 and broadcast a message called matched. If it is not matching, we will just broadcast unmatched.&nbsp;<\/li>\n\n\n\n<li>Lastly, if this card has just been revealed, we will set the <em>Checking <\/em>variable\u2019s value as the match number of the current card.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-14.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4788\" width=\"587\" height=\"480\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-14.png 587w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-14-480x392.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 587px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"case-unmatched\"><strong>Case Unmatched&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the cards don\u2019t match, we will create another script starting with when I receive unmatched.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Under this, we\u2019ll check whether <em>Flippable? <\/em>is currently set to \u2018no\u2019, otherwise, we will do nothing.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are using <em>Flippable? <\/em>Variable as a gatekeeper here because if it is set to no, it already has been revealed.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We will broadcast \u2018don\u2019t flip\u2019 inside the if block for the other cards because we don\u2019t want them to be flipped.&nbsp;<\/li>\n\n\n\n<li>After that, we want to show the card to the player for a brief moment before flipping the card back over.&nbsp;<\/li>\n\n\n\n<li>So we add a wait 0.5 seconds block and then use our Flip block.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">After doing all this, we will set <em>Flippable? <\/em>to \u2018yes\u2019 and Checking to 0 and broadcast \u2018can flip\u2019 to enable flipping for the rest of the unrevealed cards.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-15.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4789\" width=\"249\" height=\"355\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-15.png 332w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-15-211x300.png 211w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-15-105x150.png 105w\" sizes=\"auto, (max-width: 249px) 100vw, 249px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"flip-if-you-can\"><strong>Flip if you can&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, now we&#8217;ll write two separate scripts, one for when I get &#8216;can&#8217;t flip&#8217; and one for when I get &#8216;can flip.&#8217; We&#8217;ll make Flippable? to &#8216;no&#8217; for can&#8217;t flip and &#8216;yes&#8217; for can flip<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"303\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-16.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4790\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-16.png 328w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-16-300x277.png 300w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-16-150x139.png 150w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"case-matched\"><strong>Case Matched&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the case that the revealed cards match, we will create another script starting with when I receive \u2018matched\u2019.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to what we did in the unmatched case, we will start by checking whether the variable <em>Flippable? <\/em>is set to \u2018no\u2019 for the same reason.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inside it, we\u2019ll set <em>Matched? <\/em>to \u2018yes\u2019, <em>Flippable? <\/em>to \u2018yes\u2019 and <em>Checking <\/em>to 0.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And we\u2019ll play a victorious sound!&nbsp;Under this, we will check whether the match count is equal to 8. If it is, then we will broadcast <strong>\u2018win\u2019<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"330\" height=\"485\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-17.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4791\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-17.png 330w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-17-204x300.png 204w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-17-102x150.png 102w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And with this, our game logic is complete.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: Finishing Up&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now all that is left is to add scripts to other cards and set up a title screen and an end screen. We will also set up the flow of the game.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"creating-new-sprites\"><strong>Creating new Sprites&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will be creating 3 new sprites. It will consist of the title text, the start button, and the winning text.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll need to use the text tool to make these.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-18.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4792\" width=\"536\" height=\"361\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-18.png 536w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-18-480x323.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 536px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"coding-for-the-start-button\"><strong>Coding for the start button&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is very simple; show it at the beginning of the game, and then broadcast &#8216;show&#8217; and hide it when this sprite is clicked.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"233\" height=\"316\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-19.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4793\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-19.png 233w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-19-221x300.png 221w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-19-111x150.png 111w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"coding-for-title-text\"><strong>Coding for Title Text&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is similar to the start button, you need to show it at the start of the game, and under <strong>when I receive \u2018show\u2019<\/strong>, you need to hide it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"261\" height=\"282\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-20.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4794\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-20.png 261w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-20-139x150.png 139w\" sizes=\"auto, (max-width: 261px) 100vw, 261px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"coding-for-win-text\"><strong>Coding for Win Text&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Over here, you have to <strong>hide <\/strong>it at the start, and then you have to show it when you receive the <strong>\u2018win\u2019 <\/strong>message<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"242\" height=\"325\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-21.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4795\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-21.png 242w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-21-223x300.png 223w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-21-112x150.png 112w\" sizes=\"auto, (max-width: 242px) 100vw, 242px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"additional-coding-for-the-empty-sprite\"><strong>Additional coding for the empty sprite.&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When we click on the start button, we want to show it for 2 seconds, and then we will start the game. So we will use the code down below.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"288\" height=\"208\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-22.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4796\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-22.png 288w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-22-150x108.png 150w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Also, we want to set the value of the checking and the match count variables at the start of the game.&nbsp;<br>So we will also add this here.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"298\" height=\"205\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-23.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4797\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-23.png 298w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-23-150x103.png 150w\" sizes=\"auto, (max-width: 298px) 100vw, 298px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"additional-coding-for-the-cards\"><strong>Additional coding for the cards&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The cards will remain hidden at the start of the game and cannot be flipped.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"223\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-24.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4798\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-24.png 292w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-24-150x115.png 150w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the cards receive the broadcasted message &#8216;show,&#8217; we will switch them to the first costume for a brief moment to show the cards face up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"273\" height=\"192\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-25.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4799\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-25.png 273w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-25-150x105.png 150w\" sizes=\"auto, (max-width: 273px) 100vw, 273px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the cards receive <strong>\u2018start\u2019<\/strong>, they are ready to be played. So we flip them with the function we wrote and set Flippable? to yes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"315\" height=\"212\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-26.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4800\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-26.png 315w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-26-300x202.png 300w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-26-150x101.png 150w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Lastly, <strong>when we receive \u2018win\u2019<\/strong>, we\u2019ll hide the cards.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"263\" height=\"142\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-27.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4801\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-27.png 263w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-27-150x81.png 150w\" sizes=\"auto, (max-width: 263px) 100vw, 263px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"adding-the-script-to-other-cards\"><strong>Adding the script to other cards&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Put the first card&#8217;s code in the backpack and add it to all the other sprites. You need to modify it when I receive the &#8216;place&#8217; script.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You must change the condition in the first if conditional, for example, pick = 2, pick = 3, and so on, as well as the Match number for each.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"342\" height=\"290\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-28.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4802\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-28.png 342w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-28-300x254.png 300w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-28-150x127.png 150w\" sizes=\"auto, (max-width: 342px) 100vw, 342px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"duplicate-the-cards\"><strong>Duplicate the cards&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We have only 8 cards prepared so far. We simply need to duplicate each card and then continue to look for unique pick numbers, such as pick = 9, pick = 10, and so on, while keeping the Match number the same this time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch-29.png\" alt=\"How To Create A Card Matching Game On Scratch \" class=\"wp-image-4803\" width=\"433\" height=\"226\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With this our wonderful game of concentration or match the cards is ready to play.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What we have made here is just the base  scratch game and there is a lot of room to introduce new ideas.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can add a timer and track how long it took a player to complete 1 game. You can introduce levels and more cards.&nbsp;<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<p class=\"wp-block-paragraph\">There are many possibilities, so experiment a bunch and make it your creation. There are lot of <a href=\"https:\/\/brightchamps.com\/blog\/best-coding-games-for-kids\/\">best coding games for kids<\/a>, which boost up their learning.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Learn Scratch at <a href=\"https:\/\/brightchamps.com\/\">BrightChamps <\/a>with its specially designed curriculum that makes learning programming easy for students in Grade 1-12. BrightChamps also teaches a variety of other programs that help kids build a foundation in computer programming through activities, interactive lessons, and <a href=\"https:\/\/brightchamps.com\/blog\/\">other means<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Frequently Asked Questions<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ques1. Is making a scratch game difficult?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ans: No. its quite simple to create a Scratch Game. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ques 2. What age should a child begin studying scratch-based coding?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ans. Children as young as 6 can start learning the fun and interesting coding, Scratch.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wondering how to create a simple yet satisfying card-matching game on Scratch? We have got an easy step-by-step guide for you!&nbsp; In this article, we will help you learn how to plan for projects of intermediate difficulty and code them on Scratch.&nbsp; Concentration and Match Pair are two common names for the card matching game. [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":4804,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[49],"tags":[68],"class_list":["post-4774","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-for-kids","tag-codechamps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Step By Step Guide to Create Scratch Game of Matching Cards - BrightChamps Blog<\/title>\n<meta name=\"description\" content=\"Scratch game of matching cards can be easily developed with block-based coding. It is a really fun and simple game.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Step By Step Guide to Create Scratch Game of Matching Cards - BrightChamps Blog\" \/>\n<meta property=\"og:description\" content=\"Scratch game of matching cards can be easily developed with block-based coding. It is a really fun and simple game.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/\" \/>\n<meta property=\"og:site_name\" content=\"BrightChamps Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BrightChamps-101266664954230\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-08T08:36:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-02T13:10:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2100\" \/>\n\t<meta property=\"og:image:height\" content=\"1185\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Team BrightChamps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Team BrightChamps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/\"},\"author\":{\"name\":\"Team BrightChamps\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/person\\\/696f52bb580934e5022585ac161e5123\"},\"headline\":\"Step By Step Guide to Create Scratch Game of Matching Cards\",\"datePublished\":\"2022-03-08T08:36:23+00:00\",\"dateModified\":\"2026-02-02T13:10:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/\"},\"wordCount\":2560,\"publisher\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/How-To-Create-A-Card-Matching-Game-On-Scratch.png\",\"keywords\":[\"CodeChamps\"],\"articleSection\":[\"Code for Kids Corner\"],\"inLanguage\":\"en-US\",\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/\",\"name\":\"Step By Step Guide to Create Scratch Game of Matching Cards - BrightChamps Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/How-To-Create-A-Card-Matching-Game-On-Scratch.png\",\"datePublished\":\"2022-03-08T08:36:23+00:00\",\"dateModified\":\"2026-02-02T13:10:45+00:00\",\"description\":\"Scratch game of matching cards can be easily developed with block-based coding. It is a really fun and simple game.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#primaryimage\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/How-To-Create-A-Card-Matching-Game-On-Scratch.png\",\"contentUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/How-To-Create-A-Card-Matching-Game-On-Scratch.png\",\"width\":2100,\"height\":1185,\"caption\":\"How To Create A Card Matching Game On Scratch\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/create-a-scratch-card-matching-game\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code for Kids Corner\",\"item\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/code-for-kids\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Step By Step Guide to Create Scratch Game of Matching Cards\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\",\"name\":\"BrightChamps Blog\",\"description\":\"BrightChamps Blog, also known as BrightChamps Hub is a go-to resource hub for everything on Coding for kids\",\"publisher\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\",\"name\":\"BrightChamps\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/BrightCHAMPS-logo-new-1.png\",\"contentUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/BrightCHAMPS-logo-new-1.png\",\"width\":417,\"height\":80,\"caption\":\"BrightChamps\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/BrightChamps-101266664954230\\\/\",\"https:\\\/\\\/www.instagram.com\\\/brightchamps\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/brightchamps\\\/mycompany\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UC_Afe_rMGoK5Bs4nSt8QIzQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/person\\\/696f52bb580934e5022585ac161e5123\",\"name\":\"Team BrightChamps\",\"description\":\"We are an army of educators and passionate learners from BrightChamps family, committed to providing free learning resources to kids, parents &amp; students. Learn from Us\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/author\\\/team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Step By Step Guide to Create Scratch Game of Matching Cards - BrightChamps Blog","description":"Scratch game of matching cards can be easily developed with block-based coding. It is a really fun and simple game.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/","og_locale":"en_US","og_type":"article","og_title":"Step By Step Guide to Create Scratch Game of Matching Cards - BrightChamps Blog","og_description":"Scratch game of matching cards can be easily developed with block-based coding. It is a really fun and simple game.","og_url":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/","og_site_name":"BrightChamps Blog","article_publisher":"https:\/\/www.facebook.com\/BrightChamps-101266664954230\/","article_published_time":"2022-03-08T08:36:23+00:00","article_modified_time":"2026-02-02T13:10:45+00:00","og_image":[{"width":2100,"height":1185,"url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch.png","type":"image\/png"}],"author":"Team BrightChamps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Team BrightChamps","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#article","isPartOf":{"@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/"},"author":{"name":"Team BrightChamps","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/person\/696f52bb580934e5022585ac161e5123"},"headline":"Step By Step Guide to Create Scratch Game of Matching Cards","datePublished":"2022-03-08T08:36:23+00:00","dateModified":"2026-02-02T13:10:45+00:00","mainEntityOfPage":{"@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/"},"wordCount":2560,"publisher":{"@id":"https:\/\/brightchamps.com\/blog\/#organization"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#primaryimage"},"thumbnailUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch.png","keywords":["CodeChamps"],"articleSection":["Code for Kids Corner"],"inLanguage":"en-US","accessibilityFeature":["tableOfContents"]},{"@type":"WebPage","@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/","url":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/","name":"Step By Step Guide to Create Scratch Game of Matching Cards - BrightChamps Blog","isPartOf":{"@id":"https:\/\/brightchamps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#primaryimage"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#primaryimage"},"thumbnailUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch.png","datePublished":"2022-03-08T08:36:23+00:00","dateModified":"2026-02-02T13:10:45+00:00","description":"Scratch game of matching cards can be easily developed with block-based coding. It is a really fun and simple game.","breadcrumb":{"@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#primaryimage","url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch.png","contentUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/03\/How-To-Create-A-Card-Matching-Game-On-Scratch.png","width":2100,"height":1185,"caption":"How To Create A Card Matching Game On Scratch"},{"@type":"BreadcrumbList","@id":"https:\/\/brightchamps.com\/blog\/create-a-scratch-card-matching-game\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/brightchamps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Code for Kids Corner","item":"https:\/\/brightchamps.com\/blog\/code-for-kids\/"},{"@type":"ListItem","position":3,"name":"Step By Step Guide to Create Scratch Game of Matching Cards"}]},{"@type":"WebSite","@id":"https:\/\/brightchamps.com\/blog\/#website","url":"https:\/\/brightchamps.com\/blog\/","name":"BrightChamps Blog","description":"BrightChamps Blog, also known as BrightChamps Hub is a go-to resource hub for everything on Coding for kids","publisher":{"@id":"https:\/\/brightchamps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/brightchamps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/brightchamps.com\/blog\/#organization","name":"BrightChamps","url":"https:\/\/brightchamps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2026\/03\/BrightCHAMPS-logo-new-1.png","contentUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2026\/03\/BrightCHAMPS-logo-new-1.png","width":417,"height":80,"caption":"BrightChamps"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/BrightChamps-101266664954230\/","https:\/\/www.instagram.com\/brightchamps\/","https:\/\/www.linkedin.com\/company\/brightchamps\/mycompany\/","https:\/\/www.youtube.com\/channel\/UC_Afe_rMGoK5Bs4nSt8QIzQ"]},{"@type":"Person","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/person\/696f52bb580934e5022585ac161e5123","name":"Team BrightChamps","description":"We are an army of educators and passionate learners from BrightChamps family, committed to providing free learning resources to kids, parents &amp; students. Learn from Us","url":"https:\/\/brightchamps.com\/blog\/author\/team\/"}]}},"_links":{"self":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/comments?post=4774"}],"version-history":[{"count":5,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4774\/revisions"}],"predecessor-version":[{"id":22063,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4774\/revisions\/22063"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/media\/4804"}],"wp:attachment":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/media?parent=4774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/categories?post=4774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/tags?post=4774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}