« All Events
1 PM – Python Game Development
June 12, 2021 @ 1:00 pm - 2:00 pm
- We went over the homework to add in the make player move up when pressing the space key and added an upper coin
- We added in gravity
- We added hitboxes for the player, coin and made coins disappear on collisions.
- I’ve uploaded the code here.
- Homework:
- Player gets removed when it hits a tube. You’ll need to add a rect attribute to the Tube sprite class
- Add a score attribute and make it increase as the player collects more coins. You can check by printing out the score attribute.
- Add a score_indicator method that draws the score on the screen. This should go up when the player collects more coins