Commit Graph
4 Commits
Author SHA1 Message Date
Emil 3aa67140c8 feat: vector-based movement for responsive control and air strafing
Changed from physics-based (accumulate + damping) to vector-based:

- Horizontal velocity is SET directly, not accumulated
  - Press A → cvx = -0.5 (instant, no ramp-up)
  - Release → cvx = 0 (instant stop, no sliding)
  - No horizontal damping = precise control
- Air strafing: same horizontal speed in air as on ground
  - Can change direction mid-jump freely
- Vertical: gravity + minimal damping (0.99) for natural fall
  - Jump sets cvy directly, gravity pulls back
- move_speed 0.5 (was 0.3), max_vel 2.0 (was 1.0)
- Player: move_dir tracks current direction, stop_horizontal() clears velocity
- handle_input: calls stop_horizontal when no movement key held

109 tests, 0 warnings, 0 failures
2026-06-20 23:35:41 +03:00
Emil 9fe7137e45 feat: bigger characters (16 sub-bodies), wider terminal viewport
- Entity: 16 sub-bodies (was 7), radius 0.7 (was 0.4), full humanoid
  shape: head, shoulders, torso, arms, hips, legs, feet
- Terminal: viewport up to 250x80 (was 120x50), uses full terminal size
- Camera: uses renderer viewport dimensions instead of hardcoded values
- Physics: constraint correction clamped to 0.5 cells max, 8 substeps
  (was 4), gravity 0.04 (was 0.08), collision pass after each constraint
  iteration to prevent tunneling with larger bodies
- Player: move_speed 0.3, jump_force 1.2 for bigger body
- Spawn: 6 cells above surface (was 4) for taller body
2026-06-20 21:27:11 +03:00
Emil 3cd94a386a fix: collision tunneling, spawn at surface, physics substepping
- Fix: rewrite resolve_grid_collision to push body out of solid cells
  when center is inside (was only pushing to small radius from center)
- Fix: max velocity clamp (0.8) + 4x substepping prevents tunneling
- Fix: player/goblin spawn at terrain surface instead of mid-air
- Fix: gravity reduced from 0.3 to 0.08 for substepping
- Add: headless mode (--headless-ticks N) dumps grid state to file
- Add: velocity zeroing on collision for stable resting
2026-06-20 18:26:33 +03:00
Emil 68f6292c4d feat: Verbatim MVP - terminal renderer, cellular automaton, Verlet physics
- World: 250x250 grid with 14 materials (sand, water, lava, stone, wood, etc.)
- Physics: cellular automaton for materials + Verlet solver for entities
- Entity: multi-cell humanoid (7 sub-bodies with distance constraints)
- Render: terminal renderer with ANSI colors and diff-based updates
- Game loop: fixed 60Hz timestep with accumulator pattern
- Input: WASD movement, number keys for material painting
2026-06-20 18:21:26 +03:00