Happy Coding

Video game colors


#1

I am looking at your movie color visualization

I want to do the same thing but for video games. How would I do that?


#2

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.

The code I used is available here:

If you’re playing a console game, then that’s where I get a little fuzzy. Some googling mentions something called a “capture card” but I’ve never done it.

I’d be curious to hear about your results. Good luck!


#3

okay thanks! I’ll look into capture cards.