Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
ChrisLights

Doom II Gunshot Detection and Lights

Recommended Posts

I love how the plasma rifle just lights up the room. XD

 

Oh plasma rifle... you'll forever be my favourite doom gun :3

Share this post


Link to post
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!

Share this post


Link to post

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!

Share this post


Link to post
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.

Share this post


Link to post
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 by kb1 : Just found out that "ambience" is the same as "ambiance".

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×