AquaVision
A serious game leveraging dichoptic training principles for amblyopia treatment through binocular visual stimulation and interactive gameplay.
Install / Use
/learn @clerancebae/AquaVisionREADME
🐟 Dichoptic Amblyopia Therapy Game
A serious game leveraging dichoptic training principles for amblyopia treatment through binocular visual stimulation and interactive gameplay.
📖 Overview
This project presents a Serious Game designed to support the clinical treatment of Amblyopia (Lazy Eye) through evidence-based dichoptic training methodology. Unlike conventional video games, this application enforces binocular vision usage by presenting separate, complementary visual stimuli to each eye using Anaglyph 3D technology (Red/Cyan glasses).
Core Therapeutic Approach
- Amblyopic Eye: Assigned primary task (follow the enemy fish)
- Dominant Eye: Processes environmental obstacles (player control fish escape from enemy fish)
- Therapeutic Goal: Force binocular fusion for successful gameplay
The application employs a high-contrast black background to minimize visual noise and isolate targeted photoreceptor stimulation, ensuring maximum therapeutic efficacy.
🎨 Game Screenshots
<details> <summary><b>📸 Click to view game screenshots</b></summary> <br>
<br>
Main menu with gradient rounded buttons and ocean-themed background
<br>
Mission selection screen with level unlocking system and shell icons
<br>
Dichoptic fish rendering with real-time phase progression tracking
<br>
Configuration interface with live color calibration preview
<br>
Real-time dichoptic color adjustment with live fish preview
🧠 Clinical & Scientific Rationale
<details> <summary><b>📚 Click to expand scientific background</b></summary> <br>Background
Traditional amblyopia treatment relies primarily on monocular occlusion (eye patching), which presents several limitations:
- Poor patient compliance, especially in pediatric populations
- Limited binocular function recovery
- Potential for reverse amblyopia
Evidence-Based Design
Contemporary research demonstrates that dichoptic stimulation can significantly improve:
- Binocular visual function
- Contrast sensitivity thresholds
- Stereoscopic depth perception
- Visual acuity in the amblyopic eye
Therapeutic Mechanisms
This application implements dichoptic principles through:
- Suppression Reduction: Diminishing dominance of the stronger eye
- Task Relevance: Increasing visual processing demands on the amblyopic eye
- Binocular Cooperation: Enforcing integration of both visual streams for task success
- Cognitive Load Management: Minimalist design maintains focus on visual processing
✨ Key Features
🎯 Dichoptic Rendering Engine
- Dynamic color channel separation based on lazy eye configuration
- Real-time RGB calibration for optimal channel isolation
- Anti-aliasing and resolution-independent vector rendering
🧪 Clinically Inspired Motion Patterns
| Pattern | Therapeutic Target | Description | |---------|-------------------|-------------| | Saccadic | Rapid eye movements | Quick, discrete position changes | | Smooth Pursuit | Tracking ability | Continuous smooth motion paths | | Vergence | Depth processing | Convergence/divergence stimulation | | Peripheral Awareness | Visual field expansion | Off-axis motion detection |
📊 Comprehensive Progress Tracking
- SQLite-based persistence with full ACID compliance
- Detailed session metrics (mission progress, failure analysis, attempt counts)
- Timestamped performance history for longitudinal analysis
- Export-ready data structure for clinical review
⚙️ Custom Calibration System
- Fine-grained RGB value adjustment (0-255 per channel)
- Support for various anaglyph glasses brands/specifications
- Per-eye contrast balancing
- Real-time preview during calibration
📈 Progressive Difficulty System
- 5 Missions × 15 Phases = 75 unique challenge levels
- Parametric difficulty scaling:
- Enemy spawn rate
- Movement speed multipliers
- Trajectory complexity
- Density and clustering patterns
🎮 Game Mechanics
<details> <summary><b>🕹️ Click to view game mechanics</b></summary> <br>Concept Navigate a bioluminescent fish through a dark aquatic environment while avoiding predators. Success requires functional binocular vision—each eye contributes essential information.
Rules & Constraints
- Hardware: Red/Cyan anaglyph glasses (required)
- Visual Separation:
- Left eye (red filter): Perceives player fish only
- Right eye (cyan filter): Perceives enemy fish only
- (Configuration inverts based on lazy eye selection)
- Fusion Requirement: Brain must merge both visual inputs to succeed
- Failure Condition: Collision with any enemy fish
- Progression: Complete 15 phases per mission to unlock the next
Therapeutic Session Guidelines
- Duration: 15-20 minutes per session
- Frequency: 3-5 sessions per week (recommended)
- Environment: Low ambient light, minimal distractions
- Posture: Comfortable viewing distance (40-60cm from screen)
🛠 Technical Architecture
<details> <summary><b>⚙️ Technology Stack</b></summary> <br>| Component | Technology | Version | |-----------|-----------|---------| | Language | Java | 21+ | | GUI Framework | Swing | Built-in | | Graphics | Java2D (Graphics2D) | Built-in | | Database | SQLite | 3.40+ | | JDBC Driver | sqlite-jdbc | Latest |
</details> <details> <summary><b>📂 Application Structure</b></summary> <br> <pre> src/ ├── Main.java # Application entry point with icon & sound initialization ├── ui/ │ ├── BasePanel.java # Base JPanel class (600x600, null layout) │ ├── StartPanel.java # Main menu with gradient rounded buttons │ ├── MissionPanel.java # Mission selection screen with level unlocking │ ├── SettingPanel.java # Configuration interface with live color preview │ └── Game.java # Core gameplay panel with phase system ├── model/ │ ├── Player.java # Player fish entity (inside Game.java) │ ├── EnemyFish.java # Enemy fish entity (inside Game.java) │ ├── PhaseData.java # Phase statistics data class (inside Game.java) │ ├── PatternManager.java # Movement pattern factory (inside Game.java) │ ├── FishPattern.java # Pattern container (inside Game.java) │ └── SpawnInstruction.java # Spawn timing data (inside Game.java) ├── config/ │ ├── LazyEyeConfig.java # Dichoptic color channel configuration │ └── FishColorConfig.java # Legacy color configuration (deprecated) ├── rendering/ │ └── FishRenderer.java # Vector-based fish rendering with Path2D ├── audio/ │ └── SoundManager.java # Background music and volume control └── persistence/ └── DatabaseManager.java # SQLite integration for progress & settingsresources/ ├── progress.db # Auto-generated SQLite database ├── appLogo.png # Application icon ├── background.png # Main menu background ├── MissionBackground.png # Mission selection background ├── level_active.png # Unlocked mission icon ├── level_locked.png # Locked mission icon ├── return.png # Return button icon ├── close.png # Close button icon └── Child_Game_Bg_Music.wav # Background music file </pre>
</details> <details> <summary><b>🔄 Panel Hierarchy & Navigation Flow</b></summary> <br> <pre> Main.java └── Creates JFrame (600x600, undecorated) │ └── StartPanel (Main Menu) ├── RoundedButton: "Start" → MissionPanel ├── RoundedButton: "Settings" → SettingPanel (JDialog) └── RoundedButton: "Exit" → System.exit(0) │ ├── MissionPanel (Mission Selection) │ ├── Return Button → StartPanel │ └── Level Buttons (1-5) → Game (in new JFrame) │ │ │ └── Game (Gameplay) │ ├── ESC Key → PauseDialog (JDialog) │ │ ├── Resume → Continue game │ │ ├── Restart → restartMission() │ │ ├── Return to Missions → Close JFrame │ │ └── Exit → System.exit(0) │ │ │ ├── On Collision → ResultDialog (JDialog - Failure) │ │ ├── Try Again → restartMission() │ │ └── Exit → returnToMissionPanel() │ │ │ └── On Completion → ResultDialog (JDialog - Success) │ └── Continue → returnToMissionPanel() + unlock next level │ └── SettingPanel (Configuration Dialog) ├── Music Volume Slider (Custom SeaSliderUI) ├── Eye Selection (RadioButtons: Left/Right) ├── Color Calibration Boxes │ ├── Click Player Box → Live Color Dialog │ └── Click Enemy Box → Live Color Dialog ├── Preview Panel (with FishRenderer) └── Close Button → Dispose dialog </pre> </details>🧩 Core Systems
<details> <summary><b>1️⃣ LazyEyeConfig</b></summary> <br>Purpose: Centralized dichoptic color channel management
Key Features:
- Stores base player and enemy colors
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
