American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

1 PM – Python Game Development

March 26, 2022 @ 1:00 pm - 2:00 pm

Today:

  1. We went over homework to add the game over page.
  2. We went over how to reset the game after clicking the play button.
  3. We added logic to modify the map so that the enemy tank finds a faster path through the map after destroying some bullets.
  4. We used “copy.deepcopy” to make a copy of the MAP and store it in the self.map_copy attribute so that we can reset the MAP when clicking the play button again.

Homework:

  1. Add collision detection between the shield group and the enemy bullet group so the the shield protects the play from the enemy tank’s bullets.  The shield shouldn’t be destroyed when a bullet hits it, but the bullet should be destroyed.
  2. Add some logic so that the shield disappears after a certain number of frames, maybe 10 seconds or 400 frames.  You can use the similar technique we used before for timers e.g. in launching_bullet.
  3. Add some sounds effects when the player tank or enemy tank shoot a bullet.  Use the “assets/audio/TankFiring.wav” file.  You can use examples for previous projects how to load a sound and play it from a collided method/callback.

Details

Date:
March 26, 2022
Time:
1:00 pm - 2:00 pm
Event Category:
Verified by MonsterInsights