Mole Game With Pinoo
Purpose of the Project: We will try to catch our puppet with our wooden hammer in our mole game that we will make in Scratch 2 program. We will use our Pinoo Minoo card for this.
Duration: 2 lessons
Age Group: 11 years and over
Pinoo Set: Pinoo Minoo Set
• Learns to code Pinoo Minoo card.
• Improves the skill of setting up algorithms.
• Improves coding skill.
Materials to be used: Scratch 2 program, Pinoo Minoo board, alligator cables, connection cable.
Materials Required for Design: Aluminum foil, tongue stick, dish sponge, jar lid, utility knife, silicone gun and silicone.
For our project, we first create our hammer.
Then we fix the tongue stick to the dish sponge with the help of a silicone gun.
We cover the jar lids with aluminum foil with our wooden hammer. In this way, our design part is completed.
First we wipe our cat puppet.
We click on the ‘’draw new decor’’ option to draw the background in our own game.
In the window we see, we draw a line with our line tool as a green hill.
Then we paint the lower part of our line to green and the upper part to sky blue with the fill with color tool.
For the mole nests, we draw mole nests using the ellipse tool.
Then we add the dummies we downloaded to our computer with the option to select from the computer.
Our puppets have been added this way.
Every time we hit our mole puppet with a hammer, we create a variable from the Data & Block section to keep our score numbers and call our variable score.
We start coding with our hammer puppet. Our game will start with the event when the green flag is clicked. We say our score is 0. Then, after putting our hammer puppet where we want it to be at the start of the game, we add the filter code from the action menu.
Then we add the continuous repetition cycle, and we ensure that it returns to where it will go, that is, to where it started after hitting the mole, again by adding our filter code. If the w key is pressed, we are adding the condition block. That means if we hit the 1st slot with a hammer.
Then, if our condition is met, our hammer will go to the 1st slot and turn 90 degrees, that is, the mole will hit our puppet's head and then turn 90 degrees to the opposite direction again. Then we make it return to its original place with the filter code.
Another is that if our condition block is pressed the a key, that is, if we hit the 2 nd slot with our hammer, we put it where our hammer will go and put the filter code from the movement menu without changing the values. Again, as we did in our code blocks above, we make the rotation operations and place the same code at the starting point again to go to the starting point.
We do the same by adding the s letter, that is, the condition block if slot 3 is hit with our hammer.
We are adding a new green flag event code. Then we add our loop code with continuous repeat, in it we add our code if the mole touches our puppet, our condition block. If it's worth our score will increase by 1 and a sound will play. When the contact process takes a long time, we add our 1.5 seconds wait code so that our score does not increase by more than 1.
In our game, we define a variable named duration to add a time limit and keep our time values.
We start writing our codes into our mole puppet. Under the green flag code, we want our mole puppet to be hidden at first. Then we set our time variable as 30. We also start counting down time inside the continuous repeat loop.
To make our mole puppet randomly appear in the slots, we create a condition expression with our keep a number between 1 and 3 code. If the random number is equal to 1, after adding the view code to go to the 1st slot, we put our mole puppet in the 1st slot and add the go to point code from the action menu, and after waiting 1 second, we make it hide.
We do the same operations on the other randomly kept numbers as we do on the number 1. But the point to note is that the ‘’go’’ codes are different.
We choose the option to draw a new puppet to give feedback when our game is over.
In the window that appears, we write our text ‘‘Game Over, Score:’’ with our writing tool. We place it wherever we want on our stage. We place the indicator showing our score opposite our score text.
We encode our text puppet. We make it hide at the start of the game under the green flag code, and in the same way we add our code that hides the indicator showing our score.
Then we continue to code our mole puppet. Under the green flag code, we're adding a condition block inside the loop through the loop. If our time variable reaches 0, we tell our mole to hide. Then we create and release the finished news for our text puppet to hear.
We add the code that also shows the indicator showing our score value.
After waiting for a short time to do these operations, we add the code that stops our game, the ‘’stop all’’ code.
Then we continue to encode our text puppet again. When the news is finished, we add the "see" code to make it appear and finish our coding.
Working State of the Project:
Whichever jar lid we hit with our hammer in our mole game project, our hammer goes to that slot in our scratch game and we try to shoot our mole puppet.