<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: muxin</title>
    <description>The latest articles on DEV Community by muxin (@muxin4).</description>
    <link>https://dev.to/muxin4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4268254%2F88bab805-a00a-47da-85d6-bb1cfbb4c244.jpg</url>
      <title>DEV Community: muxin</title>
      <link>https://dev.to/muxin4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muxin4"/>
    <language>en</language>
    <item>
      <title>Building a Fast, Zero-Paywall HTML5 Canvas Map &amp; GeoGuessr for GTA 6 Leonida</title>
      <dc:creator>muxin</dc:creator>
      <pubDate>Fri, 27 Nov 2026 06:27:46 +0000</pubDate>
      <link>https://dev.to/muxin4/building-a-fast-zero-paywall-html5-canvas-map-geoguessr-for-gta-6-leonida-p3i</link>
      <guid>https://dev.to/muxin4/building-a-fast-zero-paywall-html5-canvas-map-geoguessr-for-gta-6-leonida-p3i</guid>
      <description>&lt;p&gt;Most companion interactive maps for open-world games suffer from two frustrations: heavy DOM marker bloat that drops frame rates once 1,500+ pins render on mobile, and arbitrary 100-pin paywalls that lock completionists out unless they subscribe.&lt;/p&gt;

&lt;p&gt;While exploring community cartography for Rockstar Games' upcoming &lt;em&gt;State of Leonida&lt;/em&gt;, I built &lt;strong&gt;&lt;a href="https://gta6streets.com/" rel="noopener noreferrer"&gt;GTA 6 Streets&lt;/a&gt;&lt;/strong&gt; — a lightweight, vanilla JavaScript + HTML5 &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; atlas tracking &lt;strong&gt;1,784+ named points of interest&lt;/strong&gt; (plus 2,300+ secondary street sites), alongside a browser-based &lt;strong&gt;&lt;a href="https://gta6streets.com/geoguessr" rel="noopener noreferrer"&gt;GTA 6 GeoGuessr location game&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is a quick breakdown of the rendering and data techniques that kept the entire interactive bundle under 95 KB with zero framework dependencies.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Multi-Tier Pyramid Tiles + Instant Borderless Fallback on &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Instead of mounting thousands of DOM nodes over Leaflet or Mapbox GL, the entire atlas runs in a single hardware-accelerated 2D &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Blank First Paint:&lt;/strong&gt; A lightweight borderless WebP base overview (&lt;code&gt;~40 KB&lt;/code&gt;) paints the full State of Leonida on the first animation frame while visible viewport tiles stream in asynchronously across 6 zoom levels (&lt;code&gt;k = 0..6&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Mirror WebP Acceleration:&lt;/strong&gt; Every street tile and location screenshot tries a &lt;code&gt;wsrv.nl&lt;/code&gt; WebP edge proxy first (&lt;code&gt;q=82&lt;/code&gt;), with automatic timeout failover to &lt;code&gt;cdn.jsdelivr.net&lt;/code&gt; and raw GitHub mirrors so broken CDN nodes never leave blank squares.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path2D Vector Shields (&lt;code&gt;evenodd&lt;/code&gt;):&lt;/strong&gt; Category icons are stored as compact SVG path strings around &lt;code&gt;[-10..10, -10..10]&lt;/code&gt;, instantiated once as &lt;code&gt;new Path2D(d)&lt;/code&gt;, and shared identically between &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; map markers and sidebar &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; filter badges.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Packing 4,100+ Photo Availability Flags into a 1.4 KB Bitset
&lt;/h2&gt;

&lt;p&gt;Over 600 locations in the dataset (adapted from open-source community street triangulation at &lt;code&gt;gtadb.org&lt;/code&gt; under CC BY 4.0) carry both &lt;strong&gt;in-game trailer captures&lt;/strong&gt; and &lt;strong&gt;real-life South Florida Street View counterparts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Rather than shipping photo URLs in the initial JSON payload or firing speculative &lt;code&gt;HEAD&lt;/code&gt; requests that 404 in the console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 2 bits per location ID: bit 0 = In-Game frame, bit 1 = Real-Life counterpart&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;photoFlags&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numId&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="no"&gt;PHOTO_BITS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;PHOTO_BITS&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;numId&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numId&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A single Base64-encoded &lt;code&gt;Uint8Array&lt;/code&gt; (&lt;code&gt;~1,400&lt;/code&gt; chars) tells the UI instantaneously whether to reserve a &lt;code&gt;152px&lt;/code&gt; zero-CLS shimmer skeleton and whether to display the &lt;strong&gt;In-Game / Real-Life&lt;/strong&gt; toggle bar.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Turning Verified Trailer Sightlines into a Seeded GeoGuessr Mode
&lt;/h2&gt;

&lt;p&gt;Because each verified landmark already maps pixel coordinates &lt;code&gt;(mx, my)&lt;/code&gt; to in-game meter coordinates &lt;code&gt;(gx, gy)&lt;/code&gt;, building &lt;strong&gt;&lt;a href="https://gta6streets.com/geoguessr" rel="noopener noreferrer"&gt;GTA 6 GeoGuessr&lt;/a&gt;&lt;/strong&gt; took only ~25 KB of self-contained JS:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Regional Stratification:&lt;/strong&gt; An 80-landmark pool is split evenly across five distinct geographic zones (&lt;em&gt;Vice Beach&lt;/em&gt;, &lt;em&gt;Mainland Vice City&lt;/em&gt;, &lt;em&gt;Port Gellhorn &amp;amp; Kelly County&lt;/em&gt;, &lt;em&gt;Hamlet &amp;amp; the Leonida Keys&lt;/em&gt;, and &lt;em&gt;Northern Leonida&lt;/em&gt;) so every 5-round seed tests completely different architecture and terrain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic &lt;code&gt;mulberry32&lt;/code&gt; Seeds:&lt;/strong&gt; Hashing either today's calendar date (&lt;em&gt;Daily Challenge&lt;/em&gt;) or a 6-digit &lt;code&gt;?seed=&lt;/code&gt; query parameter guarantees two friends clicking a shared link get the exact same five frames in the exact same order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exponential Meter Scoring:&lt;/strong&gt; Guesses within &lt;code&gt;65 m&lt;/code&gt; award a perfect &lt;code&gt;5,000&lt;/code&gt; points, decaying smoothly via &lt;code&gt;5000 * Math.exp(-distMeters / 2100)&lt;/code&gt;, then unlocking the real-world Miami / Key Largo photo comparison right after locking in your pin.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Post-Launch Update (v47): Modular Companion Suite &amp;amp; Unified 10-Char Sync
&lt;/h2&gt;

&lt;p&gt;To expand the platform without pushing the core &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; atlas past our &lt;strong&gt;&amp;lt;100 KB&lt;/strong&gt; budget, that modular client-side architecture now powers &lt;strong&gt;8 interactive companions&lt;/strong&gt; backed by lightweight static &lt;code&gt;/_d/db/*&lt;/code&gt; JSON endpoints. Rather than forcing accounts or heavy backend APIs, every module shares one unified &lt;code&gt;localStorage&lt;/code&gt; store that serializes into a compact &lt;strong&gt;10-character cross-device sync&lt;/strong&gt; code for instant handoffs across desktop and mobile:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/trophies" rel="noopener noreferrer"&gt;All 55 Trophies &amp;amp; Meditation Spots Tracker&lt;/a&gt;:&lt;/strong&gt; Filterable achievement tracker with a PS5 Trophy / Xbox Gamerscore toggle plus all 11 Meditation Spots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/checklist" rel="noopener noreferrer"&gt;100% Completion &amp;amp; 91 Missions Checklist&lt;/a&gt;:&lt;/strong&gt; Weighted progress calculator spanning story missions, milestones, and collectibles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/vehicles" rel="noopener noreferrer"&gt;100 GTA 6 Vehicles Database&lt;/a&gt; &amp;amp; &lt;a href="https://gta6streets.com/weapons" rel="noopener noreferrer"&gt;28 Weapons &amp;amp; Car Trunk Planner&lt;/a&gt;:&lt;/strong&gt; Side-by-side vehicle spec comparisons linked to &lt;code&gt;?loc=&lt;/code&gt; map spawns alongside a loadout builder modeling the 2-Sidearm + 2-Longarm + Trunk cap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/wildlife" rel="noopener noreferrer"&gt;Wildlife Compendium &amp;amp; Bret's 15 Hunting Decks&lt;/a&gt; &amp;amp; &lt;a href="https://gta6streets.com/radio" rel="noopener noreferrer"&gt;All 22 Radio Stations &amp;amp; Secret WAiNK Tracklists&lt;/a&gt;:&lt;/strong&gt; Regional fauna habitat guide and full Vice City radio station and tracklist explorer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/cheats" rel="noopener noreferrer"&gt;PS5/Xbox Cheat Codes Trainer&lt;/a&gt;:&lt;/strong&gt; Interactive Gamepad API combo trainer, alongside full localized suites in &lt;strong&gt;&lt;a href="https://gta6streets.com/es/mapa-interactivo-gta-6" rel="noopener noreferrer"&gt;Español&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://gta6streets.com/pt/mapa-interativo-gta-6" rel="noopener noreferrer"&gt;Português (PT-BR)&lt;/a&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Update: Daily GTA 6 Car Guessr &amp;amp; Fullscreen Second-Screen PWA
&lt;/h2&gt;

&lt;p&gt;Beyond static databases, we just shipped new daily-play and couch-companion features built on the same lightweight client-side stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/car-guessr" rel="noopener noreferrer"&gt;Daily GTA 6 Car Guessr (3.4× Zoom Mystery Vehicle Streak Game)&lt;/a&gt;:&lt;/strong&gt; Daily deterministic vehicle identification challenge starting from a tight 3.4× crop, also live in &lt;strong&gt;&lt;a href="https://gta6streets.com/es/adivina-coche-gta-6" rel="noopener noreferrer"&gt;Español&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://gta6streets.com/pt/adivinhe-carro-gta-6" rel="noopener noreferrer"&gt;Português&lt;/a&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://gta6streets.com/geoguessr" rel="noopener noreferrer"&gt;5-Round GTA 6 Street GeoGuessr&lt;/a&gt;:&lt;/strong&gt; Daily and shareable seeded Leonida street-sightline challenges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Stop Farming Route Builder (&lt;code&gt;🧭&lt;/code&gt;) &amp;amp; Fullscreen Phone PWA Install:&lt;/strong&gt; Build custom multi-pin farming routes directly on the &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; atlas and install &lt;strong&gt;&lt;a href="https://gta6streets.com/" rel="noopener noreferrer"&gt;GTA 6 Streets&lt;/a&gt;&lt;/strong&gt; as a fullscreen second-screen PWA on mobile.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Live
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Leonida Map (1,784+ Pins, 4 Save Slots, Free):&lt;/strong&gt; &lt;a href="https://gta6streets.com/" rel="noopener noreferrer"&gt;https://gta6streets.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Play 5-Round GTA 6 GeoGuessr:&lt;/strong&gt; &lt;a href="https://gta6streets.com/geoguessr" rel="noopener noreferrer"&gt;https://gta6streets.com/geoguessr&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Coordinate Reference &amp;amp; Guides Index:&lt;/strong&gt; &lt;a href="https://gta6streets.com/guides" rel="noopener noreferrer"&gt;https://gta6streets.com/guides&lt;/a&gt; · &lt;a href="https://github.com/muxin-4/gta6-leonida-map-guide" rel="noopener noreferrer"&gt;GitHub Reference Repo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feedback on canvas touch inertia, cluster spiderfying, or tricky Leonida street rounds is very welcome!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>html</category>
    </item>
  </channel>
</rss>
