Project Info
This project did not submit a demo video on Devpost.
Inspiration
Open-world AR applications like Pokemon Go that bring AR into everyday life and the outdoors were major inspirations for this project. Additionally, in thinking about how to integrate smartphones with Spectacles, we found inspiration in video games like Phasmophobia's EMP sensors that react more strongly in the presence of ghosts or The Legend of Zelda: Skyward Sword that contained an in-game tracking functionality that pulsates more strongly when facing the direction of and walking closer to a target.
What it does
This game integrates the Spectacles gear and smartphones together by allowing users to leverage the gyroscopic, haptic, and tactile functionalities of phones to control or receive input about their AR environment. In the game, users have to track down randomly placed treasure chests in their surrounding environment by using their phone as a sensor that begins vibrating when the user is facing a treasure and enters stronger modes of haptic feedback as users get closer to the treasure spots. These chests come in three types: monetary, puzzle, and challenge. Monetary chests immediately give users in-game rewards. Puzzle chests engage users in a single-player mini-game that may require cognitive or physical activity. Finally, challenge chests similarly engage users in activities not necessarily games, and a stretch goal for multiplayers was that if multiple users were near a spot that another user found a treasure in, the other n users could challenge the treasure finder in a n vs. 1 duel, with the winner(s) taking the rewards.
How we built it
Once we figured out our direction for the project, we built a user flow architecture in Figma to brainstorm the game design for our application (link), and we also visualized how to implement the system for integrating phone haptic feedback with the spectacles depending on distance and directional conditions. From there, we each took on specific aspects of the user flow architecture to primarily work on: (1) the treasure detection mechanism, (2) spawning the treasure once the user entered within a short distance from the target, and (3) the content of the treasure chests (i.e. rewards or activities). Nearly everything was done using in-house libraries, assets, and the GenAI suite within Snap's Lens Studio.
Challenges we ran into
As we were working with Spectacles for the first time (compounded with internet problems), we initially encountered technical issues with setting up our development environment and linking the Spectacles for debugging. Due to limited documentation and forums since it is limited-access technology, we had to do a lot of trial-and-error and guessing to figure out how to get our code to work, but luckily, Snap's documentation provided templates to work off of and the Snap staff was able to provide technical assistance to guide us in the right direction. Additionally, given one Spectacle to work with, parallelizing our development work was quite challenging as we had to integrate everything onto one computer while dealing with merge conflicts between our code.
Accomplishments we're proud of
In a short span of time, we were able to successfully build a game that provides a unique immersive experience! We've come across and solved errors that didn't have solutions on the internet. For a couple of members of our team, this sparks a newfound interest in the AR space.
What we learned
This was our first time working with Lens Studio and it's unanimously been a smooth and great software to work with. For the experienced members on our team, it's been a rewarding experience to make an AR application using JS/TS instead of C# which is the standard language used in Unity.
What's next
We're excited to push this app forward by adding more locations for treasures, implementing a point system, and also a voice agent integration that provides feedback based on where you're going so you won't get bored on your journey! If Spectacles would be made available to the general public, a multiplayer functionality would definitely gain a lot of traction and we're looking forward to the future!
This repository has no readme, or GitHub could not be reached.
Analysis
View
Metric
- 15
- 11
- 5
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- JavaScriptIn code
- TypeScriptIn code
2 of 2 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.3 MB
Source files
194
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
dawoon19/treasure-hunt-spectacles
1,138 files · 4.3 MB · @ 50fd2f2
Structure
Application logic
1 file · 0%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript67%
- JavaScript33%
- Markdown0%
Share of indexed source by file size. Binary and vendored files are excluded.
Feature verification
Built on Snap Spectacles / Lens Studio AR platformVerified
Built with figma, github, javascript, lens-studio, spectacles, typescript
Claimed on Devposthigh confidenceSpectacles/Spectacles.esproj— Lens Studio Spectacles project file present, and the codebase consists of TypeScript/JavaScript Lens Studio scripts (.ts/.js) targeting SceneObject/BaseScriptComponent APIs
Challenge chest physical activity (pinata)Verified
Challenge chests engage users in activities not necessarily games (physical/challenge-based)
Claimed on Devposthigh confidenceSpectacles/Assets/PinataGame.ts:27— handleCollision() reduces a health counter on each phone-controller collision with the pinata, triggering haptic feedback and disabling the object once health <= 0
Chest spawns/reveals on proximityVerified
Treasure spawns once the user enters within a short distance of the target
Claimed on Devposthigh confidenceSpectacles/Assets/SpawnTreasureInWorld.ts:76— onUpdate() checks camera-to-target distance and enables the target chest object plus sets found=true when distance < 200
Distance-based phone haptic feedbackVerified
Phone vibrates with stronger haptic feedback as the user gets closer to a treasure chest
Claimed on Devposthigh confidenceSpectacles/Assets/testspec/MotionControllerHelper.ts:51— detectCollision() computes distance to treasureBound and invokes VibrationHigh/Medium/Low haptic requests on the phone MotionController based on distance thresholds (300/600)
Puzzle chest single-player mini-gameVerified
Puzzle chests engage users in a single-player mini-game requiring cognitive or physical activity
Claimed on Devposthigh confidenceSpectacles/Assets/PuzzleGame/Scripts/MinigameShapeSpawner.ts:13— Spawns random shape prefabs at randomized positions over time for a catching-style mini-gameSpectacles/Assets/testspec/MotionControllerHelper3.ts:40— Tracks globalThis.catchPoints, updates a Points UI text, and marks completed3 once 10 points are reached
Randomly placed treasure chests in the environmentVerified
Users track down randomly placed treasure chests in their surrounding environment
Claimed on Devposthigh confidenceSpectacles/Assets/SpawnTreasureInWorld.ts:42— chooseTreasurePosition() randomizes x/z offsets (200 to 600 units, random front/back sign) and repositions the target chest object
Smartphone as AR sensor via MotionControllerVerified
Phone's gyroscopic/haptic/tactile functionality is used as an input/output sensor paired with Spectacles
Claimed on Devposthigh confidenceSpectacles/Assets/testspec/MotionControllerHelper.ts:17— Uses LensStudio MotionControllerModule with SixDoF motion type, tracks controller transform, and issues haptic requests, i.e. the phone acts as a paired sensor/controller
Three chest types: monetary, puzzle, challengeVerified
Chests come in three types: monetary, puzzle, and challenge
Claimed on Devposthigh confidenceSpectacles/Assets/GameManager.ts:10— GameManager wires moneyChest, pinata (challenge), and minigame (puzzle) SceneObjects with separate completion tracking (moneyChestCompleted, pinataCompleted, minigameCompleted)
Monetary chest gives immediate in-game rewardCode-supported
Monetary chests immediately give users in-game rewards
Claimed on Devpostlow confidenceSpectacles/Assets/GameManager.ts:44— moneyChest is spawned and its completion is tracked via spawnScript.getTaskCompleted(), but no explicit currency/reward-granting logic (points, balance increment) was found beyond marking found=true
Directional (facing) haptic feedbackClaimed only
Phone sensor vibrates more strongly when the user is facing the direction of the treasure (Skyward Sword-style tracking)
Claimed on Devpostmedium confidenceMultiplayer n-vs-1 duel for contested treasuresClaimed only
Stretch goal: if multiple users are near a spot another user found treasure in, they can challenge the finder in an n vs 1 duel
Claimed on Devposthigh confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.