Block Catcher
A retro style WebGL game.
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