top of page

Jump Jump Game

Purpose of the Project: Play to the pogo game with the distance sensor using the Pinoo Control Board  build the console.

Duration:  2 lessons

Age group:  7 years and older

Pinoo Set:  Basic set, invention set, maker set and full set.

Achievements:

  • Learn to code Pinoo control board

  • Learns to code the distance sensor.

  • Develops algorithmic skills.

  • Coding skills develop.

 

Materials to be used:  Mblock 3 program, Pinoo control card, distance sensor, connection cable.

 

 

Materials Required for Design:  Forex, scissors, glue gun, paint, double-sided tape.   

 

 

Project Construction:  

 

 

We cut a piece by drawing the snowflake shape we want on Forex. This piece will be our game console.

 

We fix the distance sensor to a place we want on our game console with the help of a silicone gun.

 

We decorate as we wish.

 

Let's make our connections. We place our Pinoo control card on the back of the game console and connect the distance sensor to the purple input number 5.

 

We have completed our connections, now let's move on to the coding part. We will use the mblock-3 application for this.

 

    Let's connect our Pinoo Control Card to the computer with the help of the connection cable and log in to the Mblock3 application. Then let's introduce our Pinoo Control Card to the computer. For this, firstly, from the Connect tab, select the serial port.  we click. Then we choose COM6. (The number may differ depending on the computer and the port.)  can show.)

     

    After making the serial port connection, let's choose the card we will use from the cards tab. We are working with the Nano model of Arduino.

     

    In order to add the Pinoo extension to our computer, we click on the Manage extensions option from the extensions tab. In the window that opens, we write “Pinoo” in the search engine and it is enough to say download to the result. Installed on our computer.

     

    We come to the extensions tab again and click on Pinoo. We will write our codes with the Pinoo extension.

     

     

    In the coding part, we will first design the game. For this, we delete the panda by clicking the right mouse button on the panda puppet. Then, by clicking on the new puppet button, we add the puppets named Penguin1, three Satr1 and Tree-Lights.

     

    To change the stage, we select the slopes stage by clicking the Select new decor from the library button in the Stage section.

     

    To start the game, we get the code when we click on the Green Flag from the Events menu. We want the penguin puppet we added to appear at a certain point at the beginning. For this, we first determine the starting position and get the x :12 y: -123 code block in the motion tab. Here, corresponding to x and y  The numbers may differ for you.

    Here we update it to x : 12 , y :-123.

     

    After placing the puppet at the starting point, all the operations will be repeated continuously until the game is over. For this, we get the repeat code block from the control tab. In the game, the penguin character will try to collect the snowflakes by jumping. Here, we will make the puppet jump using the distance sensor when we jump to our game console. If the distance sensor value is less than five, let the dummy jump  we want. For the if statement, we get the code block if from the control tab. To create the condition section, we get the expression less than from the operations tab. In the first box, we place the code block related to the distance sensor from the robots tab. We change the pin number to pinoo5. In the second box, 5  We write the number.

     

    We will make use of the coordinate system so that the puppet can move vertically (to appear as jumping). Since the vertical direction movement expresses the y axis in the plane, we get the command to increase y by 10 from the movement tab.  we are updating. Since it needs to do this for 0.5 seconds, the control  We get the wait 1 second command from the tab. We update the number 1 to 0.5. We take the command to increase y by 10 from the movement tab and update the number 10 to -50 so that the puppet whose height we have increased can come back to the ground (to the point where it came).

     

    We click on the Star1 puppet we added and we get the code when the Green Flag is clicked on the Events menu to start the things that need to be done at the beginning of the game. We want the snowflake to be able to randomly appear at different points in the scene continuously. For this, we start by taking the code block from the control tab, which is constantly repeated. When the snowflake comes to an edge on the stage, we will use the expression "seek" when it comes to the edge so that it does not get stuck there. When we come to the edge from the motion tab, we get the straight code block.

     

    In order for the puppet to appear at random points of the scene with 1 second intervals, we take the code block from the move tab to go to the mouse arrow and select the random scene point expression by clicking the tiny arrow next to the mouse arrow text. Do this for 1 second.  We get the code block from the control tab, wait 1 second for it to do throughout.

     

    We get the code when we click on the Green Flag from the Events menu to start other features that need to be done at the beginning of the game.

     

    While our penguin is jumping, if the snowflake is worth it, we want the snowflake to be hidden first and then to earn points. We will use variables to calculate a score. From the Data&Block tab, we click the Create a variable button and  We create a variable named score.

     

    In order to be able to reset the score at the beginning, we get the code block from the Data&Block tab so that the score is 0. In order to make the puppet visible at the beginning, we get the view command from the view tab. After the initial commands are completed, we get the code block from the control tab for the continuous repeat of the operations we will do.

     

    While the snowflake moves randomly, we want to earn points if it is worth the penguin. We will create a control block for this. We get the code block from the control tab, if any. In order to understand whether we have touched the Penguin1 puppet, that is, the penguin, we get the code block from the detection tab when it touches . We select the name Penguin1 by clicking the little arrow next to the box. If the condition is met, we first get the hide command from the view tab in order to hide the puppet and earn 1 point. Then we get the command to increase the score by 1 from the Data&Block tab.

     

    If our score is equal to 3, we want the game to be over. To create a condition expression, we first get the code block from the control tab, if any. To create the condition section, we get the expression equal from the operations tab. We place the score block from the Data & Block tab. Write the number 3 in the second box. In order to give feedback on the end of the game, we get the code block with a score of 0 from the Data & Block tab. We change the expression 0 to GAME OVER. To end the game, we get the stop all code block from the control tab.

    *** We complete our game by writing the same codes to the other two snowflake puppets.

     

     

    After completing our codes, we fix the console on the monitor with double-sided tape. We check the operation of our game by clicking on the green flag.

    • The snowflakes must be moving in random directions,

    • The penguin must be jumping when the sensor sees our hand,

    • Every time the snowflake touches the penguin, we should earn 1 point. ∙ When our score is 3, the game must be over.

    1.jpg
    2_462b81ba-15ba-4948-bf09-871444246e3d_480x480.jpg
    3.jpg
    4.jpg
    5.jpg
    6.jpg
    seri_port_480x480.jpg
    KART_480x480.jpg
    pinoo_uzanti_480x480.jpg
    1_a8314da2-edff-4525-979d-b2d3ff93364b_large.png
    pinooo_480x480 (2).jpg
    12.JPG
    13.JPG
    16.JPG
    19.JPG
    21.JPG
    24.JPG
    25.JPG
    26.JPG
    27.JPG
    30.JPG
    33.JPG
    36.JPG
    37.jpg
    bottom of page