I'll build an interactive tilt marble labyrinth game with a wooden board aesthetic, maze walls, holes, checkpoints, and physics-based marble movement. Let me start by exploring the project structure.
Now let me build the full marble labyrinth game. I'll create the game engine component and the main app wrapper.
Now let me create the main game engine component:
Let me fix the TypeScript errors:
Now let me update the App.tsx to use the game component and update the HTML title:
Let me build to check for any remaining issues:
The build succeeded. However, I realized the maze walls might not create a guaranteed solvable path. Let me redesign the maze with a carefully verified solution path, and also improve the overall game polish:
Now let me improve the game component with better visuals and game feel:
The game builds successfully. Let me fix one unreachable hole I noticed and also add a subtle grid overlay for better navigation:
Now let me add a subtle grid overlay to the board for better spatial awareness:
The build succeeds. Let me add device orientation support for mobile (using the actual gyroscope for tilt), and add a subtle screen shake effect when the marble falls:
Now let me add device orientation support for mobile gyroscope tilt:
Now update the cleanup to handle device orientation:
Let me add a subtle screen shake effect for better game feel:
Now apply the shake effect to the canvas container:
Now add the shake animation to the CSS:
The build is successful. The marble labyrinth game is complete. Here's a summary of what was built:
🪵 Marble Labyrinth
Features:
- Wooden Board - Procedurally generated wood grain texture for both the frame (darker oak) and playing surface (lighter maple), with realistic knots and grain patterns
- 8×8 Maze - A carefully designed, verified-solvable labyrinth with 15+ turns and multiple dead ends
- 3D Wooden Walls - Raised wall segments with drop shadows, highlights, and rounded caps
- 8 Holes - Dark circular traps with depth shading and pulsing danger glow that subtly pull the marble toward them
- 4 Checkpoints (CP1-CP4) - Glowing markers along the solution path that save progress; turn green with a star when activated
- Marble Physics - Realistic rolling with gravity (from tilt), friction, momentum, wall bouncing, and hole suction
- Mouse/Touch Tilt Control - Move your mouse over the board or touch/drag on mobile to tilt it
- Device Orientation - On mobile devices, uses the actual gyroscope for natural tilt control
- Visual Effects - Particle explosions when hitting checkpoints or falling, screen shake on hole fall, pulsing goal star
- HUD - Timer, checkpoint progress indicators with live status updates
- Win Screen - Shows completion time and checkpoints collected
- Responsive - Scales properly from mobile to desktop
Files built: src/game/types.ts, src/game/maze.ts, src/game/MarbleLabyrinth.tsx, src/App.tsx, index.html, src/index.css