American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

9 AM – Python Game Development

August 29, 2020 @ 9:00 am - 10:00 am

  1. We randomize of which bird image to create.
  2. We went over how to delay the creation of birds in Birdie game.
  3. Next week is a labor day weekend, so no class.
  4.  Homework:
    1. Inside cloud.py do the following
      1. Change BIRD_TYPE to CLOUD_TYPE and change the list element to cloud1, cloud2 and cloud3
      2. Chose a random element from this list so we can display a random image everytime.
      3. Change the code that would load the bird image into loading the cloud image. Replace the code that looks like this self.imageA = pygame.image.load(f”assets/{self.random_bird_type}_A.png”)
      4. Remove the code that would resize the bird.
    2. Inside main.py do the following
      1. on the top of the file, import cloud class. Look at how we imported the Bird class.
      2. Inside __init__ function, create cloud_group. Look at how we did bird_group.
      3. Create a function “create_cloud”. Look at how we did “create_bird” function. Create a new timer variable for cloud. Create “create_cloud_timer”. Don’t use create_bird_timer variable.
      4. Inside game_loop(),
        1. call create_cloud()
        2. call cloud_group.update()

Details

Date:
August 29, 2020
Time:
9:00 am - 10:00 am
Event Categories:
,