Han

Han Ferik

Home | Projects | AP CSA

Project Memory Card

Tools: Scratch | Source Code: GitHub

Cat Memory Cards is a fun and engaging game designed to sharpen your memory while enjoying adorable cat images. The objective is simple: players take turns flipping over two cards at a time to find matching pairs of cats. The game starts with all cards facedown, and as players reveal cards, they must remember the location of each one in order to match them with their pairs later on. The game can be played solo or with others, making it a great option for all ages to bond over their love of cats.

I looked up for the idea for Cat Memory Cards while searching for a game online for my AP CSA Project from a developer called ShiftClickLearn. Developing this game involved working with dozens of unique cat images and refining the logic for tracking card flips and matches. I also focused on building an intuitive user interface that was simple enough for kids but still challenging for adults. Working on this project was a rewarding experience, and it inspired me to explore more creative, memory-based games in the future!

The memory card game involves shuffling a set of cards and asking players to find pairs by remembering their locations. In this game, called "Meow Match," players match cat-themed cards. Special "Mystery Cats" add unique effects to increase the game's excitement and challenge. Cards are shuffled to randomize their positions. Shuffling animations make the transition visually appealing. The shuffling process uses a grid system and variable setup to arrange cards randomly. Players reveal cards one by one, trying to find pairs. Correct matches are scored, while incorrect matches are handled with a fail animation. Only two cards can be revealed at a time to maintain the memory challenge. Mystery Cats have special effects such as revealing all cards or affecting the player’s health. They are introduced randomly and add an element of surprise. Visual effects enhance interactions, such as card reveal animations and size changes. Special effects are applied when matches are made or when mystery cards are interacted with. Create a background sprite with a simple movement script to return to the starting position. Design card sprites with various cat images and implement a variable for their width, height, and total number. Use a grid system and variables like 'total width' and 'total height' to shuffle and arrange cards randomly. Implement a shuffling animation to mix up the card positions. Introduce a variable called isSelected to track if a card has been clicked. Set it to false initially. When a card is clicked, it reveals its image. Use the if-else condition to ensure mystery cards are handled correctly. Use variables cardSelected1 and cardSelected2 to store the clone IDs of the selected cards. Allow only two cards to be revealed at a time to maintain game balance. Implement an endMatch broadcast to check if the selected cards match and provide feedback. If the selected cards match, trigger a success animation and delete the matched cards. If they don't match, trigger a fail animation (e.g., shaking cards) and unselect them after a brief pause. Randomly introduce Mystery Cats into the game by replacing pairs of regular cards. When a Mystery Cat is clicked, it performs a special animation, reveals a message, and then deletes itself. Ensure that the usingMysteryCat variable is set to false to prevent multiple activations. Adjust the pick random range to be half of the total area to optimize performance, especially when dealing with smaller areas. Add animations for successful matches (e.g., changing size or brightness) and for handling failed attempts (e.g., shaking the cards). Implement visual feedback effects to enhance player experience. Ensure a continuous game loop to handle player input, update game state, and render the game world efficiently. Use variables like isSelected and cardSelected to manage the game state and track card selections. Utilize event handling blocks such as when this sprite clicked to detect player actions and trigger the corresponding game responses. Use cloning to create multiple instances of the card sprites, managing their appearance and behavior. This guide provides a structured approach to developing a memory card game in Scratch. By following these steps, you can create a fun and engaging game with card matching mechanics, special mystery effects, and smooth animations. Feel free to adjust the specifics according to your preferences and additional features you might want to include!


Find me on the interwebs!

Github LinkedIn Instagram Facebook