I’ve been using processing for a couple of years now and it’s worked well for most of my needs, but I am having some trouble with one particular project. The project is to make physical health/mana indicators that mimic the in-game health and mana pools in Diablo II (although, it could probably be used with other games too eventually). Something like this, but without water - just LEDs:
The hardware I have covered, and I almost had the software working. I do not know how to get the data from the game or if there is a way to extract stuff like that. My current method is essentially having my processing sketch take screenshots and analyze the pixels showing the health globe. For those unfamiliar it looks like this:
So, I was basically looking at the vertical strip of pixels running down the center of the health globe and trying to determine the “redness” of them (which changes to green when you’re poisoned, but I can deal with that I think). The problem, as you may have noticed, is that the globe is see-through on the top half, so it gets easily confused in busy environments (some of which are red). Also, the bottom of the globe is very dark, nearly black, so it gets a little bias. I thought about trying to do some character recognition to get the actual health values, but I don’t know a good way to go about that in processing. Any suggestions for that or alternative solutions?