Stats

Languages

Description

You can play a demo of the game at http://zerebos.github.io/BlockCatcher/

๐ŸŽฎ How to Play

Controls

โ† โ†’ Arrow Keys    Move your paddle
SPACE             Start game / Pause
Audio Button      Toggle sound

Strategy Tips

  • Start with pink blocks to build momentum
  • Chase cyan blocks when you're confident
  • Watch the timer - panic leads to mistakes
  • Use audio cues to anticipate block drops

๐ŸŽฏ The Challenge

Time is ticking. Neon blocks cascade from the digital sky. Your mission? Catch them all.

In this retro-futuristic arena, you control a sleek white paddle in a race against time. Each block type demands different strategies:

  • ๐ŸŒธ Pink Blocks โ†’ 1 point โ€ข Large & leisurely โ€ข Perfect for beginners
  • ๐ŸŸฃ Purple Blocks โ†’ 5 points โ€ข Medium challenge โ€ข The sweet spot
  • ๐Ÿ”ท Cyan Blocks โ†’ 25 points โ€ข Lightning fast โ€ข High risk, high reward

Goal: Score 500 points in 60 seconds. Sounds easy? Think again.

Architecture Highlights

๐Ÿ—๏ธ Clean Architecture

src/
โ”œโ”€โ”€ managers/    # System orchestration (audio, DOM, input, rendering, pools)
โ”œโ”€โ”€ entities/    # Game objects (player, blocks) with behavior
โ”œโ”€โ”€ utils/       # Pure functions (math, geometry, vectors)
โ”œโ”€โ”€ audio/       # Modular sound effect system
โ”œโ”€โ”€ types/       # TypeScript definitions
โ””โ”€โ”€ styles/      # Synthwave CSS architecture

๐Ÿงช Testing Philosophy

  • Unit tests for individual components
  • Integration tests for game mechanics
  • DOM tests using Happy-DOM for realistic environments
  • Edge case coverage including accessibility scenarios

๐Ÿš€ Performance Features

  • Object pooling prevents garbage collection hitches
  • Efficient collision detection using AABB algorithms
  • Minimal DOM manipulation with batch updates
  • Optimized bundle under 20KB total
  • WebGL Shaders for hardware acceleration

๐Ÿ“Š Technical Stats

Metric Value
Bundle Size 18.81 KB (JS) + 13.40 KB (CSS)
Test Coverage 141 tests, 100% core functionality
Performance 60 FPS WebGL rendering
Accessibility WCAG 2.1 AA compliant
Browser Support All modern browsers with WebGL

๐ŸŒŸ The Tech Stack

Why these choices?

  • Bun โ†’ Lightning-fast runtime and bundler
  • TypeScript โ†’ Type safety without complexity
  • WebGL โ†’ Hardware-accelerated graphics
  • Web Audio API โ†’ Immersive sound design
  • Happy-DOM โ†’ Realistic testing environment
  • GitHub Actions โ†’ Automated deployment