Scratch journey 2: mini game and face sensing

Last week, I explored the Scratch world, trying different blocks and viewing different shared projects. I have learned some fundamental knowledge of Scratch and felt that Scratch is a powerful tool enabling users to make videos and even design games. 

MINI GAME


This week, I tried to apply what I learned to design a mini-game. Its name is Eat bubble. 

For the game concept, 

🔺 the main character is a yellow bubble

🔺 the goal is to eat up the running yellow bubbles and avoid touching bubbles with different colors

🔺 players can control the yellow bubble by pressing arrow keys
🔺losing three lives means game over


For the blocks,

 These blocks enable players to control the yellow bubble pressing arrow keys.

In this chunk, I set the original position, the size of the yellow bubble. Prior to this, I set the value of two valuables: life and ball. Then, the forever loop takes up the major part. In this loop, I have done many tasks. Task one is to detect the touching with Ball 3, which are the running balls. There is a nested conditional statement inside that "if touching the specific color". If yes, the yellow bubble will expand.
 I also state the conditions to end the game: the value of the ball or the value of life is 0.


In the Ball 3, which are the running balls. I utilize the blocks of creating clones, which I learned from last week's observation. I preset the attribute, like the color, position, size, and the action of a clone. Then create a couple of clones when the player clicks the green flag. What is important is that the detecting rule is applied here. If the bubbles with different colors touch the yellow bubble, the number of lives will decrease by one.



What I found interesting is that "touching" is an action with constraints. During experiments, I 
discovered that "(A)touching an object(B)" means A chases after B and touches it. In the situation where A is static and B run into A, the conditional statement will return false. The situation where A runs into B from the opposite direction as well. 


FACE SENSING

The extension I explored is face sensing. I found the blocks I can use are more than the other extensions, so I chose this one. First, I dragged out different blocks and try them in practice to figure out their functions. In the end, I use it to create an interactive project.




Comments

Popular posts from this blog

Scratch Mini-project: Simple MP4 & Remix