Pretext Breaker is a text-rendered block breaker built with Vite, TypeScript, and @chenglou/pretext. The game uses measured text for the wall, paddle, HUD, particles, and power-ups instead of traditional sprites.
- Text-first breakout gameplay rendered on a single canvas
- Dynamic paragraph-based brick waves
- Audio for paddle hits, brick breaks, pickups, and game states
- Power-ups for paddle expand, slow motion, guard saves, multiball, and extra lives
Left Arrow/A: move leftRight Arrow/D: move rightUp Arrow/Enter/ tap: launch or continueM: mute audioR: restart after game over
Install dependencies:
npm installStart the development server:
npm run devCreate a production build:
npm run buildPreview the production build locally:
npm run previewsrc/main.ts: app bootstrap and canvas mountingsrc/game.ts: game loop, gameplay systems, rendering, and power-up logicsrc/pretext-renderer.ts: text measurement and draw helperssrc/audio/: music and sound effect generation
- The project targets modern browsers with canvas, Web Audio, and font loading support.
- Production output is generated into
dist/.