10 Commits

Author SHA1 Message Date
Heller
90fd0f592f fix: virtual grid-snapped tail anchor prevents corner diagonals
Body path now goes: interp_tail → grid_tail → segment[N-2] → ... → head.
The short leg from interpolated to grid-snapped tail is always straight
(same direction), and from grid_tail onward the path strictly follows
the grid — preserving sharp corners while tail stays smooth.
2026-06-19 10:27:42 +00:00
Heller
c1b9543c47 feat: tail interpolates like head (mirrored with ease-in)
Tail now uses the same approach as head: interpolated in the body path
from its previous position, with ease-in (mirror of head's ease-out).
Ghost circle removed — no longer needed since tail is naturally smooth.
Added EaseInCubic to AnimationHelper. InterpolatePosition now uses
string easing mode instead of bool.
2026-06-19 10:25:31 +00:00
Heller
36bfe5ad45 fix: tail as full body segment + fading ghost for smooth illusion
Tail is now part of the main body path (grid-snapped, full thickness,
sharp corners). Smooth movement illusion via fading ghost circle at
the old tail position that fades out during the tick.
2026-06-19 10:22:33 +00:00
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
dcb65831ac fix: smooth tail interpolation for non-growing snake
When snake doesn't grow, the last segment (new tail) should interpolate
from the old tail's position (previous[segmentIndex]), not from the
second-to-last segment (previous[segmentIndex-1]) which didn't move.
2026-06-19 10:08:56 +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
Heller
0d9710965c feat: fully functional CLI and Avalonia UI for Snake game 2026-06-17 19:03:22 +00:00
Heller
42fcaf8631 feat: initial project structure with Snake.Core, CLI and Avalonia skeleton 2026-06-17 19:02:07 +00:00