Game Hungry shark bagian 1 | Tutorial Scratch

Kelas Jauh
3 Nov 202011:42

Summary

TLDRIn this engaging tutorial, the instructor walks viewers through creating a simple 'shark eating small fish' game in Scratch. The video covers how to design the shark and fish sprites, animate the shark to follow the mouse pointer, and make the fish disappear and reappear at random positions. The instructor explains each step with clear instructions, helping beginners learn game mechanics like sprite manipulation, animation, and event handling. The tutorial concludes by encouraging viewers to add their own features, such as a score counter and obstacles, to enhance the gameplay experience.

Takeaways

  • 😀 Start by deleting the default sprite (T-shirt Red) and add a shark sprite for the game.
  • 😀 Adjust the shark sprite's name and position to set it up correctly in the game environment.
  • 😀 Use basic motion blocks like 'Move 10 steps' and 'Point towards mouse pointer' to make the shark follow the mouse.
  • 😀 Implement the 'Forever' block to keep the shark moving continuously as long as the green flag is clicked.
  • 😀 Introduce an 'if' statement to control the shark’s movement, ensuring it only moves when touching the mouse pointer.
  • 😀 Create an animation for the shark eating the small fish by using different costumes (e.g., mouth opening).
  • 😀 Program the small fish to disappear when touched by the shark using the 'Hide' block.
  • 😀 Make the small fish reappear in a random position on the screen using the 'Go to random position' block.
  • 😀 Add a brief delay (e.g., 0.3 seconds) to avoid the fish reappearing too quickly after being eaten.
  • 😀 Change the appearance of the fish by using 'Next costume' to create variety and enhance the game experience.
  • 😀 Encourage students to customize the game further by adding additional features like score tracking or obstacles for more challenge.

Q & A

  • What is the purpose of the 'point toward' block in this game?

    -The 'point toward' block makes the shark sprite follow the mouse pointer. This ensures the shark always moves in the direction of the mouse, simulating the behavior of the shark chasing the pointer.

  • Why does the shark stop moving when it touches the mouse pointer?

    -The shark stops moving when it touches the mouse pointer due to the 'if' condition in the script, which checks if the shark is not touching the pointer. If it is, the shark halts its movement, giving the effect of the shark 'pausing' when it reaches the mouse.

  • How can we make the shark move when not touching the mouse pointer?

    -To make the shark move when not touching the mouse pointer, an 'if' condition is used with a 'not touching mouse pointer' check. This allows the shark to continue moving freely unless it is touching the pointer.

  • What is the purpose of the 'forever' loop in the script?

    -The 'forever' loop ensures that the shark's movement and other actions continue running indefinitely. It repeats the movement and check conditions continuously throughout the game, making the behavior seamless during gameplay.

  • Why is there a need to change the fish's costume when it is eaten?

    -Changing the fish's costume when it is eaten helps to animate the action, giving the player feedback that the shark has successfully consumed the fish. It also enhances the visual appeal by simulating the opening and closing of the shark's mouth.

  • What is the 'go to random position' block used for in the game?

    -The 'go to random position' block is used to make the fish reappear at a different location on the screen after being eaten by the shark. This adds randomness to the game and makes it more challenging as the player must catch the fish in various locations.

  • How can we control the speed of the fish disappearing and reappearing?

    -The speed of the fish disappearing and reappearing is controlled by using the 'wait' block after the 'hide' and 'go to random position' blocks. This adds a delay between the fish hiding and showing up in a new location, preventing it from happening too quickly.

  • What additional features could be added to this game in the future?

    -Future features could include adding a score counter to track the number of fish eaten, health points or lives for the shark, and obstacles like other fish or objects to avoid. The game could also be made more difficult by increasing the shark's speed or introducing new fish with different behaviors.

  • How do you add sound effects to the game?

    -Sound effects can be added by using the 'Sound' blocks in Scratch. These blocks allow you to play specific sounds when certain actions occur, such as when the shark eats a fish or moves. Sounds help improve the game experience and make it more interactive.

  • Why is it important to use the 'not' operator in the shark's movement script?

    -The 'not' operator is used to invert the condition, meaning the shark will move freely only when it is not touching the mouse pointer. Without this, the shark would stop moving as soon as it reached the mouse, making the gameplay feel unnatural and static.

Outlines

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Mindmap

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Keywords

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Highlights

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Transcripts

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant
Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
Shark GameTutorialCoding for KidsScratch ProgrammingAnimationGame DevelopmentVisual ProgrammingInteractive LearningEducational VideoKid-Friendly
Besoin d'un résumé en anglais ?