- This event has passed.
7 PM – Advanced Python Game Development
September 22, 2021 @ 7:00 pm - 8:00 pm
Today
- We started the tank game project.
- We added a PlayerTank sprite and got it moving on the screen.
- I’ve uploaded the source code here.
Homework:
- Currently we only have an images_right attribute. Add 3 more attributes, images_up, images_left, and images down which should contain the tank chassey facing the correct directions. You can transform an image to rotate it 90 degrees counter-clockwise with this function:
-
pygame.transform.rotate(l_image, 90)
-
- Add another sprite for the bricks. You can use the file “Brick.png”
- Put the Tank turret on top of the tank chassey. You can use the “PlayerTank_2_1_Turret_0” image, don’t need any animation yet but the position of the turret should be in sync with the tank chassey as it moves.