<?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: duanrh</title>
    <description>The latest articles on DEV Community by duanrh (@duanrh_dev).</description>
    <link>https://dev.to/duanrh_dev</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%2F4277607%2F3eaf3acc-31e6-42c8-a391-66670faa7188.png</url>
      <title>DEV Community: duanrh</title>
      <link>https://dev.to/duanrh_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/duanrh_dev"/>
    <language>en</language>
    <item>
      <title>Building Fast, Zero-Framework Roblox Game Calculators (and Fixing 3,300+ Query-Param Crawl Traps)</title>
      <dc:creator>duanrh</dc:creator>
      <pubDate>Thu, 03 Dec 2026 04:10:35 +0000</pubDate>
      <link>https://dev.to/duanrh_dev/building-fast-zero-framework-roblox-game-calculators-and-fixing-3300-query-param-crawl-traps-4lok</link>
      <guid>https://dev.to/duanrh_dev/building-fast-zero-framework-roblox-game-calculators-and-fixing-3300-query-param-crawl-traps-4lok</guid>
      <description>&lt;p&gt;When I started building &lt;strong&gt;&lt;a href="https://calcdenhq.com/" rel="noopener noreferrer"&gt;Calc Den&lt;/a&gt;&lt;/strong&gt;, a set of free browser-based calculators for Roblox games (&lt;em&gt;Steal an Egg&lt;/em&gt; and &lt;em&gt;Dandy's World&lt;/em&gt;), the goal was simple: instant math on mobile phones with zero backend, zero login, and zero client-side framework bloat.&lt;/p&gt;

&lt;p&gt;Here is a quick technical breakdown of the formulas, static build architecture, and a sneaky SEO crawl trap we caught in Google Search Console.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Modeling a Soft-Capped Power Curve in Pure JS
&lt;/h2&gt;

&lt;p&gt;In &lt;em&gt;Steal an Egg&lt;/em&gt;, pet income scales with both weight and stacked mutations. Players often assume weight scales linearly, or that mutations multiply together—both lead to wildly wrong numbers late-game.&lt;/p&gt;

&lt;p&gt;From community-verified data points, the size multiplier follows a continuous piecewise power curve that softens right at &lt;strong&gt;125× base weight&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Up to &lt;code&gt;125×&lt;/code&gt; base weight: power scaling climbs quickly (e.g., &lt;code&gt;100×&lt;/code&gt; base weight yields ~&lt;code&gt;17.1×&lt;/code&gt; income).&lt;/li&gt;
&lt;li&gt;Above &lt;code&gt;125×&lt;/code&gt; base weight: the exponent softens smoothly with no discontinuity at &lt;code&gt;125×&lt;/code&gt;, so &lt;code&gt;1000×&lt;/code&gt; yields ~&lt;code&gt;45.1×&lt;/code&gt; instead of exploding.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stacked mutations also add only their bonus above &lt;code&gt;1×&lt;/code&gt;:&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;// Total mutation multiplier = 1 + sum(each multiplier - 1)&lt;/span&gt;
&lt;span class="c1"&gt;// Example: Rainbow (3.5) + Aurora (3.2) + Frostbite (3.0) = 1 + 2.5 + 2.2 + 2.0 = 7.70x&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;stackedMutation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mults&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;mults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&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;We published the core formulas as a tiny open module and wired them into the live &lt;strong&gt;&lt;a href="https://calcdenhq.com/steal-an-egg-calculator/" rel="noopener noreferrer"&gt;Steal an Egg Income Calculator&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://calcdenhq.com/steal-an-egg/mutations/" rel="noopener noreferrer"&gt;Mutations &amp;amp; Stacking Reference&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Client-Side Binary Header Inspection (Zero Uploads)
&lt;/h2&gt;

&lt;p&gt;Roblox charges 200 Robux to upload a custom avatar background and rejects files that miss exact specs (&lt;code&gt;2560×1440&lt;/code&gt;, no alpha channel, sRGB). Instead of running a server-side image processor, our &lt;strong&gt;&lt;a href="https://calcdenhq.com/roblox-avatar-background-template/" rel="noopener noreferrer"&gt;Roblox Avatar Background Checker&lt;/a&gt;&lt;/strong&gt; parses PNG (&lt;code&gt;IHDR&lt;/code&gt;, &lt;code&gt;tRNS&lt;/code&gt;, &lt;code&gt;iCCP&lt;/code&gt;), JPEG (&lt;code&gt;SOF&lt;/code&gt;), BMP, and TGA headers directly from an &lt;code&gt;ArrayBuffer&lt;/code&gt; in the browser. Nothing ever leaves the player's device.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Catching a 1,160-URL Query-Parameter Crawl Trap
&lt;/h2&gt;

&lt;p&gt;Our static generator (&lt;code&gt;Node.js&lt;/code&gt;, no bundler) builds 60 indexable pages across 5 languages (&lt;code&gt;en&lt;/code&gt;, &lt;code&gt;es&lt;/code&gt;, &lt;code&gt;ko&lt;/code&gt;, &lt;code&gt;pt&lt;/code&gt;, &lt;code&gt;vi&lt;/code&gt;). Yet when checking Google Search Console's Indexing report, we saw &lt;strong&gt;52 indexed pages&lt;/strong&gt; alongside &lt;strong&gt;1,160 "Alternate page with proper canonical tag"&lt;/strong&gt; URLs.&lt;/p&gt;

&lt;p&gt;The culprit? Our 321-pet directory and egg tables linked each row to the calculator using a query string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Created 3,364 crawlable parameter URLs across 5 locales --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/steal-an-egg-calculator/?pet=Giant%20Sloth"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Giant Sloth&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even though &lt;code&gt;&amp;lt;link rel="canonical"&amp;gt;&lt;/code&gt; consolidated them properly, ~95% of Googlebot's crawl history on a young domain was spent hitting identical &lt;code&gt;?pet=&lt;/code&gt; URLs instead of core content pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fix
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Switched all 3,364 internal pre-selection links from query strings (&lt;code&gt;?pet=&lt;/code&gt;, &lt;code&gt;?goal=&lt;/code&gt;, &lt;code&gt;?speed=&lt;/code&gt;) to URL fragments (&lt;code&gt;#pet=&lt;/code&gt;, &lt;code&gt;#goal=&lt;/code&gt;, &lt;code&gt;#speed=&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Updated the client scripts to read &lt;code&gt;location.hash&lt;/code&gt; first while keeping &lt;code&gt;location.search&lt;/code&gt; fallback for existing bookmarks.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;Disallow: /*?pet=&lt;/code&gt;, &lt;code&gt;Disallow: /*?goal=&lt;/code&gt;, and &lt;code&gt;Disallow: /*?speed=&lt;/code&gt; to &lt;code&gt;robots.txt&lt;/code&gt; so crawlers stop re-fetching legacy parameter URLs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are building static tool or calculator sites with pre-filled deep links from directory tables, use &lt;code&gt;#hash&lt;/code&gt; state for internal links from day one—your crawl budget and Search Console reports will stay clean.&lt;/p&gt;

&lt;p&gt;All tools and planners (including the &lt;strong&gt;&lt;a href="https://calcdenhq.com/dandys-world/research-unlock-planner/" rel="noopener noreferrer"&gt;Dandy's World Ichor &amp;amp; Research Unlock Planner&lt;/a&gt;&lt;/strong&gt;) are free to try at &lt;strong&gt;&lt;a href="https://calcdenhq.com/" rel="noopener noreferrer"&gt;calcdenhq.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>javascript</category>
      <category>seo</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building a 311-Page Static Mobile Puzzle Guide with Node.js, Lite YouTube Embeds, and Zero Frameworks</title>
      <dc:creator>duanrh</dc:creator>
      <pubDate>Wed, 02 Dec 2026 05:39:04 +0000</pubDate>
      <link>https://dev.to/duanrh_dev/building-a-311-page-static-mobile-puzzle-guide-with-nodejs-lite-youtube-embeds-and-zero-2fo3</link>
      <guid>https://dev.to/duanrh_dev/building-a-311-page-static-mobile-puzzle-guide-with-nodejs-lite-youtube-embeds-and-zero-2fo3</guid>
      <description>&lt;p&gt;Last week I shipped &lt;a href="https://jellybusters.org/" rel="noopener noreferrer"&gt;Jelly Busters Level Guide&lt;/a&gt;, a static mobile game walkthrough site covering 311 stages of Moon Active's Jelly Busters (including every level from 16 through 150 and late-game boards up to Level 666).&lt;/p&gt;

&lt;p&gt;Instead of spinning up Next.js or WordPress, I kept the entire generator to plain Node.js ESM modules, one stylesheet, and one vanilla JS file. Here are four small engineering choices that made the biggest difference in speed and maintainability.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Compiling 330+ HTML pages in under 200ms
&lt;/h2&gt;

&lt;p&gt;Everything lives in two JSON data files (&lt;code&gt;levels.json&lt;/code&gt; and &lt;code&gt;videos.json&lt;/code&gt;). A single &lt;code&gt;build.mjs&lt;/code&gt; script validates every entry before writing a single HTML file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rejects missing primary video IDs or duplicate level numbers&lt;/li&gt;
&lt;li&gt;Verifies release builds always set an &lt;code&gt;https://&lt;/code&gt; origin and never leak &lt;code&gt;noindex&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Hashes &lt;code&gt;site.css&lt;/code&gt; and &lt;code&gt;site.js&lt;/code&gt; with SHA-256 to append a &lt;code&gt;?v=&amp;lt;8-char-hash&amp;gt;&lt;/code&gt; query string automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because there is no React hydration or bundler pipeline, rebuilding all 311 level pages, the directory, sitemaps, and long-form guides takes under a quarter of a second.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Click-to-load YouTube facades instead of raw iframes
&lt;/h2&gt;

&lt;p&gt;Embedding a standard YouTube iframe directly pulls hundreds of kilobytes of third-party scripts before the user ever taps play. Every level page renders a lightweight static thumbnail button (&lt;code&gt;.yt-facade&lt;/code&gt;) with the video duration and channel attribution, and only mounts a &lt;code&gt;youtube-nocookie.com&lt;/code&gt; iframe on click.&lt;/p&gt;

&lt;p&gt;If a stage has both a primary and a backup playthrough, a small tab bar swaps the thumbnail or active player without reloading the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Catching bad data with Pillow contact sheets
&lt;/h2&gt;

&lt;p&gt;YouTube search results for mobile puzzle levels are full of multi-level compilations (like "Level 127 and 128") or unrelated games with similar names. Before adding any batch of levels to the &lt;a href="https://jellybusters.org/guides/how-to-play/" rel="noopener noreferrer"&gt;How to Play guide&lt;/a&gt; or the &lt;a href="https://jellybusters.org/guides/hard-levels/" rel="noopener noreferrer"&gt;Hard &amp;amp; Super Hard levels breakdown&lt;/a&gt;, a small Python script pulls &lt;code&gt;hqdefault&lt;/code&gt;, &lt;code&gt;hq1&lt;/code&gt;, &lt;code&gt;hq2&lt;/code&gt;, and &lt;code&gt;hq3&lt;/code&gt; frames and tiles six levels per contact sheet so I can visually confirm the exact pixel board, colour palette, and Hard banner in a few minutes.&lt;/p&gt;

&lt;p&gt;The open reference notes and CSV index for the dataset are also tracked on &lt;a href="https://github.com/duanrh/jelly-busters-guide-notes" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. A small Windows zip pitfall on Cloudflare Pages
&lt;/h2&gt;

&lt;p&gt;One gotcha worth sharing if you deploy static zips to Cloudflare Pages from Windows: PowerShell's &lt;code&gt;Compress-Archive&lt;/code&gt; writes backslash separators (&lt;code&gt;\&lt;/code&gt;) into zip entries, which causes nested routes like &lt;code&gt;/level/117/index.html&lt;/code&gt; to return 404 after extraction on Linux. Packing the release zip with Python's &lt;code&gt;zipfile&lt;/code&gt; using POSIX forward slashes (&lt;code&gt;/&lt;/code&gt;) and asserting zero backslashes in a pre-deploy check fixed it permanently.&lt;/p&gt;

&lt;p&gt;If you are building content-heavy niche guides or reference tools, skipping the framework layer and spending that time on fast HTML, clean structured data, and real visual checks is hard to beat.&lt;/p&gt;

</description>
      <category>showdev</category>
    </item>
  </channel>
</rss>
