« All Events
6 PM – Python Game Development – Sebastian
September 12, 2023 @ 6:00 pm - 7:00 pm
Today We Did
- Learned how to submit our homework (commit and push)
- Learned how to see previous class code (on Gitlab)
- Reviewed general architecture of most games: blit images inside an infinite loop
- Created basic Bird class & blitted to screen
- You can always find the code we wrote in class in my Gitlab repository here:
- In case you need anything, feel free to email me at firstname.lastname@example.org
- 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).
- 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.
- 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.
- 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.
- 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.