DEV Community

duanrh
duanrh

Posted on

Building Fast, Zero-Framework Roblox Game Calculators (and Fixing 3,300+ Query-Param Crawl Traps)

When I started building Calc Den, a set of free browser-based calculators for Roblox games (Steal an Egg and Dandy's World), the goal was simple: instant math on mobile phones with zero backend, zero login, and zero client-side framework bloat.

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

1. Modeling a Soft-Capped Power Curve in Pure JS

In Steal an Egg, 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.

From community-verified data points, the size multiplier follows a continuous piecewise power curve that softens right at 125× base weight:

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

Stacked mutations also add only their bonus above 1×:

// Total mutation multiplier = 1 + sum(each multiplier - 1)
// Example: Rainbow (3.5) + Aurora (3.2) + Frostbite (3.0) = 1 + 2.5 + 2.2 + 2.0 = 7.70x
export const stackedMutation = (mults) =>
  1 + mults.reduce((acc, m) => acc + Math.max(0, m - 1), 0);
Enter fullscreen mode Exit fullscreen mode

We published the core formulas as a tiny open module and wired them into the live Steal an Egg Income Calculator and Mutations & Stacking Reference.

2. Client-Side Binary Header Inspection (Zero Uploads)

Roblox charges 200 Robux to upload a custom avatar background and rejects files that miss exact specs (2560×1440, no alpha channel, sRGB). Instead of running a server-side image processor, our Roblox Avatar Background Checker parses PNG (IHDR, tRNS, iCCP), JPEG (SOF), BMP, and TGA headers directly from an ArrayBuffer in the browser. Nothing ever leaves the player's device.

3. Catching a 1,160-URL Query-Parameter Crawl Trap

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

The culprit? Our 321-pet directory and egg tables linked each row to the calculator using a query string:

<!-- Created 3,364 crawlable parameter URLs across 5 locales -->
<a href="/steal-an-egg-calculator/?pet=Giant%20Sloth">Giant Sloth</a>
Enter fullscreen mode Exit fullscreen mode

Even though <link rel="canonical"> consolidated them properly, ~95% of Googlebot's crawl history on a young domain was spent hitting identical ?pet= URLs instead of core content pages.

The Fix

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

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

All tools and planners (including the Dandy's World Ichor & Research Unlock Planner) are free to try at calcdenhq.com.

Top comments (0)