American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

1 PM – Python Game Development

February 12, 2022 @ 1:00 pm - 2:00 pm

Today:

  • We went over the homework to rotate the shield.
  • We added animation to the exploding brick.
  • We oriented the bullet so it’s facing the correct direction using the angle passed by the turret.

Homework:

  • Modify the Brick sprite constructor to add an additional parameter type that has value either WALL_FLAG or BORDER_WALL_FLAG.  When WALL_FLAG is passed in the constructor, use the current logic to load the red brick image, but when BORDER_WALL_FLAG is passed load a  different image, “IronWall.png”.  You can find this image here: Or at gitlab here.
  • Modify the create_map method so that when the cell_type is a BORDER_WALL_FLAG, then create a Brick is passed with the type parameter BORDER_WALL_FLAG, but when it’s wall type  is WALL_FLAG, then the Brick is created with the type parameter WALL_FLAG.  Add the bricks created with the border wall flag to a separate sprite group so that they can’t be destroyed by the bullets.
  • Modify the MAP variable in config.py so that the top side, bottom side, and left and right sides of the map have the BORDER_WALL_FLAG value. Make sure that these get created on the screen using the create_map method:
  • Bonus: move the bullet in the correct direction based on the direction parameter that gets passed in from the turret.  Also center the bullet so that when it’s created, the center of the bullet is equal to the center of the turret.

Details

Date:
February 12, 2022
Time:
1:00 pm - 2:00 pm
Event Category:
Verified by MonsterInsights