I’m not really an expert in streaming games or anything, but at a high level your goal should be to find a way to capture a feed of whatever game you’re playing.

If you’re playing a PC game then this is relatively straightforward. You can use a program like OBS Studio to capture your screen, which you can then save as a video file.

Then you can do pretty much the same thing I did for the movie color visualization project. I converted the video file to individual frames using Processing’s Video library. The code is pretty dumb: for each frame of the video (or every 40 frames, whatever), save that frame as an image file. Once you have the image files, you can process them however you want.