Remix the Template

Goal: Create a copy of the template project to start debugging
  1. Click this link to remix the template: Remix Template

Initialize the Game

Goal: Fix the startup code to properly initialize the game environment

The game doesn't start correctly. Let's fix the initialization code.

  1. Look at the "when run" code block. Compare it with the correct example and see if you can spot what is missing with the background.
  2. Check the initialization blocks under "when run". Compare them with the correct example to make sure the game state is set up properly.
Initialize the Game

Fix the Start Game Logic

Goal: Correct the "when a pressed" event to start the game properly

The game doesn't start properly when pressing A. Let's fix the logic.

  1. Look at the condition inside the "when a pressed" block. Compare it with the correct example.
  2. Check the location of the Hunter sprite in the "make new sprite at" block. Compare it with the correct example.
  3. Look at the block that sets the Hunter sprite size. Compare the size value with the correct example.
  4. Inspect the "set countdown to" block. Compare the countdown value with the correct example.
  5. Check for any missing function calls inside the "when a pressed" block. Compare it with the correct example.
  6. Compare all the initial variable blocks in the "when a pressed" section with the correct example to find what else is missing.
Fix the Start Game Logic

Fix the Timer Logic

Goal: Correct the timer event to count down and end the game properly

The timer isn't working correctly. Let's fix the countdown and game over logic.

  1. Look at the first "if" condition in the "at 1 seconds" block. Compare the value type with the correct example.
  2. Check the variable name used in the second "if" condition. Compare it carefully with the correct example.
  3. Look inside the "if countdown = 0" block. Compare the actions with the correct example to see what is missing.
Fix the Timer Logic

Fix the Shooting Mechanism

Goal: Correct the space key logic and bullet behavior to shoot properly

The shooting mechanism isn't working correctly. Let's fix the space key event and the shoot behavior.

  1. Look at the condition inside the "when space pressed" block. Compare the variable and value with the correct example.
  2. Check the sprite costume selected for the bullet in the "when space pressed" code. Compare it with the correct example.
  3. Open and inspect the "shootBullet" behavior. Compare the blocks inside it with the correct example.
Fix the Shooting Mechanism Fix the Shooting Mechanism

Fix the Oren Bird Collision

Goal: Correct the collision logic when a bullet touches the orange bird

The orange bird collision isn't behaving correctly. Let's fix the collision event.

  1. Look at the sprite selected in the "when touches" header and the remove block. Compare the bullet sprite with the correct example.
  2. Check the block that changes sprite size. Compare which sprite is being resized with the correct example.
  3. Look at the variable name in the block that changes countdown. Compare it with the correct example.
  4. Inspect the block that updates the score when orenBirdHp reaches 0. Compare the operation with the correct example.
  5. Check the condition for spawning the green bird. Compare the boolean check with the correct example.
Fix the Oren Bird Collision

Fix the Green Bird Collision

Goal: Correct the collision logic when a bullet touches the green bird

The green bird collision isn't behaving correctly. Let's fix the collision logic.

  1. Look at the variable being changed when the bullet touches the green bird. Compare it with the correct example.
  2. Inspect the block that updates the score inside the "if greenBirdHp = 0" block. Compare the operation with the correct example.
  3. Check the logic at the bottom of the "if greenBirdHp = 0" block for spawning the next bird. Compare it with the correct example.
Fix the Green Bird Collision

Fix the Black Bird Collision

Goal: Correct the collision logic when a bullet touches the black bird

The black bird collision isn't behaving correctly. Let's fix the collision logic.

  1. Look at the speed reduction condition in the black bird collision event. Compare it with the correct example.
  2. Check for the logic that handles when the black bird is defeated. Compare it with the correct example.
Fix the Black Bird Collision

Fix the Movement Controls

Goal: Rebuild the left and right movement controls for the Hunter

The player cannot move left or right. Let's rebuild the movement events.

  1. Look for the movement event blocks for moving left and right. Compare your workspace with the correct example and rebuild the missing blocks.
Fix the Movement Controls

🎉 Congratulations!

Great job! You've fixed all the bugs in the Bird Hunter game. The game is now fully functional!
🏆

Next challenge!

  1. Add a new type of golden bird that gives extra bonus points and bonus time
  2. Create a high-score display that persists between rounds
  3. Implement a power-up system where players can collect temporary speed boosts or multi-shot abilities
🚀
×
Zoomed view