Secret Codes With Scratch 3 Makey Makey Extension

by MakeyMakey in Teachers > 4

6005 Views, 5 Favorites, 0 Comments

Secret Codes With Scratch 3 Makey Makey Extension

IMG-2590.JPG

Learn how to use the Makey Makey extension in Scratch 3 to create a secret code game.

Supplies

Design a Scratch Game With a Secret Code Concept

cd2db217ad78931007e5877db69bd79702718728655379635229.png
2f76daf23c72a82af02f58bcdfe0c0f015996155958272542367.png

Scratch 3.0 features a Makey Makey extension that allows you to create a program/game with a secret code. Eric Rosenbaum was inspired to make this extension from classic video games by Konami that often had secret codes to unlock extra lives, special powers, etc. The code varies, but generally includes using a combination of arrow keys.

Your mission, should you choose to accept it, is to create a game with a secret code that unlocks hidden items in Scratch.

For our example game, we've included a physical puzzle solving element to figuring out the secret code. (Think Breakout Edu style!)

Decipher the code, feed the bear, and then design and create your own game!

Use the Makey Makey Extension

01a8c28975f06ad79c6311644ae4bb1a04692640873747661551.png
cd2db217ad78931007e5877db69bd79713343867861533252614.png
579c47b43585a95242cd31172fe2037b47790393437981640687.png

In Scratch 3.0, click on Extensions and add the Makey Makey extension to your current project. After you add the extension, you'll see the Makey Makey logo beneath "My blocks."

There are multiple options here for secret codes. Including the original Konami code of:

up up down down left right left right

If you are happy with these codes, pick one and skip to the next step. If you want to make your own code, proceed to step 3.

Optional- Make Your Own Variable

4b4b30c4fbb28b3bdb8f257d58b68ff008590940002029232881.png
be8b25bfa1c2a45666b0fa4cba01c30a13744324504802826947.png

In the variable palette, create a variable for your secret code. Drag a "Set variable to____" to your workspace and connect it to a "When Green Flag Clicked" block (Picture 1). Inside the blank, type the code you want to be your secret code. For our game, we used "left up right down right up left" as our secret code. Rename or delete this block by right clicking on the variable. (Picture 2)

In the next step, we will drag the "my sequence" block into the Makey Makey extension block.

Make a Clue for Your Code

2f76daf23c72a82af02f58bcdfe0c0f005520865855042008136.png

This is actually probably one of the hardest and most fun parts of this creation process! You'll have to create a riddle or puzzle to help users figure out your secret code.

For our game, the secret code is:

left up right down right up left

So we made a coded question that should lead the player to the palindrome: taco cat. Once the player figures out the word, they have to transcribe the code to match taco cat and figure out the taco code!

Now the player can make tacos appear for the hungry bear!

You can decide if you want your players to tap out the word with Play Doh like our example, or just type the correct arrow keys.

Use Your Variable With Makey Makey Extension

my sequence6220711097934633324.gif

Once you've created a sequence, it is really easy to drag it into the adjustable spot in the Makey Makey block: "When ____ pressed in order"

After you set this up, you are ready to test it out and create your own secret code game!

Create Your Own Game!

25d40209fa9554ce7f244e0dc434094e08888287501867090324.png
f0b9d55cebd2b344b7037fdc232df98011422476429550369835.png
d83b743fa29c4dac49a0f80f56285ca942058947777094743555.png
c2b811479c917e1c57baa9dd6559a84556370275896736688789.png

After picking a background and characters, you'll have to decide what your secret code will do in your game.

In our example game, this secret code makes tacos appear randomly on the screen (Code in Picture 1.) The game's objective is for the bear to eat the tacos!

When the bear touches the taco, the costume changes and it sounds like the bear is eating the taco. (Eating Taco Code in Picture 2.)

We also created a "tacos eaten" variable to track how many tacos the bear eats. Once he eats enough tacos, the variable will signal the end of the game and trigger an eternal taco rain! (Trigger Code in Picture 3 and Taco Wizard signals you to create your own game in Picture 4.)

See the next step for raining taco code!

Bonus: Raining Tacos?

011282bc86de22eb6599c81fefd037ee0113902509557072947.png

Thanks to firefang16 for the original raining taco code!

In our game, we have the taco clone begin once the variable trigger reaches the correct number. To have a "raining taco" effect, we used this code from firefang16!

Trigger With Makey Makey

tacocat514825256928248692.gif

How will you design your secret code controller?

We hooked up a drawing of a d-pad for controlling the bear, and decided to also connect our arrow keys to the word T A C O.

T= left

A=up

C=right

0= down

While you can control this game with the word TACO, you can also play the game with the arrow drawings and then tap out taco cat on the Play-Doh.

What will you create?