American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Python Game Development

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

  • We went over homework and finished adding delay to how often the bird is created and made the bird class select from one of the 4 different bird images.
  • We made the birds move at random speeds
  • We added logic to make the bird “flap” its wings by alternating between imageA and imageB.
  • You can find the code here.
  • Your homework is to create a new “Cloud” sprite.
    • You should inherit Cloud from Sprite similar to how we created Bird.
    • The cloud should be created like Cloud(x, y, screen) or something similar.
    • Use pygame.image.load to create an image to draw on the screen.
    • Draw the cloud on the screen inside the “update” method using the “self.screen.blit” method.
    • Create one or more clouds and add them to a cloud_group sprite “Group”.  Then make sure to call the self.cloud_group.update() to draw the cloud(s) on the screen.

Details

Date:
January 20, 2021
Time:
7:00 pm - 8:00 pm
Event Categories:
,