Skip to content

rinesh/pretext-breaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pretext Breaker

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.

Features

  • 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

Controls

  • Left Arrow / A: move left
  • Right Arrow / D: move right
  • Up Arrow / Enter / tap: launch or continue
  • M: mute audio
  • R: restart after game over

Development

Install dependencies:

npm install

Start the development server:

npm run dev

Create a production build:

npm run build

Preview the production build locally:

npm run preview

Project Structure

  • src/main.ts: app bootstrap and canvas mounting
  • src/game.ts: game loop, gameplay systems, rendering, and power-up logic
  • src/pretext-renderer.ts: text measurement and draw helpers
  • src/audio/: music and sound effect generation

Notes

  • The project targets modern browsers with canvas, Web Audio, and font loading support.
  • Production output is generated into dist/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors