# xkcd 2347

I made an [interactive version](/xkcd-2347/) of [xkcd 2347](https://xkcd.com/2347/), the dependency comic, where you can drag blocks out of the tower and watch everything above them collapse.

![xkcd 2347 interactive game](/images/xkcd.gif){: width="800" height="706" loading="lazy" decoding="async" }

[Matter.js](https://brm.io/matter-js/) handles the physics and [Rough.js](https://roughjs.com/) gives it the hand-drawn xkcd look. Each reload generates a different tower from a seeded PRNG that picks a taper profile, varies the block sizes and row widths, and drifts the whole thing slightly off-center as it goes up. The project names are randomly assembled from parts that sound like real packages -- things like `node-flux.js` or `libcrypt-fast` or `hyper-mux@3.12.7` -- though about one in five times you'll get an actual name like left-pad or log4j instead. Reload enough times and you might run into some unusual tower shapes, and the [Konami code](https://en.wikipedia.org/wiki/Konami_Code) does what you'd hope.

The info button shows the tower's seed, which you can share as a `?seed=` URL parameter, basically a way to say "look at this disaster" and have someone else see the exact same precarious arrangement.

Some ways this could go further:

- Upload an SBOM and build the tower from your actual dependency tree, with block sizes based on how many other packages depend on each one
- Pull real dependency data from [ecosyste.ms](https://ecosyste.ms) so you can see what your project's tower looks like before you start pulling blocks out
- Use the phone's accelerometer to let you tilt and topple the tower

[Source on GitHub](https://github.com/andrew/nesbitt.io/tree/master/xkcd-2347).

---

By Andrew Nesbitt (https://nesbitt.io). Markdown version of https://nesbitt.io/2026/02/27/xkcd-2347.html
