Inspiration
Putting practice is repetitive by design, but access to a green is not. Ghost Golfer explores what AR glasses can add that a phone cannot: a regulation-scale ball, line, target, and coaching cues placed directly on the floor where the golfer is already looking. It creates a virtual rehearsal space without requiring a real ball, club, green, or SPECS hardware for the hackathon demo.
What it does
- Places a floor-anchored virtual putting station and lets the player move and lock the whole setup.
- Offers 5, 10, 15, 20, and 25 ft practice ranges while preserving real-world ball, hole, and target sizes.
- Lets the player adjust the intended line while the hole remains stationary.
- Supports a genuine virtual stroke gesture: drag the cyan ring back, then stroke forward through the ball.
- Derives launch direction from the forward path and travel distance from player-controlled displacement.
- Keeps the experience deterministic: no random physics, automatic correction, or hidden aim assistance.
- Runs continuous multi-putt sessions in which every completed endpoint becomes the next starting position.
- Tracks putt count and actual horizontal distance remaining to the fixed regulation-size hole.
- Uses Ghost Coach to compare the cyan intended path with the amber actual path and give one concise correction.
- Keeps the larger 22.5 cm practice target separate from the 10.8 cm regulation hole, so “On Target” never silently means “holed.”
How it was built
The project was planned with the Devpost Learn skill pack, then built in Lens Studio through CLAD and the Lens Studio MCP. The runtime is TypeScript and uses Spectacles Interaction Kit for interaction and Spectacles UI Kit for spatial controls. Lens coordinates and geometry use centimeters. Practice ranges use the exact conversion 1 ft = 30.48 cm.
The stroke model is deliberately simplified and deterministic. A transient input adapter validates address, backswing, forward movement, impact, cancellation, and duplicate-impact protection. The stroke model converts the accepted forward vector into direction and the gesture displacement into strength. The multi-putt reducer persists the actual endpoint, keeps the hole fixed, rebases the next guide and stroke handle, and computes remaining horizontal distance from world-space ball and hole positions rather than subtracting shot length from the selected range.
The release was verified with 103 dependency-free Node tests, Lens Studio TypeScript compilation, clean runtime initialization, and owner-performed interaction walkthroughs in SPECS 27 Interactive Preview.
Challenges
The hardest parts were keeping a stable saved Lens project while authentication and package tooling changed, aligning virtual geometry with the simulated floor, making compact controls readable without covering the putting path, and re-arming a real second and third manual stroke after rebasing the ball. The final design uses explicit phases and deterministic reducers so controller state, menu state, visual state, and putt counting cannot silently drift apart.
Accomplishments
- A complete spatial putting journey rather than a single technical effect.
- Player-controlled direction and strength with repeatable deterministic outcomes.
- A fixed-hole, endpoint-persistent multi-putt session with remaining distance and putt count.
- Clear distinction between the practice target and genuine hole completion.
- A compact, view-aware menu and readable target-adjacent coaching.
- 103 passing automated tests plus owner-verified SPECS 27 Preview interaction.
What we learned
AR interface design is not simply a flat menu placed in front of the user. The controls must stay legible while the golfer looks down, remain clear of the ball and path, and appear only when the current phase makes them useful. We also learned to separate pure deterministic logic from Lens-specific rendering and interaction so the calculations could be tested independently before spatial integration.
What’s next — Future Vision, not a current feature
The video closes with a clearly labelled concept for future on-course use: helping golfers visualize terrain, compare possible paths, and rehearse while waiting for a turn. The submitted Lens does not sense real slopes, map a physical green, track a real club or ball, or predict a calibrated real-world shot. Those ideas would require supported sensing, device validation, calibration, safety work, and new testing beyond this hackathon build.
Built With
- clad
- git-lfs
- github
- lens-studio-5.23.2
- lens-studio-mcp
- node.js
- spectacles-interaction-kit
- spectacles-ui-kit
- typescript