4 ms·
I emailed him asking about a way to get the current color on the screen, for a LED project I wanted to do: https://www.youtube.com/watch?v=nYnmtfN_lrg https://
by StavrosK 6y ago
I emailed him asking about a way to get the current color on the screen, for a LED project I wanted to do:
https://www.youtube.com/watch?v=nYnmtfN_lrg https://www.youtube.com/watch?v=nYnmtfN_lrg
He replied and was very helpful. Unfortunately he didn't know of a good way to get the color, but he did send me a bunch of other code for a related project he had.
In the end, I just captured the color from a single pixel on the screen, which was fast and good enough for me, and the result is above.
- levidavidmurray 6y agoHow do you detect "Game Over" when simply capturing a single pixel?
- StavrosK 6y agoIIRC the pixel is the first pixel of the time bar, and the entire screen flashes white when you lose, so I just detect that. The code is here: https://gitlab.com/stavros/gamelights/-/blob/master/misc/capture.py#L108 https://gitlab.com/stavros/gamelights/-/blob/master/misc/cap...