An attempt to simulate the “Bouncing DVD Logo” (aka “DVD Screensaver”) meme in Python with the pygame library.

Recently, I’ve gotten more into Python’s pygame library during research regarding a new personal project I’ll be sharing here soon. That happened roughly simultaneously with my re-discovery of the amazing The Coding Train channel on YouTube.

For the uninitiated, The Coding Train is a YouTube channel hosted by Daniel Shiffman, who tasks themselves with solving a so-called Coding Challenge using the p5.js library for JavaScript. Usually, this has to be done in x amount of minutes (even though that’s more of a suggestion than a rule) and during a live stream, leaving in every typo, debug, frustration and rejoice.

Naturally, being more of a Python person, I decided to recreate these challenges myself, usually before seeing Shiffman’s approach, using pygame in Python.

For Coding Challenge #131, Shiffman successfully recreated the iconic DVD screensaver, which bounces from side to side and causes everyone to cheer once it hits the corner perfectly.

Here is my version:

DVD Example


References: GitHub