American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Python Game Development

July 17, 2020 @ 6:00 pm - 7:00 pm

  1. We learned how to put a cool-down period in launching fireball.
  2. We fixed the problem where the fireball is only moving to the right.
  3. We added background music to the Birdie.
  4. Homework:
    1. Start the Birdie game, while the player is facing right, continuously press the space key for 30 seconds. This will launch fireball for 30 seconds and the fireball will be going to the right. Make sure the fireball is only going in the right direction (not left).
    2. Leave the project open for 5 to 10 minutes. You will notice that the fireball starts to appear from the left. This is because when the fireball leaves the screen from the right, they don’t magically disappear. They are still there in the memory until you explicitly kill. If you don’t kill your fireball, after it leaves the screen, your game can be slow.
    3. In the Fireball class inside the update function, put a code that if the x is less than 0 or if x is greater than the width of the screen do “self.kill()” . This will ensure the fireball is removed when it leaves the screen.

Details

Date:
July 17, 2020
Time:
6:00 pm - 7:00 pm
Event Categories:
,