Bodgers – Getting started with Python

Hi Everyone

It was great to get back again with a full year to look forward to and it was also great to see so many people interested in getting involved with CoderDojo Athenry.

In the Bodgers group we got off to a great start, we installed the Mu Python editor, and we wrote our first few programs.

Bodgers

The Mu editor can be downloaded from here: https://codewith.mu/.

You can find our code from last Saturday on the last couple of slides from this week’s notes here: Bodgers Day 1

We also decided we’re going to do a few small projects between now and Halloween and then start on a bigger project after that.

Next week we are going to make a Space Invaders style game, you can find some images for it here: https://www.dropbox.com/home/Bodgers/Space%20invader/Images.

Looking forward to seeing you all next week.

Declan

Bodgers – A Look Back At 2020/2021

Hello everyone,

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.

Special thanks to everyone who created levels for our Red Runner game. You can find a copy of the code and images for this game on Dropbox here: https://www.dropbox.com/sh/sj6hil242d3fxmk/AAAHPnEVjw5IGWqs_G3eTXkDa?dl=0.

Thanks also to Kevin who helped us get up and running.

Enjoy the summer and hopefully I’ll see you in the autumn.

Declan

Bodgers –Magic Ball

This week in the Bodgers group we revisited Pygame Zero and worked on a fortune telling game based on a Magic 8 ball.

I gave the group some artwork I prepared in the Paint.NET graphics editor and we wrote some code to animate them.

I’ve added the code and images to Dropbox here.

See you all on Saturday for Belts and Pizza, don’t forget to bring drinks.

Declan, Dave and Alaidh.

Bodgers – Finishing Our Game

Hi again everyone.

This week we put the final touches to our game.

uwin

We added some code to increase the speed of the alien sprite as the score increased to make the game a little more difficult.

We then added some code to control what happens when the game is over.

You can find our code on Dropbox here: https://www.dropbox.com/sh/ccfaycpa1zluh8l/AAAA4dQH8EPNJicsQj7RwGgsa?dl=0

Next week we will do a quick recap of this game and then we will start looking at hardware on the Raspberry Pi.

See you all then.

Declan, Dave and Alaidh.

Bodgers – Making a better game

Hello again everyone.

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.

Capture6

Next week we will add some elements to make our game more difficult and even more fun.

I don’t have any slides this week but the code for both versions of the game are available here: https://www.dropbox.com/sh/ccfaycpa1zluh8l/AAAA4dQH8EPNJicsQj7RwGgsa?dl=0

See you all next week.

Declan, dave and Alaidh.

 

Bodgers – Making With Pygame Zero

logo

Hello again everyone.

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.

We followed the first few parts of this tutorial: https://pygame-zero.readthedocs.io/en/stable/introduction.html. I gave everyone a folder with images and sounds for our game which you can find here: https://www.dropbox.com/sh/3q14pg3huev4pwb/AADjDuB0FBVZXM4ChqN8qRx2a?dl=0. Copy this folder on to your own computer and you’re ready to go.

Here are my slides from Saturday: day 5

See you all on the 10th of November.

Declan, Dave and Alaidh

Bodgers – Pygame Zero

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:

pip install pgzero

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:

import pgzrun

and at the  end of your code put:

pgzrun.go()

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.

 

See you all next week.

Declan, Dave and Alaidh.