A room of devices now plays one game: host simulates, clients send input and render replicated truth. - libs/game/sim/player.rs: Players roster on GameWorld, slot 0 is always this device. Player 0's input stays in the world's original held/pressed/ pad/cam_yaw fields and is mirrored into the roster, which is what keeps single-player numerics bit-identical (tape gate confirms). Ids are never reused, so a stale reference resolves to None, never to somebody else - The camera-movement knot resolved: world.player_move(p) rotates that player's axes by THEIR cam_yaw, carried in their input packet. Player 0's branch is the original expression character-for-character (the f32 cos widened to f64 kept deliberately — tidying it would move the numbers) - libs/game/session/replication.rs: Shared = pos/vel/size/kind/tag; Derived = facing/anim/scale/glow/blob shadows, recomputed client-side and costing zero wire bytes; Local = camera/audio/effects. Statics never enter the per-tick stream - Protocol (additive, version unchanged): EntityDesc + Descriptors message splits rare reliable construction data from volatile unreliable state — without it a joiner sees poses for entities it cannot build. EntityDesc carries pos because statics never appear in the state stream (the late-joiner test caught ground arriving at the origin) - Script: game.players/player_name/player_entity/player_input/bot/on_join/ on_leave; blocks gained owner: PlayerId so a car reads its own driver - Arcade: ARCADE_HOST=1 / ARCADE_JOIN=<addr>; clients skip world construction and don't simulate - Racing wire volume, 6 players x 60Hz x 200 entities: 2400 pps, 20.9 Mbit/s up (audit projected 74 Mbit for the XR stack). Asserted in racing_scenario_wire_volume_fits_a_living_room Two more not-a-playable-default bugs, same class as M1b's rng-at-zero: Entity::default() leaves gravity_scale 0 (weightless wheels) and ground without friction gives no traction — only the DSL path filled these in. 255 tests green; tape probe BYTE_IDENTICAL; xr/arcade/gamemaker build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14 lines
513 B
TOML
14 lines
513 B
TOML
[package]
|
|
name = "makepad-game-session"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Makepad Arcade multiplayer session: replication tiers + host/client drivers (see game.md)"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[dependencies]
|
|
makepad-game-sim = { path = "../sim" }
|
|
makepad-game-blocks = { path = "../blocks" }
|
|
makepad-game-net = { path = "../net" }
|
|
makepad-game-math = { path = "../math" }
|
|
makepad-math = { path = "../../math", version = "1.0.0" }
|
|
makepad-live-id = { path = "../../live_id", version = "1.0.0" }
|