ChrisLights Posted April 16, 2018 Hi all, first time poster here. I've been a Doom fan since I was a kid (one of the first games I remember playing is Doom II when I was in preschool). I've started up a YouTube channel, and for my first video I decided to pay homage to the series with a project that detects gunfire by checking pixels on the screen and sending the data to an ESP32 (similar to an Arduino), which shows different lighting effects on an LED strip depending on the type of weapon that was fired. It was a super fun project that I knocked over in a day and I wanted to share it with you guys :) I'll be posting a "making-of" video in the coming days, feel free to subscribe if you're interested or ask me questions here. Cheers! YouTube link: 15 Share this post Link to post
DynamiteKaitorn Posted April 19, 2018 I love how the plasma rifle just lights up the room. XD Oh plasma rifle... you'll forever be my favourite doom gun :3 1 Share this post Link to post
kb1 Posted April 20, 2018 On 4/16/2018 at 8:02 AM, ChrisLights said: I've started up a YouTube channel, and for my first video I decided to pay homage to the series with a project that detects gunfire by checking pixels on the screen and sending the data to an ESP32 (similar to an Arduino), which shows different lighting effects on an LED strip depending on the type of weapon that was fired. This is very cool, indeed! Some questions (and, of course, suggestions :) How are you reading the screen? Camera pointed at an actual monitor Reading video memory via a program running on the PC Custom code within a Doom source port Depending on your setup, and how far you want to take it, there might be a way to get very precise input data to your device: Outgoing weapons, incoming fire, player damage, rad suit and nukage, etc. I'd love to see this in action, especially with some tweaks: I love the blue plasma glow, but the BFG shot should be bright green! Pistol+chaingun: Bright white flash, followed by slight red/yellow afterglow Rocket launcher: Bright orange/yellow, with slow fade to red Player damage: 250 ms. Bright red flash Rad suit: darker green glow If it's a camera-facing-monitor setup, precise detection would be difficult. But it would be fairly painless to get a source port to signal a device. Anyway, as-is, it's still a very cool concept - thanks for sharing! 1 Share this post Link to post
Pegleg Posted April 20, 2018 That is awesome! I liked the red and green chasing effect from the rockets and the blue from the plasma gun, too. While I was watching the chaingun make the room glow faintly, I was reminded of a friend who used to call the chaingun his "flashlight." I wonder what he would think of the guns actually lighting up the room now. Overall, very nice! I'm interested to see where you take the project from here. And welcome to Doomworld! 1 Share this post Link to post
Linguica Posted April 20, 2018 18 hours ago, kb1 said: How are you reading the screen? Camera pointed at an actual monitor Reading video memory via a program running on the PC Custom code within a Doom source port I am going to go out on a limb and guess that he is using a Java application that analyses the ammo count pixels of a running Doom II game. It uses this information to detect when bullets are fired and sends this data wirelessly to an ESP32. The ESP32 controls an LED strip, and sends different effects through the strip to correspond with gunfire from different weapons. 2 Share this post Link to post
Deleted_Account Posted April 22, 2018 Very impressive! Thanks for sharing. 0 Share this post Link to post
wheresthebeef Posted April 22, 2018 Needs to flash red everytime he gets hit 0 Share this post Link to post
kb1 Posted April 24, 2018 (edited) On 4/20/2018 at 6:29 PM, Linguica said: I am going to go out on a limb and guess that he is using a Java application that analyses the ammo count pixels of a running Doom II game. It uses this information to detect when bullets are fired and sends this data wirelessly to an ESP32. The ESP32 controls an LED strip, and sends different effects through the strip to correspond with gunfire from different weapons. Heh - I *did* look for a page like that...a little bit. That's a fairly clean way to do it: screen scraping the ammo count. It has the advantage of having a good chance of working in multiple ports. Another advantage is that you can test the background of the HUD to determine player damage. You could even estimate amount of damage pretty well. It would even be fairly easy to get it to self-calibrate on the glaring yellow ammo numbers, to account for letterbox/pillarbox. Very cool. I wonder how much ambience it adds to the Doom experience... though your neighbors might call the fire department :) Edited April 24, 2018 by kb1 : Just found out that "ambience" is the same as "ambiance". 0 Share this post Link to post