feat(simulation): add input processing, snapshot gen, and game loop

Implements the full server-side tick pipeline:
- process_player_input drains InputQueue, converts PlayerActions to
  MoveIntent components or pause/unpause toggles
- generate_snapshot builds ObserverSnapshot from ECS state with
  render coordinate conversion
- receive_bridge_inputs/send_bridge_snapshot handle bridge I/O with
  graceful disconnect detection via ServerRunning resource
- main.rs now accepts TCP connections and runs a proper game loop
- PlayerCharacter marker, Player EntityKind, SnapshotBuffer resource

Closes server side of #81, #82, #83.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 21:01:28 +01:00
co-authored by Claude Opus 4.6
parent 1b0e514560
commit 7864bfdf7d
7 changed files with 397 additions and 10 deletions
+5 -2
View File
@@ -20,10 +20,13 @@ impl Plugin for SimulationPlugin {
app.init_resource::<time::SimulationTime>()
.insert_resource(rng::SimRng::new(0))
.init_resource::<input::InputQueue>()
.add_systems(Update, time::advance_tick)
.add_systems(
Update,
movement::validate_movement.after(time::advance_tick),
(
input::process_player_input,
time::advance_tick.after(input::process_player_input),
movement::validate_movement.after(time::advance_tick),
),
);
tracing::debug!("SimulationPlugin initialized");