MindPuck.Unity/BIBLE
MindPuck.Unity — Project Bible
Single source of truth for what MindPuck.Unity IS, is NOT, and the rules that keep it coherent. README says how to build and run it; the rules themselves are in MindPuck.Web's
docs/DESIGN.md; the finish line lives indocs/RELEASE.md.
1. The one sentence
The Unity 6 port of MindPuck: the same gaze-driven puck game, rules ported one file for one file from MindPuck.Web's TypeScript core to C#.
2. The product promise
- The same three control schemes (magnetic, steer, repulsor; F1), the same solver-proven levels and pars.
- Gaze from MindAttic.Webcam through the
com.mindattic.eyetrackerpackage; the mouse stands in when no tracker is connected. - Nothing in the scene is authored by hand; everything is built from code at runtime.
3. What it is NOT
- Not the canonical game: MindPuck.Web is. This port is frozen and takes no new features.
- Not a WebGL build: the gaze client's
ClientWebSocketdoes not run in WebGL. - Not a camera app: no camera code runs inside Unity.
4. Architecture canon
tracker page --> Webcam bridge (ws://localhost:8787/gaze) --> com.mindattic.eyetracker --> MindPuckGame
MindPuck.Core (rules, no engine refs)
4.1 Assemblies
| Path | Role |
|---|---|
Assets/MindPuck/Core (MindPuck.Core)
|
Port of MindPuck.Web/src/core, noEngineReferences
|
Assets/MindPuck/Game (MindPuck.Game)
|
Camera, table, meshes, loop, IMGUI HUD |
Assets/MindPuck/Editor (MindPuck.Editor)
|
Scene, template materials, build settings, Windows build |
Assets/MindPuck/Tests (MindPuck.Tests)
|
NUnit EditMode tests for the core |
4.2 Domain model
Same as MindPuck.Web: table 16 x 9 (table x = world +X, table y = world -Z), Level, GazeMode, PuckSim.
4.3 Key services
PuckSim.Advance (120 Hz), LevelGen.GenerateLevel on a worker thread, Solver.SolveLevel, ProjectSetup.CreateScene / BuildWindows.
5. The Laws
Inherits MindAttic.HouseRules.md by reference.
- The core is a port, not a design. Same constants, same order of random draws,
doubleeverywhere,Math.Floor(x + 0.5)for JavaScript rounding. - Frozen. Rule changes land in MindPuck.Web first and are ported only on the owner's request.
- Gaze package changes are commits in MindAttic.Webcam, which must be cloned beside this repo.
- Tests are NUnit and run only when the owner asks.
6. Verified state
- Port with core tests and generated scene (MPU-T2,
d6caf79); magnetic (MPU-T3), steer (MPU-T4), steer anchoring (MPU-T5,11e7bf1). - 44/44 tests green at
7a28547(MS-1 check 2, 2026-11-20).
7. Active frontier
docs/RELEASE.md: shared milestone MS-1; this repo's part is the frozen port on the run menu.
8. Quality bar
The project compiles in Unity 6000.4.3f1, the Windows player builds, and the core still matches the web core for the same seed.
9. Glossary
See MindPuck.Web docs/BIBLE.md §9 (par, hold, steer anchor, bridge).