How to do catching apple game on pictoblox | Catching game on pictoblox
Summary
TLDRIn this video tutorial, the creator guides viewers through the process of making a simple apple-catching game using Piktoblocks. The game involves controlling a bowl to catch apples while avoiding obstacles. The script covers the basic steps, such as choosing sprites (apple and bowl), setting up the backdrop, and writing code for movement and interactions. Key features include using keyboard inputs to control the bowl, randomly placing apples, scoring, and displaying a 'Game Over' screen when the player loses. The tutorial offers step-by-step instructions for both coding and customizing the game's visual elements.
Takeaways
- 😀 The game involves catching apples with a bowl using Piktoblocks.
- 😀 The first step is to delete the default sprite (Toby) and add two new sprites: apple and bowl.
- 😀 A backdrop called 'Blue Sky' is chosen for the game environment.
- 😀 The bowl is programmed to move left and right based on the player's arrow key inputs.
- 😀 The apple falls from a random position on the screen and moves downwards continuously.
- 😀 The player's score increases when the bowl catches an apple, tracked by a variable.
- 😀 A life system is implemented, where life decreases when the apple touches the ground.
- 😀 The game ends when the player's life reaches 0, and the backdrop switches to 'Game Over'.
- 😀 If the player catches enough apples and scores 10 points, the game switches to a 'You Win' backdrop.
- 😀 The script uses broadcast messages to trigger events like hiding the bowl and stopping all actions once the game is over.
Q & A
What is the first step in creating the catching apple game in Piktoblocks?
-The first step is to delete the 'Toby' sprite and choose two sprites for the game: the 'Apple' and 'Bowl'.
How does the bowl move in the game?
-The bowl moves using the left and right arrow keys. The 'change x by' block is used to move it left or right depending on which arrow key is pressed.
What happens when the green flag is clicked in the game?
-When the green flag is clicked, the bowl sprite goes to a specific position on the screen, and the game starts with the bowl visible.
How is the apple's position controlled in the game?
-The apple's position is randomly generated using the 'pick random' block for the x and y coordinates. It will move downwards by changing its y-position each time.
What happens when the apple touches the mouse pointer?
-When the apple touches the mouse pointer (which represents the bowl), the score increases by 1, and the apple resets to a new random position.
How is the score updated in the game?
-The score is tracked with a variable called 'score'. Every time the apple is caught by the bowl, the score increases by 1.
What happens if the apple touches the ground in the game?
-If the apple touches the brown ground area, the player's life decreases by 1. The 'life' variable tracks how many lives the player has left.
How is the life of the player managed in the game?
-The player's life is managed using a 'life' variable, which starts at 5. Each time the apple touches the ground, the life decreases by 1. If life reaches 0, the game ends.
What triggers the 'Game Over' backdrop in the game?
-The 'Game Over' backdrop is triggered when the 'life' variable reaches 0. At this point, the game switches to a 'Game Over' backdrop, and the bowl sprite hides.
What happens when the player reaches a score of 10?
-When the score reaches 10, the game switches to the 'You Win' backdrop, indicating that the player has won.
What are broadcast messages used for in this game?
-Broadcast messages are used to communicate between sprites. For example, the 'broadcast' block sends a message to trigger the 'Game Over' or 'You Win' states, which also involves hiding the bowl sprite and stopping the game.
Outlines

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.
قم بالترقية الآنMindmap

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.
قم بالترقية الآنKeywords

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.
قم بالترقية الآنHighlights

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.
قم بالترقية الآنTranscripts

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.
قم بالترقية الآنتصفح المزيد من مقاطع الفيديو ذات الصلة
5.0 / 5 (0 votes)





