Commit Graph

4 Commits

Author SHA1 Message Date
Heller
d83234c8be fix: smooth tail via separate line segment, body path stays grid-snapped
Tail is now drawn as a separate DrawLine from interpolated tail position
to the grid-snapped second-to-last segment. Body path (segment[N-2]→head)
stays grid-snapped, preserving sharp corners while tail glides smoothly.
2026-06-19 10:18:26 +00:00
Heller
4446bd778f fix: interpolate only head, pin all other segments to grid
Tail interpolation caused diagonal shortcuts at corners because
the interpolated tail position would drift while the adjacent
segment was already at its new grid position. By keeping only
the head interpolated, L-shaped bends render correctly.
2026-06-19 10:14:51 +00:00
Heller
d483cd0660 fix: only interpolate head and tail, keep middle segments grid-snapped
Prevents diagonal shortcuts when snake bends — middle segments stay
at exact cell centers so L-shaped corners render correctly.
2026-06-19 10:12:32 +00:00
Heller
7d55a08380 feat: smooth snake animation + beautiful Avalonia UI overhaul
- Two-timer architecture: game timer + 60fps render timer for smooth interpolation
- Snake body: StreamGeometry path with teal gradient, rounded joins
- Directional head with white eyes and dark pupils
- Food: pulsating glow, highlight, green leaf animation
- Modern dark theme (#0D1117), glassmorphism HUD
- Speed indicator bar, score +N popup
- High score persistence to JSON
- All keyboard shortcuts: Arrows, WASD, Space/P pause, Enter start, R restart, Esc quit
- Window resizable, 640x540 default

New files: AnimationHelper.cs, HighScoreManager.cs, SnakeRenderer.cs
2026-06-19 10:02:07 +00:00