npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ultimatedarktower

v4.1.0

Published

This library provides functions to communicate with the bluetooth le enabled Tower that comes with Restoration Games Return To Dark Tower board game.

Readme



Install

# Browser
npm install ultimatedarktower

# Node.js (adds the optional BLE peer dependency)
npm install ultimatedarktower @stoprocent/noble

Platform notes. Node.js 18+. macOS works out of the box. Linux needs BlueZ (sudo apt install bluetooth bluez libbluetooth-dev). Windows needs Windows 10+ with BLE support.

Quick start

import UltimateDarkTower from 'ultimatedarktower';

const tower = new UltimateDarkTower();

tower.onTowerConnect = () => console.log('Connected.');
tower.onCalibrationComplete = () => console.log('Calibrated.');

await tower.connect(); // browser: opens device picker; node: scans
await tower.calibrate(); // required before drum rotation is reliable
await tower.playSound(1);
await tower.cleanup(); // always clean up on shutdown

Walkthrough with explanations, error handling, lights, drum rotation, and a full example: docs/GETTING_STARTED.md.

Features

  • Multi-platform Bluetooth — Web Bluetooth, Node.js (@stoprocent/noble), Electron, React Native via custom adapters.
  • Complete tower control — lights, sounds, drum rotation, seal breaking, skull counter.
  • Stateful command variants — preserve every other state when changing one field.
  • Glyph tracking — automatic glyph position updates as drums rotate.
  • Game state — seal state, broken seals, software-tracked across sessions.
  • BLE flight recorder — opt-in disconnect diagnostics with structured event capture.
  • Event callbacks — connect, calibrate, skull drop, battery, state change.
  • Logger — pluggable outputs (console, DOM, in-memory buffer).
  • TypeScript-first — full type definitions, ESM + CJS builds.
  • Seed parser — decode, encode, validate, and compare game seeds.

Documentation

A guided map of the docs lives at docs/README.md. The headline pages:

| Page | Use it when… | | -------------------------------------------- | --------------------------------------------------- | | Getting Started | …you're new and want a working tower in 10 minutes. | | API Reference | …you need the full surface, split by topic. | | Architecture | …you want to understand how the layers fit. | | Examples | …you want to know what the demo apps demonstrate. | | Tower Tech Notes | …you're reverse-engineering the protocol. | | Seed Format | …you're working with game seeds at the byte level. | | BLE Diagnostics | …you want disconnect flight-recorder data. | | Troubleshooting | …the hardware is misbehaving. | | Ecosystem | …you want the companion libraries & tools. |

Examples

  • Controller — full reference UI with a BLE diagnostics tab and tower emulator.
  • Game — The Tower's Challenge, a complete browser game.
  • Node CLI — minimal interactive driver for verifying the Node adapter.

Platform support

| Platform | Adapter | Notes | | ---------------------------------------------------- | -------------- | ------------------------------------------------------------------------------- | | Chrome / Edge / Samsung Internet (desktop + Android) | Built-in | Web Bluetooth | | Node.js 18+ | Built-in | Requires @stoprocent/noble | | Electron | Built-in | Auto-detects renderer vs main process | | iOS Safari / iOS Chrome | — | Use Bluefy | | Firefox | — | No Web Bluetooth | | React Native | Custom adapter | react-native-ble-plx recommended — see adapters guide | | Cordova / Capacitor | Custom adapter | See adapters guide |

Related projects

This library is part of a wider Return to Dark Tower family. See docs/ECOSYSTEM.md for the full list. Highlights:

Known issues

  • Sound and animation completion — the tower reports "command complete" the moment a sound or animation starts, not when it ends. Don't use the completion response as a "ready for next sound" signal; sleep or use the LED-sequence response timing documented in docs/TOWER_TECH_NOTES.md.

Contributing

Workflow, code standards, release process, and hardware testing instructions: CONTRIBUTING.md.

Community

Questions? Ideas? Join us on our UltimateDarkTower Discord Server!

You can also find us in the RTDT Fan Content Channel on Restoration Games Discord.


Personal note from the Developer

I have spent many hours reverse engineering the Tower's protocol (by hand, this was before AI existed :D) in order to create this library, I look forward to what others will create using this! - Chris