American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

1 PM – Python Game Development

June 4, 2022 @ 1:00 pm - 2:00 pm

Today:

  1. We went over the homework to add custom shooting tower images and collision detection logic between bullets and enemies
  2. We added logic so different towers shoot their corresponding bullet images.
  3. We added a coins indicator showing the number of coins left.
  4. We added an indicator for each tower for purchase to show its cost
  5. We added logic so as each tower is purchased it detects the number of coins available

Homework:

  1. Add logic so that each enemy that gets killed increases your “self.coins” attribute by the “self.coin_drop” in each enemy.  Define a new method called “self.handle_bullet_enemy_collision” and make sure it gets called from the “pygame.sprite.groupcollide” function to increase your number of coins.
  2. Add a health indicator that shows the amount of health YOU have before losing the game.  This should be similar to the coins indicator, you can call it “draw_health”.
  3. Add a health indicator to each enemy that shows the amount of health left for each enemy given by the “self.health” attribute in each enemy.  This should follow the enemy along similar to how the price indicator follows the floating tower for purchase as you move it:

Details

Date:
June 4, 2022
Time:
1:00 pm - 2:00 pm
Event Category:
Verified by MonsterInsights