Membuat Game Tangkap Bola Di Scratch | Video Pembelajaran Unik

Video Pembelajaran Unik
6 Dec 202409:55

Summary

TLDRIn this Scratch tutorial, the instructor demonstrates how to create a simple game where a bowl moves left and right to catch a falling ball. The project includes setting up variables, randomizing the ball's position, and programming the bowl's movement with keyboard controls. The score increases when the ball touches the bowl, and the ball reappears at the top after being hidden. Additionally, a coin sound is triggered each time the score is updated. The tutorial walks through each step, making it accessible for beginners to understand and follow.

Takeaways

  • 😀 Start a new Scratch project by removing the default sprite and adding a backdrop and two new sprites (bowl and ball).
  • 😀 Set the size of the bowl sprite to 150 and position it at the bottom of the screen.
  • 😀 Program the bowl sprite to move left and right using the keyboard arrow keys (right arrow for moving right, left arrow for moving left).
  • 😀 Create a variable 'score' and set it to 0 at the start of the project to keep track of the score.
  • 😀 Program the ball sprite to start at a random X position at the top of the screen when the green flag is clicked.
  • 😀 Use a forever loop to make the ball fall downwards, decreasing its Y position by 5 steps at each iteration.
  • 😀 Implement a repeat until loop to repeat the ball's falling action until it reaches the bottom of the screen (Y position < -180).
  • 😀 Make the ball reappear at the top after it reaches the bottom by resetting its position to random X and Y coordinates.
  • 😀 Program the ball to hide upon touching the bowl sprite and increase the score each time it makes contact with the bowl.
  • 😀 Use a coin sound effect whenever the score increases after the ball touches the bowl sprite.
  • 😀 Test the project to ensure that the ball properly disappears, reappears, and that the score increases with each touch, accompanied by the sound effect.

Q & A

  • What is the first step in setting up the project?

    -The first step is to open a new project and remove the default sprite.

  • How do you add sprites and backdrops to the project?

    -You add one backdrop and two sprites. In this case, the sprites are a bowl and a ball.

  • What size should the bowl sprite be set to?

    -The bowl sprite should be resized to 150 for its size.

  • How is the bowl sprite positioned on the screen?

    -The bowl sprite is positioned at the bottom of the screen after resizing.

  • How do you make the bowl move left and right?

    -You use keyboard events: the right arrow moves the bowl 10 steps to the right, and the left arrow moves it 10 steps to the left (with a negative value for left movement).

  • What does the 'when green flag clicked' event do for the bowl sprite?

    -It positions the bowl sprite at the center bottom of the screen when the green flag is clicked.

  • What is the purpose of the 'score' variable?

    -The 'score' variable keeps track of the score, starting at 0 when the project begins.

  • How is the ball's position determined when the green flag is clicked?

    -The ball's position is set to a random x-coordinate within a range of -240 to 240 and a y-coordinate of 180, which places it at the top of the screen.

  • How does the ball move after starting?

    -The ball moves down continuously, changing its y-coordinate by -5 in a forever loop, making it fall until it reaches the bottom.

  • How does the 'repeat until' block work for the ball's movement?

    -The 'repeat until' block ensures the ball falls until its y-coordinate is less than -180 (the bottom), after which the ball reappears at the top with a new random position.

  • What happens when the ball touches the bowl?

    -When the ball touches the bowl, the score is increased by 1, and the ball is hidden temporarily before reappearing at the top of the screen.

  • What sound is played when the score increases?

    -The 'coin' sound is played each time the score increases, signaling that the ball has touched the bowl.

Outlines

plate

このセクションは有料ユーザー限定です。 アクセスするには、アップグレードをお願いします。

今すぐアップグレード

Mindmap

plate

このセクションは有料ユーザー限定です。 アクセスするには、アップグレードをお願いします。

今すぐアップグレード

Keywords

plate

このセクションは有料ユーザー限定です。 アクセスするには、アップグレードをお願いします。

今すぐアップグレード

Highlights

plate

このセクションは有料ユーザー限定です。 アクセスするには、アップグレードをお願いします。

今すぐアップグレード

Transcripts

plate

このセクションは有料ユーザー限定です。 アクセスするには、アップグレードをお願いします。

今すぐアップグレード
Rate This

5.0 / 5 (0 votes)

関連タグ
Scratch TutorialGame DevelopmentEducational GameInteractive LearningCoding for KidsBall CatchingScratch ProgrammingGame DesignKids CodingFun Project
英語で要約が必要ですか?