Build Angry Birds with Python!

Welcome back! Python is a very versatile language with tons of capability, one of the awesome things you can do with Python is game development, so let’s take a look at an awesome Python game development project. This specific project was built using Pygame, a very popular Python project used for game development, if you want to learn more about Pygame, check out the link below:
This specific project that we’re looking at is hosted on Github, to view this project check out the link below (please give full credit to the author of this project):
Let’s go ahead and do a high level overview of this specific project.
The Code
This project is broken down into several different files:

You have the resources folder, the src folder, a license file, a read me file, a config yml file and a requirements.txt file. Within the src folder we will find several Python files, these are the main files we will be interacting with:

Within each of these Python files house separate components of this game, the main.py file is the one we will be running, within this file we will find calls to other Python files in this folder. Essentially, the level.py file will generate the level, the characters.py file will generate the character and the polygon.py file will generate the polygons of this game. That is a very high level overview of this specific project, so let’s get into the fun part!
Running The Code
First off, we need to install all of the requirements for this project, so open up the requirements.txt file and install the packages within that file. Next up we want to open up our terminal / command prompt and change the directory to that folder:

Next up we want to run that Python file, using Python 3 do the following command:
python3 main.pyAwesome! You will then see the pygame window open and display the Angry Birds game! Below is a screenshot of this game running!

Congrats! I would highly recommend reading through the lines of code within this file and trying your best to understand this code. This project showcases the capiblity behind Python with game development, did you run this project? Do you plan on developing games with Python? I would love to hear your thoughts about this!
As Always
if you have any suggestions, thoughts or just want to connect, feel free to contact / follow me on Twitter! Also, below is a link to some of my favorite resources for learning programming, Python, R, Data Science, etc.
Thanks so much for reading!




