American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

7 PM – Advanced Python Game Development

October 20, 2021 @ 7:00 pm - 8:00 pm

Today:

  • We went over the homework to add the bullet.
  • We went over the problem with centering the turret.
  • We fixed the problem centering the turret by drawing it with respect to the center of the image.

Homework

  • Add collision detection between the bullet and the bricks:
    • Add self.rect attributes to both the bullet and the bricks.
    • Use pygame.sprite.groupcollide to detect when bullets and sprites collide.
    • When they collide both the bullet and the bricks disappear
  • Add animation so that when the brick is destroyed, it explodes into fragments.
    • Load all the Brick fragment frames from “Bricks/Bricks_0x.png”.
    • Use get_next_image technique to animation the destruction of the brick.
    • When the animation gets to the final frame call “self.kill” so the animation doesn’t repeat.

Details

Date:
October 20, 2021
Time:
7:00 pm - 8:00 pm
Event Category:
Verified by MonsterInsights