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 under when run to properly initialize the game environment

The game doesn't start correctly. Compare your code with the example to fix the initialization.

  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 remaining 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 and variable setups.

  1. Look at the condition inside the "when a pressed" block. Compare it with the correct example and check the variable comparison.
  2. Check the position coordinates in the Hunter sprite creation block. Compare it with the correct example.
  3. Look at the block setting the Hunter sprite's size. Compare the size value with the correct example.
  4. Inspect the "set countdown to" block. Compare the countdown number with the correct example.
  5. Look for any missing bird spawning functions in the "when a pressed" block. Compare it with the correct example.
  6. Compare the variable initialization blocks at the bottom of the "when a pressed" block with the correct example.
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 sequence.

  1. Look at the first "if" condition inside the "at 1 seconds" block. Compare the value type with the correct example.
  2. Inspect the variable name used in the second "if" condition. Compare it carefully with the correct example.
  3. Check inside the "if countdown = 0" block. Compare the game over actions with the correct example to find 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 its value with the correct example.
  2. Check the sprite costume selected for the bullet in the "when space pressed" event. Compare it with the correct example.
  3. Open and inspect the "shootBullet" behavior definition. 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 for the bullet in the collision event and remove block. Compare it with the correct example.
  2. Check the block that modifies the sprite size on impact. Compare which sprite is being changed with the correct example.
  3. Inspect the logic handling what happens when the bird runs out of health. Compare it 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 right after the collision sound. 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 end of the green bird defeat sequence. Compare it with the correct example to see how the next bird is spawned.
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 when the black bird is hit. Compare it with the correct example.
  2. Check for the code handling the black bird's defeat. Compare your blocks with the correct example to find what is missing.
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 player movement controls in your workspace. Compare with the correct example and rebuild the missing movement 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