American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

7 PM – Python Game Development

November 14, 2021 @ 7:00 pm - 8:00 pm

Today

  • We went over the homework.
  • We added a direction attribute to the player.
  • We updated the direction based on which way the player moves.
  • We flipped the image when the player is facing left, so the player is facing to the left when it’s direction is to the left.
  • We randomized which birds are generated.

Homework

  • Randomize which cloud image is loaded into the self.image attribute for the Cloud sprite, select randomly from “cloud1.png”, cloud2.png”, or “cloud3.png”. Use a similar technique to what we used for the Bird sprite.
  • Flip the bird image that’s used when the bird direction is to the LEFT. You can use a similar technique we used for the Player sprite.
  • Add a direction attribute to the fireball, and update the code where we create fireballs.
  • Pass the direction attribute from the self.player_sprite.direction attribute to the fireball when we create the fireball.
  • Move the fireball correctly based on the direction. Similar to how we move the other sprites based on the direction.
  • Flip the fireball image when it’s facing to the left.

Details

Date:
November 14, 2021
Time:
7:00 pm - 8:00 pm
Event Categories:
,
Verified by MonsterInsights