I would like to thank all the Bodgers who joined me this year. I really enjoyed the sessions and I’m really grateful to you all for your attention, patience and your willingness to help me and each other out.
It’s a pity we couldn’t get together for even one session but hopefully when CoderDojo Athenry gets back to in person sessions I can meet you all then. I would also like to invite you all to our first post-COVID pizza party (hopefully before Christmas).
I have put together a video of the games we made this year.
We continued working with Pygame Zero this week, we began by getting everyone up to date with where we were with the game. I forgot to mention we were following the tutorial at https://pygame-zero.readthedocs.io/en/stable/introduction.html. We then changed the screen size and added a score to make our game more fun.
Next week we will add some elements to make our game more difficult and even more fun.
This week in the Bodgers group we started working with Pygame Zero. Pygame Zero allows us to write our own games quickly and easily by doing a lot of the work involved in setting up and running a game in the background. This allows us to focus on the more creative aspects of the game.
You will have to install Python and Pygame Zero if you’re going to use Pygame Zero at home, details on how to do this are in my slides. A few of us had installation problems on Saturday, so don’t worry if you have issues we will help sort it out when we return after the break.
This week we took a break from hardware and we looked at Pygame Zero. Pygame Zero is for creating games quickly and with fewer lines of code than would be used with Pygame. It is intended for use in education, so we can learn basic programming without needing to understand the Pygame API or how to write an event loop.
Pygame Zero is designed for the Raspberry Pi but it can be installed on other systems, we used Windows without much hassle. It comes installed on the Raspberry Pi already if you have a recent version of Raspian. To install on windows open a command prompt and type:
You may need to install Pip if you didn’t install it when you installed Python. To do this go to Control Panel/Settings and then Add/Remove Programs, scroll down and click on Python then click on modify, tick the Pip check box and save your changes.
To run your code from Idle or any other IDE you need to add two lines to your code, at the beginning before any other code you need:
and at the end of your code put:
We will be using Pygame Zero for graphical input/output in our projects but if you want to have a go at writing a game, CodeConjuring’s Froggit youtube tutorials are a good place to start.