- This event has passed.
1 PM – Python Game Development
March 26, 2022 @ 1:00 pm - 2:00 pm
Today:
- We went over homework to add the game over page.
- We went over how to reset the game after clicking the play button.
- We added logic to modify the map so that the enemy tank finds a faster path through the map after destroying some bullets.
- 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:
- 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.
- 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.
- 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.