Parallax Constraint Solver
Deterministic validator and constraint-solver prototype for a co-op game where every player sees a different room
Role
Solo Developer & Designer
Tech Stack
5 technologies
About This Project
Parallax is a cooperative game design for four to ten players who share one level but not one reality. Each player's client renders the same world differently: your bridge is my chasm, the sign I can read is runes to you, the statue you keep mentioning doesn't exist on my screen. Nobody is lying, and no puzzle can be solved from a single point of view, so the core of the game is reconciling honest, incompatible descriptions out loud.
The constraint solver is what makes that work. Rooms are hand-built, but at the start of each round the solver decides, for that seed, which players perceive which version of each object. The room's author declares the constraints, and the solver guarantees the room can only be solved by communicating. Replaying a room you know is a different game, because what changes between runs isn't the solution but who holds which piece of it.
Because the solver and its guarantees are the project's biggest risk, it is being built first, in Python and outside the game engine. The foundation is finished: a deterministic, three-stage validator. Room files are checked for structure against a versioned JSON Schema, then for cross-references, then for semantics, down to a bounded state-space search proving the win condition can be reached across the whole player range. Validated rooms become a typed, read-only model that the solver will consume. The plxvalidate CLI checks every room in the repository and is meant to become the gate for community-made rooms. The suite has 226 tests, including property-based tests, and branch coverage is held at 100% with no exclusion list. The constraint solver and its reachability proof come next.
Key Features
- ◆Stage 1, structural: every .plxroom file is validated against a versioned JSON Schema
- ◆Stage 2, referential: every cross-reference in the room is checked against a registry
- ◆Stage 3, semantic: noise budget, communication floor, perceiver arithmetic and variant liveness across the full player range, and consensus thresholds
- ◆Win-logic attainability proven with a bounded state-space search over the room's logic
- ◆A typed, read-only room model that round-trips losslessly, so everything downstream consumes validated data instead of raw JSON
- ◆A plxvalidate CLI with a single pipeline entry point and a catalog of diagnostic codes
- ◆226 tests, including Hypothesis property-based tests, against a corpus of deliberately broken rooms
- ◆100% branch coverage, enforced by pytest's default arguments with no exclusion list, so a drop fails locally before it fails in CI
Challenges
Proving a room can only be solved through communication, from constraints the room's author declares
Taking the riskiest part of the game, the solver and its proofs, out of the engine so it could be tested on its own first
Using a custom JSON room format with its own parser, so community-made rooms can't carry arbitrary code
Outcomes
- ✓All three validator stages complete: 226 tests passing at 100% branch coverage (1,272 statements, 546 branches)
- ✓One package acts as the repo's CI validator, the future ingest gate for community rooms, and the prototype of the runtime solver
- ✓Next: the constraint solver itself, then the reachability proof that every seed it produces is solvable
Tech Stack
Want to talk about this project?
Questions, collaboration, or overlapping research: send a raven.
Get in Touch