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:
@@ -10,6 +10,10 @@ use std::collections::HashMap;
|
||||
/// Chunk size in tiles (32x32 per chunk)
|
||||
pub const CHUNK_SIZE: i32 = 32;
|
||||
|
||||
/// Marker component identifying the player-controlled entity.
|
||||
#[derive(Component, Debug)]
|
||||
pub struct PlayerCharacter;
|
||||
|
||||
/// Tile position component for grid-based movement.
|
||||
/// Discrete integer coordinates used in simulation; converted to f32
|
||||
/// at the bridge boundary for VisibleEntity wire format.
|
||||
|
||||
Reference in New Issue
Block a user