{"slug": "ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma", "title": "ASCEND: Turn a Small Walk into a Real-World Quest with Local Gemma", "summary": "A developer built ASCEND, a browser-based outdoor quest game that runs Google's Gemma model locally on the user's device to generate fantasy atmosphere and bounded observation prompts for real-world destinations mapped via OpenStreetMap and Wikidata. The game offers three quest types — reaching a gate, making a discovery, and following a three-stop trail — with XP rewards and unlockable original companions, plus a GPS-free rehearsal mode whose scores never enter the global leaderboard. A real deployment test revealed unavailable Overpass gateways, prompting the addition of an independent Wikidata fallback lookup for urban parks, monuments, and fountains.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge: Week 1 — Touch Grass](https://dev.to/challenges/hacktoberfest-week1-2026-10-05).*\n\nA nearby park can feel ordinary. Give it a mysterious gate, a small story, and a leaf-eared companion waiting at the end, and the same walk becomes an adventure.\n\nThat is the idea behind **ASCEND**. The next level is somewhere outside your front door.\n\nASCEND is a browser-based outdoor quest game. It combines the anticipation of anime progression with the joy of finding things in the real world. You start at E-rank, finish small adventures, collect original companions, unlock trophies, and gradually work toward S-rank.\n\nThe game begins with your location and the time you have. It finds nearby parks, gardens, outdoor artwork, viewpoints, and other eligible places in OpenStreetMap, with a separate Wikidata fallback for urban parks, monuments, and fountains. **Gemma runs on your device** and writes a short fantasy atmosphere for the mapped destination. The story also helps choose a bounded observation prompt for a discovery quest.\n\nThere are three ways to explore:\n\n| Quest | What you do | Reward | \n|---|---|---|\n| Reach a gate | Walk to one mapped place and check in | 100 XP | \n| Make a discovery | Arrive, photograph something you notice, and write a few words | 150 XP | \n| Follow a trail | Check in at three places in order | 250 XP | \n\nYour first completed quest unlocks **Fernfox**. Later adventures introduce a moss-covered tortoise, a luminous moth, a moonlit owl, an ember salamander, and an astral fawn. They are original characters with original generated artwork.\n\n*Companions are earned through completed quests. Rehearsal rewards stay separate from real-world rankings.*\n\nThere is no streak punishment. A quiet walk tomorrow is still welcome if you missed today.\n\nStart with **Try the rehearsal** to explore all three quest types without GPS, camera permissions, or an account. Its places and arrivals are explicitly fictional, and its scores never enter the global leaderboard.\n\nFor a real quest, choose **Find my next quest**, allow location, and select an adventure. Try the local Gemma writer, read or listen to the briefing, then open the pocket guide. At the checkpoint, reopen the app and check in.\n\nThe pocket guide has large controls for repeating the briefing, pausing, and checking in. Installed device voices can read the briefing. Optional browser recognition supports commands such as “repeat,” “status,” “pause,” and “check in.” No ElevenLabs is used. When a browser lacks voice support, the same actions are available on screen.\n\nBrowser GPS pauses when the page is hidden or the phone is locked, so ASCEND asks you to reopen at checkpoints. The phone helps launch the adventure and record its ending; the walk happens between those moments.\n\n[Source, setup, tests, and deployment configuration](https://github.com/faraz-shamim/ascend)\n\nExplore the [quest engine](https://github.com/faraz-shamim/ascend/blob/main/web/lib/domain.js), [Gemma worker](https://github.com/faraz-shamim/ascend/blob/main/web/gemma-worker.js), or [deployment configuration](https://github.com/faraz-shamim/ascend/blob/main/render.yaml). The README includes the commands to run it yourself.\n\nThe code is MIT-licensed. The generated art has its own attribution instructions, and downloaded model weights retain Gemma’s terms.\n\nThe map service uses OpenStreetMap Overpass, with bounded provider fallbacks. A real deployment test exposed unavailable Overpass gateways, so I added an independent Wikidata lookup for urban parks, monuments, and fountains. Its bounded query searches the local area before following category relationships, then checks known indoor, dissolved, and future locations. Broad residential-garden and amusement-park categories are excluded.\n\nSearches are cached and shared across concurrent explorers. Known private and indoor OpenStreetMap tags are filtered out. Access information and the original OpenStreetMap or Wikidata item remain visible because a mapped place is not proof that it is open or reachable by a pedestrian route.\n\nGemma writes the story; a separate quest engine pins the destinations, objectives, and XP. The model cannot invent a destination or grant rewards. Long, code-like, or unsuitable narratives fall back to a clearly labelled curated briefing.\n\nThe small model taught a useful lesson: a complicated formatting prompt could produce code or an overly dramatic story. A short request for two peaceful fairy-tale sentences worked better. I kept the output guard even after improving the prompt.\n\nThe app uses **Gemma 3 270M**, Transformers.js, and ONNX Runtime in a worker. WebGPU is used when available; a separately pinned compatible model revision supports WASM on CPU. The first use downloads hundreds of megabytes, so the app explains that before loading.\n\nA genuine browser inference produced this line:\n\nThe Lantern Garden whispered secrets as the sun warmed the mossy leaves, a gentle breeze rustled the silver petals of the flowers.\n\nOn the tested browser, generation took **5.1 seconds**. The first model download plus generation took **98.5 seconds**. Those are measurements from one machine, not a promise for every phone. The full prompt, output, revision, and timings are recorded in [the inference report](https://github.com/faraz-shamim/ascend/blob/main/docs/gemma-inference.json).\n\nThe CPU fallback was tested with WebGPU disabled: **33.1 seconds** for generation and **170.4 seconds** including the first download, on the same computer. Its [separate report](https://github.com/faraz-shamim/ascend/blob/main/docs/gemma-cpu-inference.json) records actual WASM inference.\n\nLarge model downloads also exposed interrupted CDN transfers during testing. The loader now fetches pinned artifacts in verified 8 MiB ranges, retries interrupted chunks, and rejects mismatched revisions. This made both real GPU and CPU runs complete.\n\nThe model’s narration is fictional. The report confirms that generating it left the checkpoint coordinates unchanged.\n\nThe frontend and Express API run on Render. The release configuration uses a free web service and free Postgres in Singapore. Reward updates use database transactions, including protection against duplicate simultaneous check-ins. Explorer state and world rankings are stored in Render Postgres.\n\nGPS check-ins require a recent fix, acceptable accuracy, and proximity to the checkpoint. Previously completed destinations disappear from suggestions for 24 hours. Trail checkpoints must be completed in order.\n\nWorld rankings are opt-in and publish an alias with aggregate game statistics. They do not expose destinations or photos. Camera images and the latest 30 journal memories remain in the device’s IndexedDB; the server receives photo metadata rather than pixels. A private session export lets you restore access to your explorer.\n\nRender’s free service can take about a minute to wake, and its free Postgres expires after 30 days. The README documents those limits and the need to export or migrate before expiry. This entry uses free services and no paid AI API.\n\nThe browser suite uses **simulated GPS and a synthetic camera feed**. Voice-command actions were tested with a synthesized transcript. Audible local speech and live microphone transcription still need testing on a physical phone. I have not claimed an outdoor field trial, and browser-reported GPS remains spoofable: these rankings support friendly play.\n\nA location-aware game can easily become another stream of private information sent to a remote model. Open weights let ASCEND generate its story on the explorer’s device. The prompt does not need a hosted AI endpoint, a per-story charge, or an AI API key.\n\nOpenStreetMap and Wikidata supply inspectable destinations. Transformers.js and ONNX Runtime make browser inference practical. The quest engine is readable, so someone can change reward rules, add companions, swap a model, or host their own version.\n\nLocal inference does not make the whole app offline: new map lookups and shared rankings still need a connection. It does let the creative part run locally after the model is downloaded, on a capable device. That is a useful boundary for a game built around stepping outside.\n\nASCEND’s new repository, gameplay, API, databases, interface, artwork, and tests were built during this Week 1 window. Local-model compatibility work draws on my earlier [Stillroot](https://github.com/faraz-shamim/stillroot) experiments. The anime progression and location-collecting inspirations are acknowledged; no Solo Leveling or Pokémon game assets are used.\n\nCodex assisted with implementation, testing, and this write-up. The cover and companion illustrations were generated for this project; [their prompts and provenance are documented](https://github.com/faraz-shamim/ascend/blob/main/docs/artwork.md).\n\nYour next gate might be a garden you have walked past a hundred times. Bring a little curiosity. Fernfox will meet you there.", "url": "https://wpnews.pro/news/ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma", "canonical_source": "https://dev.to/faraz_s_0a6e70a4bbdc6622/ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma-2347", "published_at": "2026-10-08 11:37:28+00:00", "updated_at": "2026-10-08 11:49:12.182714+00:00", "lang": "en", "topics": ["generative-ai", "ai-products", "large-language-models", "ai-tools"], "entities": ["ASCEND", "Gemma", "OpenStreetMap", "Wikidata", "Overpass", "Fernfox", "GitHub", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma", "markdown": "https://wpnews.pro/news/ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma.md", "text": "https://wpnews.pro/news/ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma.txt", "jsonld": "https://wpnews.pro/news/ascend-turn-a-small-walk-into-a-real-world-quest-with-local-gemma.jsonld"}}