Memory game with images

Card matching game showing image of corn and the text "el maíz"

Using this block

A version of the memory card game with 10 cards. One card is an image and the match is text. Players find all of the matches within the time limit.

Example Uses

This block is usually used in teaching vocabulary, both in English and in second language classes. It has also been applied in social studies, with historical figures or geographic landmarks matched with their description. It can be used for elementary math, for example, 3 x 3 and an image with 9 cats. For mathematics, also check the Memory Math block.

Making it your own

What’s in the block

Like every block, the Memory Images game block has two files in the folder:

  • An HTML file: memory_images.html . You should not have to change anything in this file.
  • A config file: memory_config.js – This is where you will make any changes to create your unique game.

As with most blocks, it also has an images folder. Any images used specifically in this block will be saved here. An audio folder contains a sound that plays when a match is found.

The config file

This block has only one config section, the options section where we add everything from the instructions to the images of the things that need to be whacked.

Page Options

As with all blocks, there is an options object. This contains instructions on how to play the game, where to go once it is over, what images and audio to use etc.

const options = {
    instructionsPage1: "<h3>Click on a card and then click on its match.</h3>" ,
    completionURL: "../next_block/next_block.html", // URL to proceed to after the block ends
    scoreLabel: "Matches",
    correct_sound: "audio/correct.wav" ,
    timed: 1 ,  // Change to 1 if you want the game to be timed
    seconds: 60, // Number of seconds if game is timed.
    successText: "You win!"

}
  • completionURL – you’ll see this in every block. It is the URL where you want to go on the completion of this assessment.
  • scoreLabel: You probably just want to leave this as “Matches” unless your game is in a language other than English. This label shows at the top of the screen next to the number of matches found.
  • correct_sound: Audio that plays when a match is found. You can leave this as is or replace with your own file you copy into the audio folder.
  • seconds: How many seconds the player has to find all of the pairs.
  • successText – Message shown when the player has found the number of matches.

Cards Array

The cards array object gives the images and alt text for the characters. It’s very simple to modify.

  • card_front1: Give the link to the image for one card in the pair.
  • alt: Provide alt text for the image.
  • card_front2: Give the text for the second card in the pair.
const cards_config = {
    card_array: [
        {
            card_front1: "images/cake.jpg",
            alt: "cake",
            card_front2: "el pastel"
        },
        {
            card_front1: "images/corn.jpg",
            alt: "corn",
            card_front2: "el maíz"
        },
        {
            card_front1: "images/donut.png",
            alt: "doughnut",
            card_front2: "la dona"
        },
        {
            card_front1: "images/eggs.jpg",
            alt: "eggs",
            card_front2: "los huevos"
        },
        {
            card_front1: "images/grapes.jpg",
            alt: "grapes",
            card_front2: "las uvas"
        },
        {
            card_front1: "images/milk.jpg",
            alt: "milk",
            card_front2: "la leche"
        },
        {
            card_front1: "images/strawberry.jpg",
            alt: "strawberry",
            card_front2: "la fresa"
        }
    ]

Similar Posts

  • Get an Animal

    This is an assessment and game block that is very popular with young players. For each correct math question, the player gets another animal or item for their animal. Math questions can be multiplication, division, addition or subtraction. Division problems will all have a whole number quotient, with no remainder. Division can also include converting fractions to a whole number, as shown in the example below.

  • Splash Block

    Every game needs to start with a splash screen. The only requirements for the Blocks user (you!) to provide are your game title, an image for the splash screen and the link for the start of your game. Your splash screen will have an image, the title of your game and a play button. When the player clicks on the play button, they’re taken to the beginning of your game. Optionally, a sound can play as the splash screen fades out and the first screen fades in.

  • Tic Tac Toe

    This is a combination assessment and game block that is very popular with young players. It’s also 100% accessible for visually-impaired players. For each correct math question, an item is earned, which can be a rabbit, a key or anything else you can imagine. Incorrect answers get a different item – an empty snare or a lock, for example. Math questions can be multiplication, division, addition or subtraction.

Leave a Reply

Your email address will not be published. Required fields are marked *