Game Journal: Rishav’s Pet
I made a little desktop pet that hovers above all open windows, including Chrome. It is a combination of a human face and a machine, with a stitched seam at the middle, one bright eye, and a blinking antenna.
The programming is done with Python and tkinter. The window has no frame and is always in the foreground, and one color is set to be transparent so only the pet is visible. The program does not use any images; instead, everything is drawn directly in the code.
Both eyes of the pet follow the cursor. When the cursor gets close to it, the one bright eye turns from blue to hot pink. Every couple of seconds, the pet blinks. Everything that moves in the application uses the root.after() method, which allows us to run the program similar to a game loop.
Glitches: The eye turned from bright to a tiny dot because the radius was specified incorrectly. The blinking was already programmed, but I didn’t call it within the application to make it work.
Eventually, I created the Windows executable using PyInstaller for easy access.