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.0.tar.gz (1.7 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.0-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unrealzap-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for unrealzap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca6fb73b838c34f41e835dd5e08951d2744d20f17682616e0c8ff8b60b43ea9f
MD5 2fefc6103872db83fcf12eb5d6d33dc1
BLAKE2b-256 2e000f32f46a4f359cd9236cc1a3f36dee080df692faf4f3c21bdab5250a1d6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unrealzap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for unrealzap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7bdd292a171ec15820601fdd71fb0ff8acab41fffcf5a03095f923316be9310
MD5 d1025965ceb1b9b6313ebc3b2c052b61
BLAKE2b-256 c2ca4a937289673b6ae80a16f3ea3bf16520d6a17dd129b05498d29d997e77e9

See more details on using hashes here.

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