American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Python Game Development – Darin

March 11 @ 5:00 pm - 6:00 pm

What We Did Today:

  1. Made our birds wings flap by introducing a self.image_index variable to change the image from the images list
  2. Added a timer to make the flapping slower
  3. Tidied up our code by introducing a config.py file to hold variables used repeatedly in our code such as timers and WIDTH/HEIGHT
  4. Made our birds spawn from both right and left by introducing a RIGHT and LEFT variable, where we randomly assign a bird object one of these variables to make them spawn from either the right or left of the screen

Homework:

  • For your homework, make a new file called player.py, and use the player-1.png file to blit a bird in the middle of the screen
    
    You only need to initialize the player bird object inside of the bird.py __init__ method, so you don't have to create a method like create_player (I REPEAT, DO NOT CREATE A METHOD FOR THIS)
    
    However, you can use a pygame.sprite.groupSingle() for this player instead of pygame.sprite.group()

    when you are done submitting this, by Sunday night I will leave comments to your homework so you will need to update your project from the upper left, and if it asks you to merge, merge yours

Notes:

If you have any questions, feel free to email me at ddjapri@ayclogic.com

Details

Date:
March 11
Time:
5:00 pm - 6:00 pm
Event Categories:
,
Verified by MonsterInsights