Commit Graph
11 Commits
Author SHA1 Message Date
pastilhas 08c2d40d23 feat: add collision detection between falling letters and ship
- Detect collisions when letters reach ship's Y position
- Both letter and ship explode with particle animations on collision
- Ship explosion displays expanding particles in yellow, orange, and red
- Letters explode with their existing animation system
- After collision, letters clear and new letter spawns automatically
- Game continues after collision (no game-over condition yet)
- Collision threshold tuned for reliable detection (30px from ship center)
- Added shipState tracking to GameStatusManager
- Ship position continuously synced during game loop
2025-11-03 22:57:41 +00:00
pastilhas d69a9a6cc9 fix: correct vite alias from vim-snake to typing-chud 2025-11-03 22:53:24 +00:00
pastilhas 32045c5473 feat: add typing mechanics with visual feedback and safe margins
Implement core typing game mechanics with keyboard input handling. Correct
letters trigger explosion animation with radiating particles and spawn new
letter. Wrong letters flash red for immediate feedback. Add 50px margins on
both edges to prevent spaceship and letters from appearing at screen borders.
2025-11-03 22:38:10 +00:00
pastilhas 04332effa6 feat: redesign spaceship with retro arcade aesthetic
Replace simple geometric spaceship with detailed design featuring metallic
hull with 3D gradient effect, glowing cyan cockpit, extended wings with red
tips, animated engine glow, and triple exhaust flames. Remove debug console
logs from movement and rendering code.
2025-11-03 22:24:47 +00:00
pastilhas aff5ccecbf feat: implement pixel-based spaceship animation with 100ms movement duration
Refactor spaceship positioning from column-based to pixel-based coordinates
with time-based interpolation, enabling smooth animation to letter positions
in exactly 100ms regardless of distance. Fixes coordinate mismatch that
prevented spaceship from moving to spawned letters.
2025-11-03 22:22:11 +00:00
pastilhas 5a0d8b5221 feat: enforce one active letter at a time (character mode)
- Add MAX_ACTIVE_LETTERS constant set to 1
- Only spawn new letter if no letters are currently active
- Prepare for future game modes (word, sentence, paragraph)
- Change keybindings to use Escape instead of Q
2025-11-03 22:05:22 +00:00
pastilhas 0dc4ecde72 feat: implement falling letters spawning from top
- Letters spawn at random horizontal positions every 1 second
- Letters fall at 100px/second from top to bottom
- Random A-Z letters rendered in white monospace font
- Fix game loop to start properly when startGame called
- Remove letters that exit bottom of screen
2025-11-03 22:01:40 +00:00
pastilhas dce96b8453 feat: implement canvas-based rendering with geometric spaceship
- Replace DOM grid with HTML5 canvas (800x600)
- Draw spaceship as geometric shapes (triangle + window + flames)
- Green body, yellow window, orange flame trails
- Smooth pixel-based rendering instead of DOM elements
2025-11-03 21:53:42 +00:00
pastilhas fb79aa0229 refactor: simplify example app by moving renderBoard call into useGame
- Remove useMounted and manual renderBoard call from example App
- Call renderBoard from useGame useEffect on initialization
- Follow vim-maze pattern for cleaner example app
2025-11-03 21:46:42 +00:00
pastilhas c036dc372d feat: implement game board rendering and spaceship player control
- Create 10x20 game board grid with retro styling
- Render spaceship emoji at player position (bottom center)
- Implement cursor movement with hjkl (left/right only)
- Add moveToStart (0) and moveToEnd ($) anchor motions
- Re-render board when cursor position changes
- Board displays dark grid with highlighted player row
2025-11-03 21:41:26 +00:00
pastilhas 80f7aa3f8a chore: initialize typing-chud project with Unified API structure
- Copy vim-snake structure stripped of game-specific logic
- Remove finalScore calculation (raw data only)
- Setup example app with keybinding state management
- Empty board renders and waits for game logic
2025-11-03 21:36:09 +00:00