Anyone building with LLMs knows the wait—especially in complex multi-agent AI workflows. The spinner. The dots. The streaming tokens arriving one by one. A new React library called react-waiting-game has a different idea: give users something to actually do. The library drops tiny one-button arcade games into loading states. Five games total, all rendered in monochrome pixel art on a single HTML canvas, zero dependencies. The games cover familiar territory. Pixel Runner is essentially the Chrome dino game. Jellyfish Drift has you drifting underwater. Gravity Flip, Invaders, and Rhythm Tap fill out the rest. Each supports combos, power-ups, high scores saved to localStorage, and achievements. One button handles everything: tap, hold, release. Works with keyboard, mouse, or touch. You can tint the whole thing to match your brand colors with a single prop. Hacker News commenters immediately spotted the historical parallel. Namco filed U.S. Patent #5,718,632 back in 1995, covering the exact concept of playable loading screens. The patent famously appeared in Ridge Racer. For nearly 20 years, it scared developers away from putting games in their loading screens. The patent expired in July 2015, which is why libraries like this can now exist without legal headaches. The library is straightforward to integrate. Drop in a WaitingArcade component with your chosen game and autoStart enabled, then hide it when your API call finishes. The auto-pause feature stops gameplay when the tab loses focus, and the games pause when your data arrives. There is an accessibility angle worth considering though. For users with motor impairments or anyone relying on screen readers, a sudden mini-game where they expect a loading indicator could be confusing. The library does not seem to address this yet. Whether users will actually care about beating their high score during a three-second inference wait is an open question. But it beats staring at a spinner.
This React Library Turns Loading Spinners Into Arcade Games
react-waiting-game is a React library that provides one-button mini-arcade games to occupy users during long-running tasks like LLM responses. The library includes five games (Jellyfish Drift, Pixel Runner, Gravity Flip, Invaders, Rhythm Tap) with 1-bit pixel art, zero runtime dependencies, and features like high scores, achievements, and SSR support.