Text Invaders is an ASCII browser game built with Pretext.

Text Invaders

Shoot words, break layout, and watch the battlefield reflow in real time. Text Invaders is the flagship game on the Pretext platform.

How It Works

The game starts with text layout and turns it into a destructible battlefield.

  1. Pretext prepares multiline text and segment positions before the game maps those pieces into enemy formations.
  2. Each word or text fragment becomes part of the live game state instead of decorative copy in the background.
  3. Shots destroy text entities, particles burst from characters, and layout rules recompute the active field.
  4. The result is a browser game where text measurement, layout, and gameplay are tightly linked.

FAQ

Clear answers for Text Invaders players and Pretext-curious developers.

What is Text Invaders?

Text Invaders is an ASCII-style browser game built with the Pretext layout library. It turns live text into destructible enemies and recomputes layout as the battlefield changes.

How does Text Invaders use Pretext?

Text Invaders uses Pretext to prepare multiline text, position text segments, and support the layout logic that makes dynamic reflow possible during gameplay.

Is Text Invaders the whole platform?

No. Text Invaders is one game on the broader Pretext platform, which currently also includes Text Pong and Text MDR and can expand to more text-native experiences over time.

Where can I learn more about the underlying library?

The official open source library is available at chenglou/pretext on GitHub, while this page focuses on one playable application of that technology.