Stop Rewriting Game Backends: 6 Pluggable Solvers & Hybrid Physics Composition
How Billiards, Chess, Competitive FPS, and Particle Sandboxes run on one shared data plane configured purely by schema.
A multiplayer platform built to host thousands of games cannot afford bespoke backend rewrites per title. Playna separates room orchestration and simulation into **6 standalone game-agnostic physics and turn-arbiter modules**.
1. Matching Server CPU to Game Dynamics
Ticking an idle pool table or chess board at 60 Hz wastes server resources.
- **`swept_ccd` (`0x61`)**: Solves the entire continuous collision chain once per impulse and broadcasts keyframes with zero idle tick overhead.
- **`turn_based` (`0x66`)**: Idles at **0 Hz** for Chess, Checkers, Card Games, and Sudoku, awakening strictly to verify `active_slot` and `turn_seq`.
- **`kinematic_ecs` (`0x64`) & `rigid_body` (`0x63`)**: Deliver 60–128 Hz sub-stepped simulation, movement bounds, and rewind history for fast shooters and physics brawlers.
Every generated SDK embeds `PHYSICS_RUNTIME_GUIDE` for **TypeScript, Godot 4.7.2, Unity, Unreal, and Bevy**, documenting the exact client rendering loop for the selected physics profile.
2. Running Hybrid Solvers Inside One Room
A tactical shooter walks on `kinematic_ecs` while arcing grenades on `ballistics`; turn-based golf gates turns with `turn_based` while computing trajectories with `ballistics`.
{
"simulation": "kinematic_ecs",
"secondary_providers": ["ballistics"],
"capabilities": ["lag_compensation"],
"tick_rate_hz": 64,
"params": {
"max_speed_mps": 12.0,
"gravity_mps2": 9.81,
"aoi_radius_m": 120.0
}
}
Schema validation automatically enforces safe composition rules and rejects redundant pairs such as `swept_ccd + lag_compensation` or `turn_based + rollback`.
Inside Move, Shoot & AOI: Spatial Interest Filtering Meets Rewind Hitscan
Cutting redundant bandwidth in wide arenas while keeping sub-frame shot validation cheat-proof.
One of the most common questions in multiplayer action architecture is straightforward: does **Shoot** belong inside **Move** physics, or in a separate solver?
Move + AOI: Replicating Only What Each Player Can See
In Playna, step-distance validation and Area of Interest (`visibility: "aoi"`) operate inside the replication layer alongside your simulation solver:
- Actors locomote under `kinematic_ecs` (`0x64`) clamped by `max_speed_mps` and world bounds.
- Outgoing delta snapshots filter every entity outside each recipient's `aoi_radius`.
- Withholding distant enemy coordinates from the wire simultaneously shrinks packet bandwidth and prevents client radar/map cheats.
Shoot: Hitscan Ray vs Ballistic Projectile
| Weapon Mechanic | Solver Configuration | Server Authority |
| **Instant Hitscan (CS / Valorant)** | `kinematic_ecs` + `lag_compensation` | Rewinds target spheres to `T - RTT/2` and checks 3D ray intersection |
| **Arcing Projectile (PUBG / Archery)** | `kinematic_ecs` + `secondary: ["ballistics"]` | Locomotion stays in AOI while fire frames evaluate gravity, wind & drag |
On the client, discrete 20–60 Hz updates smooth cleanly up to 144/240 Hz via buffered `LERP` and quaternion `SLERP`.
Zero Plaintext by Design: QUIC, HTTP/3 WebTransport, WSS & Raw TCP/UDP under Strict TLS 1.3
End-to-end TLS 1.3 encrypted binary framing across web, mobile, and native desktop game engines.
Plain HTTP (`http://`) and unencrypted WebSockets (`ws://`) are disabled by policy across both Control and Data planes. Every client authenticates over **HTTPS / TLS 1.3** and exchanges fixed-offset little-endian binary frames.
MTU-Aware Channel Routing
Your chosen physics profile and packet size hint the optimal delivery channel:
- **Reliable Ordered Streams (`QUIC Stream` / `WSS`):** Serialized `turn_based` moves and trajectory frames exceeding standard 1200-byte UDP MTU boundaries route cleanly over reliable streams.
- **Unreliable Sequenced Datagrams (`HTTP/3 WebTransport` / `DTLS UDP`):** High-frequency 60 Hz transforms and granular grid diffs travel over datagrams to eliminate Head-of-Line blocking.
Zero Serialization Drift with CRC32 `schema_hash`
Every published ECS schema locks a CRC32 `schema_hash` embedded inside generated **TypeScript, Godot 4.7.2, Unity, Unreal, and Bevy** codecs, catching serialization mismatches immediately during handshake.
Every public Wiki page and Blog article is automatically exposed via **`/llms.txt`**, **`/llms-full.txt`**, **`/sitemap.xml`**, **`/rss.xml`**, and clean **`.md`** raw files for seamless indexing by search engines and AI agents.