American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Python Game Development – Joel

April 4 @ 6:00 pm - 7:00 pm

Today we did:
  1. We made the homework (making the hitboxes) and started with the fireball class.
Homework:
  1. Create a new method called launch_fireball in main. It’s job is to make sure if the space key is pressed, it will create a fireball (you can choose a random coordinate, size can be around 50, and a random direction) and add it to the fireball group. In the game loop, don’t forget to call this function and also update the fireball group.
  2. There will be an error because in the fireball class, the self.rect accidentally took from self.image[0].get_width() and self.image[0].get_height(). Because we only have one image for the fireball, self.image is not a list, and so we cannot use “[0]”. You can simply remove it and the fireballs should spawn fine.
  3. The point of the homework is just to spawn the fireball in one place and see if it works.
  4. If you have any questions, feel free to email me at joel@ayclogic.com.

Details

Date:
April 4
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights