American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

1 PM – Python Game Development

February 6, 2021 @ 1:00 pm - 2:00 pm

  • We went over the homework to make the birds’ speeds random.
  • We created a “direction” attribute for the Bird and made it move to the left and right.
  • We made the Bird start on the right hand side of the screen if the direction is to the left.
  • We flipped the Bird if it’s moving to the left.
  • I’ve updated the source code here.
  • Your homework is to create a “Cloud” sprite:
    • Copy and paste the Bird Sprite to create a new Cloud class which inherits form Sprite.
    • You don’t need as many parameters for Cloud, only x, y, and screen.
    • You can simplify the update method for the Cloud so it always moves to the right.
    • Create a new cloud object and add it to a new cloud_group sprite Group object. Then make sure cloud_group update method is called from inside the forever loop so the cloud gets updated.
  • There is no class next week because of President Day weekend and Chinese New Year weekend.  The next class is on Saturday, February 20.

Details

Date:
February 6, 2021
Time:
1:00 pm - 2:00 pm