<?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: 丙赟信息</title>
    <description>The latest articles on DEV Community by 丙赟信息 (@bysoftgames).</description>
    <link>https://dev.to/bysoftgames</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%2F4182811%2F9e78c424-9d58-4616-aa9c-96cf20c67b10.png</url>
      <title>DEV Community: 丙赟信息</title>
      <link>https://dev.to/bysoftgames</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bysoftgames"/>
    <language>en</language>
    <item>
      <title>I built a stone-merging game with a global daily leaderboard</title>
      <dc:creator>丙赟信息</dc:creator>
      <pubDate>Tue, 13 Oct 2026 17:53:55 +0000</pubDate>
      <link>https://dev.to/bysoftgames/i-built-a-stone-merging-game-with-a-global-daily-leaderboard-2kcj</link>
      <guid>https://dev.to/bysoftgames/i-built-a-stone-merging-game-with-a-global-daily-leaderboard-2kcj</guid>
      <description>&lt;p&gt;I built &lt;strong&gt;Pebble Merge&lt;/strong&gt;, a physics puzzle game that runs in the browser: drop stones, merge same-colored ones, score points, and try not to stack past the top line.&lt;/p&gt;

&lt;p&gt;The part I care about most is the &lt;strong&gt;global daily leaderboard&lt;/strong&gt;. Every day all players get the same seeded board (a new seed rolls at UTC midnight), so after you finish a round you can see where you rank worldwide.&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="https://pebblemerge.bysoft.site/" rel="noopener noreferrer"&gt;https://pebblemerge.bysoft.site/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxmpl8nxzgazofpxr6ok2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxmpl8nxzgazofpxr6ok2.jpg" alt="Mid-game: the board gets crowded fast" width="800" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Classic&lt;/strong&gt; - beat your own best&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily&lt;/strong&gt; - same seed as everyone else, global board&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zen&lt;/strong&gt; - no game over, just merge&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the leaderboard handles cheating
&lt;/h2&gt;

&lt;p&gt;The client never sends a score. It sends a &lt;em&gt;merge log&lt;/em&gt;. The server replays that log through the real game logic (&lt;code&gt;core.js&lt;/code&gt;, the exact file the browser runs) and recomputes the score, then checks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the daily seed matches today's UTC seed&lt;/li&gt;
&lt;li&gt;the recomputed score equals the claimed score&lt;/li&gt;
&lt;li&gt;stone mass is conserved across the whole log&lt;/li&gt;
&lt;li&gt;the score is under the theoretical upper bound&lt;/li&gt;
&lt;li&gt;per-IP hourly submission cap&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inflated scores get rejected, and cheating means reimplementing the physics, not editing a number in devtools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;vanilla JS + Matter.js for the physics&lt;/li&gt;
&lt;li&gt;static assets on Cloudflare Workers&lt;/li&gt;
&lt;li&gt;Node + Express + Postgres for the score service, on a Synology NAS behind a Cloudflare tunnel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fycz3k6u5rb8tlns4id4f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fycz3k6u5rb8tlns4id4f.jpg" alt="A finished round: 3299 points after 268 merges" width="800" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That last one is the only reason a global leaderboard costs me nothing to run: no server bill, and I own the data.&lt;/p&gt;

&lt;p&gt;Feedback on the physics tuning and bug reports are very welcome - I would rather hear what feels wrong now than after I add more modes.&lt;/p&gt;

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