Emil
19bd883645
feat: window mode with minifb — direct keyboard polling, no terminal
...
New --mode window (now default):
- minifb creates a real OS window (no terminal needed)
- fontdue rasterizes DejaVu Sans Mono glyphs to pixel buffer
- ASCII characters rendered as colored pixels — same aesthetic
- Keyboard polled via get_pressed_keys() every frame:
- Instant response, no terminal delay
- Proper multi-key support (W+A strafing works)
- No Release event hacks needed
- No key repeat timeout hacks
- Instant stop when key released
Controls: WASD/arrows, 1-9/0 paint, X erase, HJKL camera, Q/Esc quit
--mode terminal still available as fallback
109 tests, 0 warnings, 0 failures
2026-06-20 23:58:05 +03:00
Emil
7f4b1dde5e
feat: AI integration - pipe protocol, test framework, replay system
...
AI Session API (src/ai/session.rs):
- GameSession wraps Game with seeded determinism
- init/init_empty, step(n), perform_action, get_state
- get_cell, get_region, get_entities, get_player, count_material
JSON Pipe Protocol (src/ai/protocol.rs):
- --mode pipe: stdin/stdout JSON line protocol
- Commands: init, step, action, get_state, get_view, get_cell,
get_region, get_entities, get_player, count_material, find_material,
record_start/stop, replay_save, run_scenario, quit
Test Framework:
- 27 Rust integration tests (tests/*.rs) covering sand, water, lava,
acid, fire physics + entity movement, damage, ragdoll
- 8 JSON scenarios (scenarios/*.json) runnable via --mode test
- Scenario assertions: cell_is, cell_is_not, no_material_in_region,
material_count_in_region, entity_alive/dead, player_on_ground, etc.
Replay System (src/ai/replay.rs):
- Record all actions + seed for deterministic playback
- ReplayPlayer::play() and play_until_tick() for debugging
- --mode replay --replay-file PATH
Other changes:
- src/lib.rs: library target for integration tests
- Collision: post-constraint collision pass to reduce tunneling
- serde + serde_json dependencies
- All enums use rename_all = snake_case for JSON compatibility
2026-06-20 18:53:21 +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