So, for quite a while I had been thinking of organizing a fun live coding session which shall be an appreciable kick start for all the aspiring (girl) developers in the capital region. Along with Coding Blocks, I came up with the idea of PyGame 101 Codelab which was brought to being in association with Women Who Code Delhi and Google Women Techmakers Delhi (Duties of being the Director of WWC Delhi and Lead, WTM Delhi 😉 ).
PyGame 101 Codelab promised to make the audience learn to make a desktop game in Python from scratch with no high-end programming skills or Python knowledge required, just laptop, enthusiasm and willingness to learn. As with all other events in this league, it was open and free for all.
As the PyGame CodeLab emphasised on newbies, the session began with helping the students install Python and PyGame package followed up by brushing up of simple Python syntax and then beginning with utilisation of PyGame functions to build a very basic desktop game.
The live coding session aimed to help all build a simple PyGame involving a bunny, who has to defend a castle against an attacking horde of badgers all complete with in-game sounds, score tracker, timer, etc. right from scratch in just 10 steps.
The 4 hour session made sure that everyone was at the same page after addition of even a tiny snippet in the codebase taking care of answering all queries and help debugging as well. When all was said and done, the session ended on a happy note with students interacting with each other, asking their general doubts about programming, open source or sharing personal experiences.
I am super glad that the session received such a good response. I hope to organise other such coding sessions to and carry the flame forward.
Links to explore:
The simple PyGame involves a bunny, who has to defend a castle against an attacking horde of badgers complete with timer, score tracker and in-game sounds !
* Step 1: Initializing, Poitioning up the bunny and castles
* Step 2: Adding a background to the game scene
* Step 3: Making the bunny move
* Step 4: Making the bunny turn at different angles
* Step 5: Teaching it how to shoot
* Step 6: Introduce random badgers/enemies
* Step 7: Collisions with badgers and arrows
* Step 8: Adding a Health Meter and Clock
* Step 9: Conditions for a win
* Step 10: Music and Sound effects
Give the tiny little game a try..
Do not hesitate to post/comment. Feedback, Suggestions, Appreciations, Questions…. All welcome 😀