Lecture: 13 | MAKE SHOOTING GAME IN SCRATCH
Summary
TLDRIn this tutorial, Ofran demonstrates how to create a shooting game using Scratch 3.0. The video walks through essential steps including selecting backdrops, creating a gun sprite, programming mouse movement, and adding sound effects. It also covers setting up additional sprites like a parrot, implementing variables for score, speed, and missed shots, and using broadcast messages to manage sprite actions. Ofran further explains how to control game over conditions, handle scoring, and add background music for a dynamic experience. The game increases in speed and complexity as players progress, providing an engaging interactive project.
Takeaways
- 😀 The project begins with selecting and setting up a backdrop for the game, using 'Blue Sky' and creating a 'Game Over' backdrop.
- 😀 The gun sprite is created by painting a simple shape and coding it to move with the mouse pointer when the green flag is clicked.
- 😀 The gun sprite is also programmed to play a 'crunch' sound whenever the player clicks the left mouse button.
- 😀 The parrot sprite is added and resized to fit the game, and its costumes are set to change every 0.5 seconds.
- 😀 The initial position of the parrot is set to random locations, with rotation set to 'don’t rotate' to keep it facing one direction.
- 😀 Three variables are created: score, speed, and missed shots, with initial values set to 0 for score and missed shots, and 5 for speed.
- 😀 The parrot sprite moves horizontally based on the speed variable, and when it reaches the edge of the screen, it resets to a random position.
- 😀 Clicking the parrot increases the score by 1 and the speed by 0.2, while also playing a sound effect.
- 😀 The game includes a condition to detect when the player misses three shots, which triggers the 'Game Over' backdrop and stops all scripts.
- 😀 The background music is set to loop continuously throughout the game to enhance the gaming experience.
Q & A
What is the first step in creating a shooting game in Scratch 3.0?
-The first step is to open Scratch 3.0, set up the interface with the stage, sprite area, and backdrop selection, then choose a backdrop (e.g., Blue Sky) and remove any unnecessary sprites.
How do you add and set up the gun sprite in the game?
-To create the gun sprite, click on 'Choose a Sprite' and select 'Paint'. Draw a red-outlined gun shape using the circle and line tools, then adjust the size and position it in the center. The gun sprite will follow the mouse movements and play a sound when the mouse is clicked.
What is the purpose of the 'mouse down' block in the gun sprite's code?
-The 'mouse down' block detects when the left mouse button is clicked. It triggers the gun to play a 'crunch' sound whenever the user clicks on the stage.
How do you make the gun sprite follow the mouse cursor?
-To make the gun sprite follow the mouse, use the 'go to mouse pointer' block under the 'forever' loop, which ensures the gun continuously moves with the mouse.
Why is the parrot sprite's costume changing every 0.5 seconds?
-The parrot sprite’s costume changes every 0.5 seconds to simulate the parrot flying, providing a dynamic and engaging visual effect during the game.
How do you make the parrot sprite move across the screen?
-To make the parrot sprite move, set its initial position using the 'go to x' and 'go to random position' blocks. Use a 'forever' loop with the 'move' block to make it move across the screen, and ensure it resets its position when reaching the edge.
What is the role of the three variables: score, speed, and missed shots in the game?
-The 'score' variable tracks the player's score based on successful shots, 'speed' controls the parrot's movement speed, and 'missed shots' counts the number of missed shots. The game ends when the player misses three shots.
How does the game handle missed shots?
-When the player misses three shots, the game switches to the 'Game Over' backdrop and stops all activities using the 'stop all' block, signaling the end of the game.
What happens when the player clicks on the parrot sprite?
-When the player clicks on the parrot, the score increases by 1, the parrot's speed increases by 0.2, a sound is played, and the parrot’s rotation is adjusted to point in the opposite direction before it glides back to its initial position.
Why is background music added to the game?
-Background music is added to enhance the gameplay experience, providing a more immersive atmosphere with a looping 'video game' sound that plays continuously during the game.
Outlines

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

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

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

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

このセクションは有料ユーザー限定です。 アクセスするには、アップグレードをお願いします。
今すぐアップグレード関連動画をさらに表示

cara membuat game space shooter di scratch │ tutorial scratch pemula

🎮 Membuat Game Hunting Bird di Scratch - Part 01

🎮 Membuat Game Hunting Bird di Scratch - Part 02

Balloon Shooting Game with Python

How to Make Collectible Items in Scratch | Tutorial

How to Make a Character Designer in Scratch | Tutorial
5.0 / 5 (0 votes)