Home > Words

A Byte of Pygame

Follow my adventure as I learn Python with A Byte of Python Pygame.

Installing Python on MacOS

To install Python on MacOS I downloaded and installed Homebrew, and Python by running brew install python in the terminal.

To write Python I downloaded and installed Visual Studio Code and a Python extension in the store. Also, see the Pygame heading below for an alternate way of setting up your development environment.

Hello World

I made a main.py file with print("Hello World") inside. I ran the file and the terminal sent Hello World back to me!

I think Hello World is a basic program to see how the programming language works, and perhaps to understand how it differs from other programming languages?

Image above: Hello World written in Python inside Visual Studio Code.

Pygame

I believe that learning should be fun. A Byte of Python isn't fun for me, so I'll learn Python by making video games. Pygame is a set of modules for creating video games with Python.

I'm using Replit as my development environment for Python, and I base my repls on Pygame. I'm using Replit for simplicity. I'm also stupid and couldn't figure out how to install Pygame with Homebrew on MacOS.

To learn Pygame I'll follow Da Fluffy Potato and Clear Code on YouTube. They make Pygame content.

Pong

My adventure starts with Creating Pong in Python.