<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Winterscott on Medium]]></title>
        <description><![CDATA[Stories by Winterscott on Medium]]></description>
        <link>https://medium.com/@winterscott999?source=rss-ee5d435d1bd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*arS4PN_ua_YJQUr-</url>
            <title>Stories by Winterscott on Medium</title>
            <link>https://medium.com/@winterscott999?source=rss-ee5d435d1bd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:39:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@winterscott999/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fruit Box: A Practical Analysis of the Sum-10 Puzzle]]></title>
            <link>https://medium.com/@winterscott999/fruit-box-a-practical-analysis-of-the-sum-10-puzzle-303ee5aa60d8?source=rss-ee5d435d1bd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/303ee5aa60d8</guid>
            <category><![CDATA[puzzle-game]]></category>
            <category><![CDATA[number-game]]></category>
            <dc:creator><![CDATA[Winterscott]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 01:44:50 GMT</pubDate>
            <atom:updated>2026-09-05T08:31:59.460Z</atom:updated>
            <content:encoded><![CDATA[<p>Fruit Box looks like a tiny arithmetic game: draw a box, make the numbers inside add up to ten, and keep going. Its real appeal is more interesting. It is a timed visual-search puzzle in which arithmetic, geometry, board planning, and luck all compete for the player’s attention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*obT2dJ16BoYgvSoKxTyA8A.png" /></figure><h3><strong>Why it became popular again</strong></h3><p>The game’s recent popularity is not explained by a new rule set. The reference history points to a sequence of social contexts that made the same simple round newly shareable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*v9eAIdycIi2BS-vUFyZFRw.png" /></figure><p>Fruit Box is particularly well suited to this cycle. It has a recognizable visual hook, a strict 120-second boundary, and a result that can be compared in one number. A streamer can explain the rule in one sentence, start a round immediately, and create tension from every missed rectangle. The game also produces natural conversation: viewers can spot a <strong>1+9</strong> match before the player does, argue about whether to take a larger group, and celebrate a near-perfect clear.</p><p>The renewed attention is therefore a distribution story as much as a design story. Video and live-stream formats turn a solitary arithmetic puzzle into a shared reaction game, while multiplayer boards add rivalry without changing the underlying sum-to-10 loop.</p><h3><strong>The core loop</strong></h3><p>Each round starts with a 17-by-10 field: 170 apples, each displaying a value from 1 to 9. The player drags an axis-aligned rectangle over one or more remaining apples. Every active apple inside that rectangle contributes its printed value. The move is valid only when the total is exactly <strong>10</strong>.</p><p>When the selection reaches ten, the frame turns red. Releasing the drag removes the selected apples and awards one point per apple removed. A <strong>4 + 6</strong> pair is therefore worth two points, while a <strong>2 + 3 + 5</strong> group is worth three. The numbers determine whether a move is legal; the number of apples determines the score.</p><p>The round is a race against a 120-second timer. The usual objective is to clear as many apples as possible before time expires. Removing all 170 apples produces a perfect score and ends the round immediately. There are no campaign levels: the difficulty comes from the changing board state and the pressure of the clock.</p><h3><strong>Why the rectangle matters</strong></h3><p>Fruit Box is not a free-form “find any numbers” exercise. The selected cells must fit inside one rectangle, and every uncleared apple inside that rectangle counts. This creates the game’s central tension:</p><ul><li>A pair may be mathematically perfect but unusable because another apple lies between them.</li><li>A larger group can score more points, but its wider rectangle may accidentally include an unwanted value.</li><li>Cleared cells become empty space. They count as zero, so a later rectangle can cross a gap and connect apples that were not previously adjacent.</li></ul><p>The board is therefore both a number grid and a geometric map. A strong player reads rows, columns, and empty corridors at the same time.</p><h3><strong>Useful sum-ten patterns</strong></h3><p>The fastest early decisions usually come from short combinations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*kYf6AAvP5xsKpjcU04fdww.png" /></figure><p>These are not a checklist to execute blindly. The entire rectangle must be inspected before release. On a dense opening board, a reliable two- or three-apple clear is often better than spending several seconds forcing a larger group.</p><h3><strong>The compact reference table</strong></h3><p>For fast play, it is useful to memorize the common combinations by their largest number. The following list contains the practical 22 patterns that use four apples or fewer. The notation is a multiset: <strong>4321</strong> means <strong>4 + 3 + 2 + 1</strong>, in any spatial arrangement that fits one rectangle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*Bt-KnWLgznrxwvlBy0JxsA.png" /></figure><p>There are also longer legal patterns, but they are less common in real play because they require a larger clean rectangle and more time to verify. The full count by group size is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*dxhCdkpaRDXDf2gbPf8iJQ.png" /></figure><p>The table is a recognition aid, not a promise that a pattern is available. Geometry always has the final say.</p><h3><strong>Value scarcity and full-clear logic</strong></h3><p>High values are powerful but demanding. A <strong>9</strong> can only be cleared with a <strong>1</strong>; an <strong>8</strong> needs a <strong>2</strong> or two <strong>1</strong>s; a <strong>7</strong> needs a <strong>3</strong>, a <strong>2+1</strong>, or three <strong>1</strong>s. This creates a simple resource test for a perfect clear:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*XrxYo59b9XWBMzdtyJkNXw.png" /></figure><p>This does not prove that a board is solvable, because the partners must also be positionable inside legal rectangles. It does explain why a board visibly overloaded with 8s and 9s is a poor candidate for an all-clear. On an implementation that uses an unverified random board, restarting a clearly unbalanced opening can be rational. On the current Fruit Box site, boards are generated with a verified removal sequence, so the better approach is to search for the intended order rather than assume the board is impossible.</p><h3><strong>Rectangle geometry: a practical checklist</strong></h3><p>Before releasing the pointer, run this five-step check:</p><ul><li>Mark the smallest rectangle that contains the candidate apples.</li><li>Expand it to the exact on-screen boundary you will drag.</li><li>Count every active apple inside, including values between the intended endpoints.</li><li>Add the values, treating cleared cells as zero.</li><li>Release only when the total is exactly 10 and the frame confirms the state.</li></ul><p>This explains many apparent “wrong answers.” The arithmetic combination may be correct in isolation, but one extra apple inside the bounding box changes the move. Conversely, a long rectangle through empty cells can be completely valid.</p><h3><strong>Pace, audio, and reset decisions</strong></h3><p>The classic game repeats a short music loop of roughly 22 seconds. Since a round lasts 120 seconds, the loop can act as a rough rhythm cue: the sixth pass is close to the end of the round. It is not a substitute for the timer, but it can help a player maintain a steady scan without looking away from the board.</p><p>When the board generator is genuinely random, score is partly a board-quality problem. Skill determines how efficiently a player converts available matches, while the distribution of values determines whether enough partners exist at all. A sensible practice routine is therefore:</p><ul><li>play several boards without resetting to train scanning speed;</li><li>reset only when the opening distribution is obviously hostile, such as many 9s with very few 1s;</li><li>compare clears by apples per second, not only by the final score;</li><li>use the same scan order each round so that improvement reflects decisions rather than search randomness.</li></ul><p>The current site removes much of this uncertainty by certifying the board. That shifts the skill ceiling from “did I get a lucky distribution?” toward “can I discover and execute the removal order before 120 seconds?”</p><h3><strong>A time-based strategy</strong></h3><p><strong>120–90 seconds: harvest obvious moves</strong></p><p>Start with a broad scan rather than chasing one corner. Look for clean pairs and compact triples, especially combinations containing a 9, 8, or 7 because those numbers have fewer partners. The opening density gives you many choices, so prioritize moves that can be recognized and released immediately.</p><p><strong>90–45 seconds: turn gaps into routes</strong></p><p>As apples disappear, scan across the new empty spaces. A rectangle can now span a cleared cell without changing its sum. This is when a previously blocked `1+9` or `2+3+5` may become available. Sweep the board in a repeatable order — left to right by row, then top to bottom — so that empty corridors do not hide useful matches.</p><p><strong>45–0 seconds: switch to precision</strong></p><p>The endgame has fewer active apples and fewer obvious patterns. Check the complete bounding rectangle for every candidate, including values that are not at its corners. If a valid group is hard to see, use a hint to restart your scan instead of dragging random boxes and losing time.</p><h3><strong>Scoring and the perfect-clear constraint</strong></h3><p>Because scoring is per apple, a larger valid group is more efficient than a pair when both can be found quickly. However, the best score is not simply “always take the largest group.” Large rectangles are slower to verify and more likely to contain an extra apple that breaks the sum.</p><p>The reference game’s board is described as random, with the complete board total constrained to a multiple of ten. That condition is useful for the arithmetic, but it does not by itself guarantee that every board can be solved through legal rectangles. In contrast, the current Fruit Box site describes its daily 17x10 board as generated with a verified removal sequence, so a 170-point clear is possible when the correct order is found. This difference matters when comparing a historical round with a modern web implementation: one is a score chase against a random layout, while the other can be studied as a solvable planning problem.</p><h3><strong>What the Fruit Box site adds</strong></h3><p>The game at <a href="https://fruitboxgame.com/">fruit box</a> keeps the recognizable rules while making them easier to learn and replay:</p><ul><li><strong>Immediate explanation:</strong> the page states the target, board size, timer, and scoring beside the board.</li><li><strong>Keyboard play:</strong> arrow keys move the selection, `Shift` plus an arrow extends it, `Enter` clears a valid ten, and `Escape` cancels.</li><li><strong>Hint and pause controls:</strong> hints highlight a valid rectangle without clearing it; pause is available during an active round.</li><li><strong>New board and preferences:</strong> players can start a fresh board, toggle pale colors, and control sound.</li><li><strong>Responsive play:</strong> mouse, trackpad, and touch dragging are supported in modern desktop and mobile browsers.</li><li><strong>Persistent challenge:</strong> the site records a local best score, while a perfect clear remains the simple 170-point benchmark.</li></ul><p>These additions do not change the underlying scoring model. They reduce interface friction so that the strategic challenge — finding safe rectangles under time pressure — remains the focus.</p><h3><strong>Variants and what they change</strong></h3><p>Fruit Box has inspired several related formats. They are useful comparisons because each one changes a different pressure in the original design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*Ph5sGIqmPMjlAWtcOdkIMA.png" /></figure><p>The Fruit Box site belongs to the last category while retaining the original one-round structure. It is deliberately not a level campaign or a bonus-scoring variant: its benchmark remains 170 cleared apples in one timed round.</p><h3><strong>Common mistakes</strong></h3><ul><li><strong>Counting only the endpoints.</strong> Every active apple inside the rectangle contributes, not just the apples you intended to pair.</li><li><strong>Releasing at nine or eleven.</strong> The frame is only ready when the total is exactly ten; an invalid release leaves the board unchanged.</li><li><strong>Ignoring cleared cells.</strong> Empty cells are not obstacles. They are zero-valued bridges that can make long rectangles possible.</li><li><strong>Over-optimizing every move.</strong> A quick two-apple clear is usually better than a slow, uncertain five-apple search.</li><li><strong>Scanning randomly in the endgame.</strong> A consistent row-and-column sweep prevents the last valid rectangle from being missed.</li></ul><h3><strong>A useful mental model</strong></h3><p>Think of each round as a three-stage loop:</p><ul><li><strong>Recognize:</strong> spot a group whose values can total ten.</li><li><strong>Contain:</strong> verify that one rectangle includes the group and no extra active apples.</li><li><strong>Convert:</strong> release, collect one point per apple, and immediately rescan the new gaps.</li></ul><p>The arithmetic is elementary. The mastery comes from shortening the time between recognition and a safe release while preserving future options. That is why Fruit Box remains compelling even after the rules are fully understood: every cleared apple changes the geometry of the next decision.</p><h3><strong>Sources and scope</strong></h3><ul><li><a href="https://fruitboxgame.com/">Fruit Box Game</a> — current site implementation, rules, controls, strategy notes, and FAQ, checked August 22, 2026.</li><li><a href="https://github.com/weizixiao/fruit-box-game">Fruit Box Game on GitHub</a> — source code and project repository for the playable web implementation.</li></ul><h3><strong>Related Versions</strong></h3><ul><li><a href="https://fruitboxgame.com/ko">과일 상자 게임</a> — Korean-language version of the playable Fruit Box game, with the same sum-to-10 puzzle format and timed gameplay.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=303ee5aa60d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From the 40s to 97: How We Cut the Initial Load of a Next.js WebGL Game by Nearly 80%]]></title>
            <link>https://medium.com/@winterscott999/from-the-40s-to-97-how-we-cut-the-initial-load-of-a-next-js-webgl-game-by-nearly-80-d04e803a27ac?source=rss-ee5d435d1bd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d04e803a27ac</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[lighthouse]]></category>
            <category><![CDATA[performance-optimization]]></category>
            <dc:creator><![CDATA[Winterscott]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 09:04:45 GMT</pubDate>
            <atom:updated>2026-09-21T02:34:54.284Z</atom:updated>
            <content:encoded><![CDATA[<p>Why did a visually simple color-matching game have an 11-second LCP? This is how we traced the real loading path, removed work from the critical path, and raised our mobile Lighthouse score to 97.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*_8A2GvgP2jU2UQt8W8mHpQ.png" /></figure><p>If you prefer a shorter overview of the approach, read <a href="https://dev.to/scott_winter_77ced0700c92/from-the-40s-to-97-optimizing-a-nextjs-webgl-game-b01">A Practical Guide to Optimizing a Next.js WebGL Game</a>.</p><p>Color Tiles is a browser game built with Next.js, React, and PixiJS. The premise is simple: slide colored tiles, connect matching groups, and clear the board.</p><p>The page does not look particularly heavy either. It has a game board, a few controls, and some supporting content.</p><p>That is why our first Lighthouse result, somewhere in the 40s, was a surprise.</p><p>The page seemed to appear quickly, yet Lighthouse still considered it slow. By the time we saved a report, the mobile score had already reached 59. First Contentful Paint was only 0.8 seconds, but Largest Contentful Paint was 11.36 seconds and Total Blocking Time was 625 milliseconds.</p><p>Those numbers gave us the first useful clue: the page was not blank. The most important part of the first screen was arriving far too late, while the browser was doing too much work in the meantime.</p><h3><strong>The result</strong></h3><p>We did not preserve the original report from the 40s, so we are not using it as a formal benchmark. The comparison below uses the first report we can still verify, at 59, and a new production-build test using the same Lighthouse 13.4.0 mobile simulation settings.</p><figure><img alt="Lighthouse compare" src="https://cdn-images-1.medium.com/max/649/1*zYMnBNMRX9w_-UL5KvIdJQ.png" /></figure><p>The current desktop score is 96, with a 1.42-second LCP and zero Total Blocking Time.</p><p>One detail matters here: FCP did not improve dramatically with the overall score. In one run, it was even slightly slower. The real gains came from LCP, main-thread blocking, and initial transfer size.</p><p>That was an early lesson for us: a low total score does not mean every metric needs attention.</p><h3><strong>Turning “the page is slow” into a loading path</strong></h3><p>At first, we tried the usual fixes: compressing images, changing cache headers, and adding preloads. Without knowing which resources belonged on the critical path, however, those changes could easily cancel each other out.</p><p>We eventually broke the loading process into four questions:</p><ul><li>What was the browser downloading?</li><li>Which JavaScript had to execute before the game became visible?</li><li>Which element was Lighthouse treating as the LCP candidate?</li><li>Which resources could wait until the user actually needed them?</li></ul><p>The report contained two obvious signals. The initial page transferred roughly 2.33 MB, and Lighthouse identified about 159 KiB of unused JavaScript.</p><p>Both numbers were unreasonable for a small game.</p><p>The problem was not one slow function. The first screen was trying to initialize the rendering engine, download large images, prepare a tutorial animation, request leaderboard data, and render the rest of the page at the same time.</p><h3><strong>Stop shipping all of PixiJS for one renderer</strong></h3><p>The game originally imported `pixi.js-legacy` as a single package:</p><pre>import * as PIXI from &quot;pixi.js-legacy&quot;;</pre><p>That was convenient, but the legacy bundle contained compatibility paths we did not use. Our game only needed WebGL rendering and a small set of primitives such as Container, Sprite, Texture, and AnimatedSprite.</p><p>We replaced the full import with module-level imports:</p><pre>import { BaseTexture, Renderer, Texture } from &quot;@pixi/core&quot;;<br>import { Container } from &quot;@pixi/display&quot;;<br>import { Rectangle } from &quot;@pixi/math&quot;;<br>import { Sprite } from &quot;@pixi/sprite&quot;;<br>import { AnimatedSprite } from &quot;@pixi/sprite-animated&quot;;</pre><p>We also created the WebGL renderer directly instead of shipping and running Canvas fallback detection:</p><pre>this.renderer = new Renderer({<br>  view: this.canvas,<br>  width: 1,<br>  height: 1,<br>  antialias: true,<br>  backgroundAlpha: 0,<br>});</pre><p>The benefit was larger than a smaller download. Less JavaScript also meant less parsing, compilation, and execution, which matters much more on a throttled mobile CPU.</p><p>There was a tradeoff: removing the legacy fallback narrowed the supported rendering path. We only made that change after confirming that WebGL was available across our target browsers.</p><p>Performance work is not about removing the most code. It is about paying only for the compatibility and features the product actually needs.</p><h3><strong>Keep browser-only game code out of server rendering</strong></h3><p>PixiJS depends on Canvas and browser APIs. The navigation, explanatory copy, and SEO content still benefit from being rendered by Next.js.</p><p>We separated those responsibilities. The page remained server-rendered, while the game became a client-only dynamic import:</p><pre>const ColorTilesGame = dynamic(<br>  () =&gt; import(&quot;./color-tiles-game&quot;).then((mod) =&gt; mod.ColorTilesGame),<br>  {<br>    ssr: false,<br>    loading: () =&gt; &lt;GameLoadingPanel /&gt;,<br>  },<br>);</pre><p>This did not make the game bundle disappear, but it stopped the server from processing a module that could only run in the browser. It also gave us a controlled loading state with stable dimensions.</p><p>That stable placeholder mattered. Lazy-loading a large interactive area without reserving its dimensions can trade loading speed for layout shift. By keeping the game frame fixed, we reduced initial work while keeping CLS at zero.</p><h3><strong>Remove the tutorial GIF from the critical path</strong></h3><p>The tutorial originally used an animated GIF. The problem was not just its file size. GIF decoding is expensive, and the browser could begin fetching it even when the tutorial was not open.</p><p>We made two changes:</p><ul><li>Converted the 235 KB GIF into a 67 KB MP4, reducing its size by about 71%.</li><li>Mounted the media only when the user explicitly opened the tutorial.</li></ul><p>The instructional video further down the page only preloads metadata:</p><pre>&lt;video autoPlay loop muted playsInline preload=&quot;metadata&quot;&gt;<br>  &lt;source src=&quot;/tutorial-demo.mp4&quot; type=&quot;video/mp4&quot; /&gt;<br>&lt;/video&gt;</pre><p>The underlying principle was simple: a resource can be valuable without being necessary for the first screen.</p><p>The tutorial remained part of the product, but it no longer competed with the game board for initial bandwidth and decoding time.</p><h3><strong>Image optimization is more than converting files to WebP</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*ATxEa700plMWYCSf2DY7EQ.png" /></figure><p>Converting them to WebP helped, but format alone was not enough. If an image is displayed at 110 pixels wide on mobile, downloading a desktop-sized source is still wasteful.</p><p>We combined several changes:</p><ul><li>Added accurate `sizes` values for responsive images.</li><li>Used an image service to generate variants for different viewport widths.</li><li>Applied `loading=”lazy”` and a low `fetchPriority` to below-the-fold images.</li><li>Created a 4.8 KB placeholder for the game background.</li><li>Added long-lived cache headers for static image assets.</li></ul><p>We also learned that preload can easily make things worse.</p><p>Our first attempt preloaded the full-resolution background because we assumed it would improve LCP. Instead, the file occupied the network earlier and competed with more important resources. We later preloaded only the tiny placeholder and allowed the full image to load at the appropriate time.</p><p><strong>preload</strong> is not a “make this page faster” switch. It raises a resource’s priority. Giving the wrong resource high priority can slow the page down.</p><h3><strong>Move images to a dedicated CDN hostname and cache them aggressively</strong></h3><p>Compression reduced the cold-load cost, but we also wanted repeat visits to avoid downloading the same assets again and the application server to stop doing image work.</p><p>We moved image delivery away from the main application hostname and introduced a dedicated subdomain:</p><pre>export const DEFAULT_IMAGE_BASE_URL = &quot;https://img.colortilesgame.net&quot;;<br><br>export function imageAsset(path: string) {<br>  return `${DEFAULT_IMAGE_BASE_URL}/${path}`;<br>}</pre><p>Centralizing URL generation behind one helper made the migration manageable. Components did not need to know whether an asset lived in the Next.js application, object storage, or behind a CDN. The base URL could also be changed through `NEXT_PUBLIC_IMAGE_BASE_URL` without rewriting every component.</p><p>The new hostname gave us an independent caching and image-transformation boundary. Responsive images are delivered through Cloudflare’s image endpoint, with the requested dimensions, quality, and output format encoded in the URL:</p><pre>https://img.colortilesgame.net/cdn-cgi/image/width=480,height=367,format=auto,quality=60/image.webp</pre><p>That means a mobile device does not need to download the same variant as a wide desktop screen. Once generated, each variant can be served from the CDN edge instead of repeatedly reaching the application origin.</p><p>We then increased the cache lifetime for static images to one year:</p><pre>images: {<br>  minimumCacheTTL: 31536000,<br>},<br><br>headers: [{<br>  key: &quot;Cache-Control&quot;,<br>  value: &quot;public, max-age=31536000, immutable&quot;,<br>}],</pre><p>The word `immutable` is important. It tells the browser that the resource at this URL will never change, so it should not spend a round trip revalidating it. That is only safe when an updated image receives a new filename or versioned URL. Overwriting an existing file while keeping its URL would leave users with the old image for up to a year.</p><p>A separate hostname also has an initial cost: another DNS lookup and TLS connection. We paid that cost early with a preconnect hint:</p><pre>&lt;link rel=&quot;preconnect&quot; href=&quot;https://img.colortilesgame.net&quot; /&gt;</pre><p>We did not split the hostname to revive the old HTTP/1 technique of opening more parallel connections. With HTTP/2 and HTTP/3, that is usually unnecessary. The value was operational separation: independent cache rules, edge resizing, lower origin traffic, and a stable asset delivery layer.</p><p>Lighthouse’s cold-load run shows part of this improvement through the smaller responsive variants. The one-year browser and edge caches matter even more outside that single run, when returning players no longer pay for unchanged backgrounds, atlases, and controls.</p><h3><strong>Remove a render-blocking round trip with Next.js `inlineCss`</strong></h3><p>After reducing the large assets and JavaScript, we still had a smaller dependency in the rendering path: the browser had to receive the HTML, discover the stylesheet link, request the CSS, and wait for it before painting the correctly styled game shell.</p><p>Next.js has an experimental `inlineCss` option that emits the page CSS inside `&lt;style&gt;` tags in the HTML instead of linking to separate CSS files. We enabled it in `next.config.mjs`:</p><pre>const nextConfig = {<br>  experimental: {<br>    inlineCss: true,<br>  },<br>};</pre><p>This removed a network discovery and request step from the initial render. That mattered for our game because the CSS establishes the dimensions of the board, controls, and loading placeholder. Delivering those rules with the document allowed the browser to construct the correctly sized first screen without waiting for a separate stylesheet response.</p><p>We do not credit this flag with the entire score increase. The large improvements came from reducing JavaScript and media weight. `inlineCss` was a finishing optimization that shortened the remaining render path after the larger bottlenecks were gone.</p><p>It also comes with real tradeoffs. Inlined CSS increases the HTML response, repeats shared styles across pages, and cannot benefit from the browser’s separate stylesheet cache on repeat visits. The option is still experimental, so it should be tested against the production output when Next.js is upgraded.</p><p>For our relatively focused game pages, the reduced first-load round trip was worth that cost. A content-heavy site with a large shared stylesheet might reach a different conclusion.</p><h3><strong>The leaderboard should not delay the board</strong></h3><p>The leaderboard is useful, but it is not part of the critical path for starting a game. Originally, the page requested leaderboard data during initial loading, adding network activity and React state updates while PixiJS was initializing.</p><p>We changed it to load in two situations:</p><ul><li>When the leaderboard approaches the viewport, detected with `IntersectionObserver`.</li><li>When a run ends and the result is actually needed.</li></ul><pre>const observer = new IntersectionObserver(<br>  (entries) =&gt; {<br>    if (!entries.some((entry) =&gt; entry.isIntersecting)) return;<br>    observer.disconnect();<br>    void refreshRankings();<br>  },<br>  { rootMargin: &quot;480px 0px&quot; },<br>);</pre><p>Nothing was removed from the product. The work simply moved closer to the moment when the user needed it.</p><p>In performance work, postponing non-critical work often produces a larger gain than making every function 10% faster.</p><h3><strong>What did not work as well as expected</strong></h3><p>The easiest mistake was treating Lighthouse as a number to maximize.</p><p>FCP was already below one second, so spending more time on it did not solve an 11-second LCP. Preloading every important-looking image created bandwidth contention. Measuring a Next.js development server included compilation and debugging overhead that did not represent production behavior.</p><p>We eventually standardized the process:</p><ul><li>Test an optimized production build.</li><li>Use the same Lighthouse version and mobile simulation settings.</li><li>Record individual metrics, not only the overall score.</li><li>Validate one related group of changes at a time.</li><li>Regression-test game input, Canvas rendering, and responsive layout.</li></ul><p>Lighthouse scores naturally vary with machine load and Chrome state, so 97 is not a permanent guarantee. The durable result is that LCP fell from double digits to roughly 2.3 seconds, main-thread blocking dropped by almost 80%, and initial transfer size dropped by about 78%.</p><h3><strong>What we learned</strong></h3><p>First, a performance problem is rarely just “slow code.” Our largest bottleneck was the timing of resources entering the critical path.</p><p>Second, a rendering engine should be imported according to the capabilities the product actually uses. Needing Sprite does not mean the user should pay for an entire legacy rendering stack.</p><p>Third, the first screen is a budget. The game, tutorial, leaderboard, and long-form content cannot all declare themselves highest priority.</p><p>Fourth, optimization needs repeatable measurement. The total score gets attention, but LCP, TBT, transfer size, and real interaction behavior tell us what to change.</p><p>Moving from the 40s to 97 did not come from one magical configuration option. It came from repeatedly asking the same question:</p><p><strong>Does this work really have to happen before the player can see the board and make the first move?</strong></p><p>When the answer was no, we moved it out of the initial path.</p><p>The finished page did not lose any core feature. The browser simply stopped trying to do everything in the first second.</p><h3><strong>Play the optimized version</strong></h3><p>The production game is live at <a href="https://colortilesgame.net/">Color Tiles</a>. You can try it on desktop or mobile, inspect the loading path in DevTools, and run Lighthouse against the same experience described in this article.</p><p>If you enjoy quick browser puzzles, you can also try <a href="https://fruitboxgame.com/">Fruit Box</a>, a free number game that combines mental arithmetic with visual scanning. Drag a rectangle around numbered apples that add up to exactly 10, and clear as many as you can before the 120-second timer runs out. It works on desktop and mobile, with no download required.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d04e803a27ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kg to Lbs and Ounces: How to Read the Result Correctly]]></title>
            <link>https://medium.com/@winterscott999/kg-to-lbs-and-ounces-how-to-read-the-result-correctly-3c70cbfbd043?source=rss-ee5d435d1bd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c70cbfbd043</guid>
            <dc:creator><![CDATA[Winterscott]]></dc:creator>
            <pubDate>Sat, 30 May 2026 03:28:41 GMT</pubDate>
            <atom:updated>2026-05-30T03:37:48.555Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes a decimal pounds result is not the format you want. Instead of <strong>10 kg = 22.05 lbs</strong>, you may need pounds and ounces:</p><p><strong>10 kg = 22 lb 0.7 oz</strong></p><p>This format is common for baby weight, food portions, luggage, and everyday measurements in the United States.</p><h4><strong>The Formula</strong></h4><p>First convert kilograms to total pounds:</p><p><strong>total pounds = kilograms x 2.2046226218</strong></p><p>Then split the decimal part into ounces:</p><p><strong>ounces = decimal pounds x 16</strong></p><h4><strong>Worked Example: 23 Kg to Lbs and Oz</strong></h4><p>Convert 23 kg to total pounds:</p><p><strong>23 x 2.2046226218 = 50.7063203 lbs</strong></p><p>The whole pounds are <strong>50 lb</strong>.</p><p>Now convert the decimal part:</p><p><strong>0.7063203 x 16 = 11.3 oz</strong></p><p>So:</p><p><strong>23 kg = 50 lb 11.3 oz</strong></p><h4><strong>Common Kg to Lbs and Ounces Examples</strong></h4><figure><img alt="Common Kg to Lbs and Ounces Examples" src="https://cdn-images-1.medium.com/max/398/1*j72uDZP6LJyRyiObmxu3RA.png" /><figcaption>Common Kg to Lbs and Ounces Examples</figcaption></figure><p>If the math is inconvenient, enter the value in a <a href="https://kgtolbs.org/">kilograms to pounds calculator</a> that shows decimal pounds and pounds-plus-ounces together.</p><h4><strong>Decimal Pounds vs Pounds and Ounces</strong></h4><p>These two formats can describe the same weight:</p><ul><li><strong>50.71 lbs</strong></li><li><strong>50 lb 11.3 oz</strong></li></ul><p>The first format is easier for spreadsheets. The second format is easier for people who think in pounds and ounces.</p><h4><strong>Baby Weight Note</strong></h4><p>For baby weights, pounds and ounces are often easier to read than decimal pounds. For example:</p><p><strong>5 kg = 11 lb 0.4 oz</strong></p><p>However, medical records may still use kilograms or grams. If a health professional gives a value in a specific unit, keep that unit when recording or communicating it.</p><h4><strong>Luggage Note</strong></h4><p>Airline baggage limits are usually listed as either kilograms or pounds. A common limit is 23 kg, which is <strong>50 lb 11.3 oz</strong>. If the airline states a limit in kilograms, compare your bag against kilograms first instead of relying only on a rounded pound number.</p><h4><strong>Suggested Resource Box</strong></h4><p>To see decimal pounds and pounds-plus-ounces at the same time, use this <a href="https://kgtolbs.org/">kilograms to pounds calculator</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c70cbfbd043" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DuckColor: Turning AI Color Generation Into a Practical Design Workflow]]></title>
            <link>https://medium.com/@winterscott999/duckcolor-turning-ai-color-generation-into-a-practical-design-workflow-f7b94a46d4e8?source=rss-ee5d435d1bd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7b94a46d4e8</guid>
            <dc:creator><![CDATA[Winterscott]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 09:02:09 GMT</pubDate>
            <atom:updated>2026-03-27T09:03:26.767Z</atom:updated>
            <content:encoded><![CDATA[<p>Color selection is one of those tasks that looks simple until it isn’t.</p><p>You can generate random palettes in seconds, but production work needs more than “nice colors.” You need consistency,<br> readability, export-ready tokens, context-specific choices, and often a way to iterate with your team.</p><p>That’s exactly the gap <a href="https://duckcolor.com/">DuckColor</a> is designed to close: from quick inspiration to delivery-rea<br> dy color systems.</p><h3>Why DuckColor Exists</h3><p>Most color tools are good at one thing: generating swatches, extracting colors, or validating contrast. DuckColor combines these capabilities into one connected workflow so you can move from idea to implementation without tool-hopping.</p><h3>Instant AI Palette Generation</h3><p><a href="https://duckcolor.com/en">On the homepage generator</a>, you can enter a short prompt, choose style controls, and get two palettes for side-by-side comparison.</p><p>You can control:</p><p>- Color count (4–8)<br> — Intent (inspiration-first vs application-oriented)<br> — Style mode (warm, cold, bright, dark, pastel, vintage)<br> — Color family (multicolor or monochrome)</p><p>Each result includes name, description, and HEX values with quick copy and image export.</p><h3>Palette Discovery That’s Actually Usable</h3><p>In the <a href="https://duckcolor.com/en/palettes">Palette Explorer</a>, you can filter by hue, style, and theme to find relevant palettes faster.</p><p>From there, each palette detail page gives deeper context (attributes, style/theme tags, and related recommendations), making discovery more structured and less random.</p><h3>Color Library for Single-Color Workflows</h3><p>In the <a href="https://duckcolor.com/en/colors">Color Library</a>, you can search colors and open detailed color pages with:</p><p>- HEX / RGB / HSL copy<br> — CSS variable snippet copy<br> — Harmony suggestions<br> — Tint/shade ladders<br> — Related colors and palettes</p><p>This is especially useful when a brand anchor color is your starting point.</p><h3>Scenario-Specific Tools</h3><p>DuckColor splits color work into concrete tasks:<br> — <a href="https://duckcolor.com/en/tools/color-mixer">Color Mixer</a>: compare weighted mixing across RGB/LAB/LCH/OKLAB and more.<br> — Image Picker (<a href="https://duckcolor.com/en/tools/image-picker">https://duckcolor.com/en/tools/image-picker</a>): extract and refine palettes from uploaded or pasted images.<br> — Palette Studio (<a href="https://duckcolor.com/en/tools/palette-studio">https://duckcolor.com/en/tools/palette-studio</a>): iterate in multi-turn conversations with version history.</p><p>If you prefer starting from a central index, use the <a href="https://duckcolor.com/en/tools">Tools Hub</a>.</p><h3>Final Thoughts</h3><p>DuckColor is not just a “palette generator.”<br> It supports a full chain: inspiration, filtering, scenario-specific generation, readability checks, export, and<br> iteration.</p><p>If your work sits between design intent and engineering constraints, exploring <a href="https://duckcolor.com/">DuckColor </a>is worth your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7b94a46d4e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>