Skip to main content

Unreal Tournament bug zapper

Project description

Unreal Zap

Based on an amazing idea to have the Unreal Tournament kill streak sounds play when the bug zapper goes off, this script makes that dream a reality.

It listens to microphone input and waits for a burst of sound over a certain volume threshold, then plays the appropriate Unreal Tournament kill streak sound based on number of kills so far that day.

It also supports multi-kills—if you get multiple zaps within 60 seconds, you'll be treated to "double kill" instead of "killing spree," and so on. If you get more zaps than there are sounds, you're treated to "Headshot!" for the rest of that day.

The script resets at midnight each day, and supports quiet hours to avoid going off overnight.

Sounds

In addition to "Headshot," the following sounds are included:

Kill Streak

  1. First Blood
  2. Killing Spree
  3. Rampage
  4. Dominating
  5. Unstoppable
  6. Godlike

Multi-Kills

  1. Double Kill
  2. Multi-Kill
  3. Ultra Kill
  4. Monster Kill

Setting Up a Raspberry Pi

This is simple to set up with a Raspberry Pi and a USB conference mic that works with Linux like this one.

Make sure the Raspberry Pi is up-to-date:

sudo apt update
sudo apt upgrade

Install using pip:

pip install unrealzap

Create a systemd service to run the script on startup:

sudo nano /etc/systemd/system/unrealzap.service

Configure like so:

[Unit]
Description=Unreal Zap
After=network.target sound.target
Wants=sound.target

[Service]
ExecStart=/path/to/python -m unrealzap.bug_zapper:main
StandardOutput=journal
StandardError=journal
Restart=on-failure
RestartSec=5
User=danny
Group=audio
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  # May need adjustment
Environment=PYTHONUNBUFFERED=1
Environment=XDG_RUNTIME_DIR=/run/user/1000
Environment=ALSA_CARD=S3
TimeoutStopSec=10
Nice=-10

[Install]
WantedBy=multi-user.target

Enable and start the service, and check the status to confirm:

sudo systemctl enable --now unrealzap.service
sudo systemctl start unrealzap.service
sudo systemctl status unrealzap.service

M-M-M-M-MONSTER KILL!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unrealzap-0.1.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unrealzap-0.1.1-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file unrealzap-0.1.1.tar.gz.

File metadata

  • Download URL: unrealzap-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unrealzap-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3255205e8862887cacaa7d09d0c4bdb510cd611587878553fb02e5d886ac003b
MD5 f2f6c2c4354dbe689d6ef3e3eeacec4a
BLAKE2b-256 48d21127c11b71d2cd88891924bbc832bf42c5d1c857a54b1494ca547002d2c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for unrealzap-0.1.1.tar.gz:

Publisher: python-publish.yml on dannystewart/unrealzap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file unrealzap-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: unrealzap-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unrealzap-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9547c8f0a59bb2b5184e59042e7d0f95b27452f7696b90f7464b1086c6d82065
MD5 406fb39c074cbe80ae5e9933201ae95d
BLAKE2b-256 d64abe41e30bb1d2c747c0d878b251c5ccfea2050a22688516498b09c0d3e13a

See more details on using hashes here.

Provenance

The following attestation bundles were made for unrealzap-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on dannystewart/unrealzap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page