Building a VR Vision Therapy Game: Translating Neuroplasticity Research into Gameplay Mechanics
Last week, ScienceDaily covered a study that made me rethink our entire technical approach: adult mouse astrocytes don't just migrate to injury — they manufacture new nuclei and shuttle them through cellular tunnels to rebuild damaged networks. Active reconstruction in the adult brain.
At Seven Sportz, we're building AmblyoPunch — a Meta Quest VR game for amblyopia (lazy eye) that delivers dichoptic training through a punch-the-coins, dodge-the-spikes loop. Here's how this research maps to our Unity/Unreal implementation decisions.
The Science → Spec Pipeline
Research insight: Adult plasticity requires sustained, structured binocular demand. Dosage matters more than intensity. The astrocyte study shows the brain allocates repair resources where repeated, structured demand signals persistent need — not where a single high-intensity burst occurs.
Game design translation: 15-minute daily sessions, four progressive stages. We track streak data locally and surface it to the player — not as "homework completed" but as "neural highway maintenance done." The 15-minute window aligns with perceptual learning literature showing plateau effects beyond 20 minutes, while the streak mechanic mirrors the "sustained demand" signal the research highlights. Each missed day resets the streak counter, reinforcing the dosage-over-intensity principle.
Dichoptic Rendering in Unity URP
// Simplified: each eye gets a dedicated camera with culling mask
// Left eye sees CoinLayer, Right eye sees SpikeLayer (swapped per stage)
var leftEyeCam = xrRig.camera.leftEyeCamera;
var rightEyeCam = xrRig.camera.rightEyeCamera;
leftEyeCam.cullingMask = LayerMask.GetMask("Default", "LeftEyeOnly");
rightEyeCam.cullingMask = LayerMask.GetMask("Default", "RightEyeOnly");
The Gabor-pattern coins? Procedural shaders generating oriented spatial frequency gratings — the same stimuli used in perceptual learning papers (Levi & Li, 2009). We parameterize spatial frequency, contrast, and orientation per stage. The shader runs entirely on GPU, keeping frame time under 11 ms on Quest 2. We also bake a fallback texture atlas for devices that hit shader complexity limits, ensuring consistent stimulus fidelity across the Meta Quest product line.
// Fragment shader snippet for Gabor coin
float gabor(float2 uv, float freq, float angle, float sigma) {
float2 rot = rotate(uv, angle);
return exp(-dot(rot, rot) / (2.0 * sigma * sigma)) * cos(2.0 * PI * freq * rot.x);
}
Adaptive Difficulty = Plasticity Gatekeeping
The astrocyte study suggests the brain allocates repair resources where sustained demand signals need. Our Stage 1–4 progression isn't arbitrary:
| Stage | Spatial Freq (cpd) | Disparity | Exposure Time |
|---|---|---|---|
| 1 | 2.0 | 20 arcmin | Unlimited |
| 2 | 4.0 | 15 arcmin | 3 sec |
| 3 | 6.0 | 10 arcmin | 2 sec |
| 4 | 8.0 | 5 arcmin | 1.5 sec |
Each stage unlocks only after 5 consecutive days of ≥80% fusion accuracy. No skipping. The brain gets the signal: "this pathway matters, allocate resources." The spatial frequency steps mirror the contrast sensitivity function's ascent, while disparity reduction trains finer stereopsis. Exposure time limits force faster binocular integration — exactly the "structured demand" the research identifies as the trigger for cellular resource allocation.
Telemetry Without Surveillance
We log anonymized session data (fusion accuracy, reaction time, stage progression) to a local JSON store. Optional opt-in upload for research partners. No PII. The goal: let clinicians see adherence curves, not spy on patients. The local-first architecture means the game functions fully offline; upload occurs only when the user explicitly enables "Share Progress" in settings. Data schema is versioned and documented in the repo for transparency.
What's Next
- OpenXR hand tracking for controller-free play (reduces setup friction)
- ResearchKit integration for formal trial onboarding
- Shader Graph version of Gabor generator for non-coder tweaks
- Dynamic contrast scaling based on real-time fusion accuracy
- Multi-language localization for international clinic partners
Try It / Contribute
Meta Quest store: https://www.meta.com/en-gb/experiences/amblyopunch/1239507485902689/
Repo (private, but open to collabs): DM me
The adult brain builds highways. Our code just gives it traffic.
Top comments (0)