American Young Coder (AYC)

Loading Events

« All Events

  • This event has passed.

6 PM – Python Game Development – Sebastian

September 12, 2023 @ 6:00 pm - 7:00 pm

Today We Did
  1. Learned how to submit our homework (commit and push)
  2. Learned how to see previous class code (on Gitlab)
  3. Reviewed general architecture of most games: blit images inside an infinite loop
  4. Created basic Bird class & blitted to screen
  5. You can always find the code we wrote in class in my Gitlab repository here:
    https://gitlab.com/gsugiart/tue-6-pm-dragon-birdie/-/tree/TUE-6PM-Sebastian?ref_type=heads
  6. In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
  1. Homework: Please view my Github repository here to ensure you have all code up to date (I added a new line in bird.py after class to scale our bird to a smaller size).
    1. After you have the same code as I pushed to my branch, you should be able to see our background image along with a small bird on the top left corner of the screen.
    2. Recall that the update method inside our Bird class is constantly called inside our game loop in main.py. Any updates to the bird image on the screen will be made in this method.
    3. Your assignment is to try and make the bird move across the screen at the speed indicated by the “self.speed” attribute. Since this is “updating” the bird image on the screen, you will have to do it in the update method inside of bird.py.
    4. Hint: If you have the same code as I pushed to my branch, you only need to add one line of code inside of the update method.

Details

Date:
September 12, 2023
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights