- This event has passed.
7 PM – Python Game Development
December 5, 2021 @ 7:00 pm - 8:00 pm
Today
- We went over the home fix the cloud position offset.
- We added the hitbox/rect attribute for the bird and fireball sprites.
- We added collision detection between the birds and sprites.
- We also added a cooldown delay to slow down the creation of fireballs when the player presses the “f” key.
- I’ve uploaded the source code here.
Homework
- Add a “self.rect” attribute inside the player class, using the width and height of the first image. Visualize the hitbox by drawing it on the screen using the same technique we used for the bird and fireball.
- Add collision detection between the bird and the player. When the player is hit by any bird, then the player should disappear.