<?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: Chen Tao</title>
    <description>The latest articles on DEV Community by Chen Tao (@cksmct).</description>
    <link>https://dev.to/cksmct</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%2F3992839%2F2d73520a-8219-411e-b15f-811a183a8b9a.jpg</url>
      <title>DEV Community: Chen Tao</title>
      <link>https://dev.to/cksmct</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cksmct"/>
    <language>en</language>
    <item>
      <title>I built a lightweight Football Manager alternative because I don't have time for heavy games</title>
      <dc:creator>Chen Tao</dc:creator>
      <pubDate>Tue, 07 Jul 2026 03:35:36 +0000</pubDate>
      <link>https://dev.to/cksmct/i-built-a-lightweight-football-manager-alternative-because-i-dont-have-time-for-heavy-games-1jd4</link>
      <guid>https://dev.to/cksmct/i-built-a-lightweight-football-manager-alternative-because-i-dont-have-time-for-heavy-games-1jd4</guid>
      <description>&lt;p&gt;Hi guys, I am a web developer from China. &lt;/p&gt;

&lt;p&gt;Today I want to show you my side project: &lt;strong&gt;38-0 League&lt;/strong&gt;. It is a football (soccer) simulation game on web.&lt;/p&gt;

&lt;p&gt;I used to play a lot of Football Manager. But now I have a full-time job, I don't have time to play 5 hours just for half season. Sometimes I just have a stupid idea in my head: "What if Arsenal play in La Liga?" or "What if Haaland play in League 2?".&lt;/p&gt;

&lt;p&gt;So I write this game. You can custom teams, players, and just click one button. It will simulate 38 matches very fast.&lt;/p&gt;

&lt;p&gt;Here is some technical problems I met and how I fix them. Maybe it can help you if you build similar things.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Heavy Calculation in Browser
&lt;/h3&gt;

&lt;p&gt;Because I have no money to buy strong backend server, all match simulation runs in user's browser.&lt;br&gt;
Simulating 380 matches (20 teams play each other 2 times) is actually very fast in JS. The slow part is React rendering. At first, when I click "Simulate Season", the page freeze for 2 seconds. This is because I try to put all match logs and events into DOM state at same time.&lt;br&gt;
&lt;strong&gt;Solution:&lt;/strong&gt; I separate the logic and UI. The simulation function just return a big JSON object in memory. React only render the final League Table. The match details are lazy loaded. If you don't click the specific match, it never renders.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Cheap Leaderboard using Cloudflare D1
&lt;/h3&gt;

&lt;p&gt;I want a leaderboard so players can compete. But Redis or AWS RDS is too expensive for a free game. &lt;br&gt;
I try Cloudflare D1. It is serverless SQLite on edge. It is amazing!&lt;br&gt;
I write a Cloudflare Worker to receive high score from client, check a simple secret token, and save to D1 database. The latency is very low because the worker runs near the user. And the free tier gives me 100,000 writes per day. Very enough for me.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. SEO for SPA (Multi-language)
&lt;/h3&gt;

&lt;p&gt;This is my biggest headache. I use Vite + React. Google crawler don't like it. &lt;br&gt;
I want people from Spain or Brazil to find my game, so I need &lt;code&gt;/es&lt;/code&gt; and &lt;code&gt;/pt&lt;/code&gt; routes. I didn't use Next.js because I don't want to rewrite all my code. So I write a post-build Node script. &lt;br&gt;
After &lt;code&gt;npm run build&lt;/code&gt;, the script copy &lt;code&gt;index.html&lt;/code&gt; into many folders, and replace the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tags with correct language text statically. It's a bit dirty hack, but Google Search Console finally start to index my pages!&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Ads vs PageSpeed
&lt;/h3&gt;

&lt;p&gt;To pay the domain name, I put some Adsterra banners. But these ad scripts destroy my Core Web Vitals. My LCP and TBT become red in Lighthouse.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How I fix:&lt;/strong&gt; I delay the ad script. I use a simple event listener. Only when user scroll or move mouse, I append the ad &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; to document body. So Lighthouse sees a clean page, and real users still see the ads. Win-win.
&lt;/h2&gt;

&lt;p&gt;If you like football, please try it here: &lt;strong&gt;&lt;a href="https://38-0.one" rel="noopener noreferrer"&gt;38-0.one&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
You can try the Sandbox mode to make your own crazy league. Let me know if you find bugs or have ideas! Thanks!&lt;br&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%2Fphk27a09f7u7tdzrjpj2.png" 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%2Fphk27a09f7u7tdzrjpj2.png" alt=" " width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Evolving my React Football Simulator: From getting crushed in 7-0 to the ultimate 8-0 World Cup challenge</title>
      <dc:creator>Chen Tao</dc:creator>
      <pubDate>Thu, 25 Jun 2026 08:55:46 +0000</pubDate>
      <link>https://dev.to/cksmct/evolving-my-react-football-simulator-from-getting-crushed-in-7-0-to-the-ultimate-8-0-world-cup-3mi</link>
      <guid>https://dev.to/cksmct/evolving-my-react-football-simulator-from-getting-crushed-in-7-0-to-the-ultimate-8-0-world-cup-3mi</guid>
      <description>&lt;p&gt;A few days ago, I wrote about building a hardcore football draft simulator in React where the RNG was so punishing that I couldn't even beat my own game using underdog teams.&lt;/p&gt;

&lt;p&gt;The feedback was awesome, but I quickly realized the game had limitations. The UI was a bit basic, the performance on mobile had quirks due to third-party scripts, and honestly, the concept needed to be bigger. With the 2026 World Cup on the horizon, I decided to tear down the codebase and rebuild it into something much more ambitious.&lt;/p&gt;

&lt;p&gt;Today, I’m launching the evolved version: 8-0.online. Here is exactly what changed under the hood and how I scaled the architecture from a simple draft tool to a multi-mode simulator with a 100/100 Lighthouse score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Core Shift: From a Single Draft to 4 Game Modes&lt;/strong&gt;&lt;br&gt;
The original "7-0" version was a simple randomized draft. It was fun, but it got repetitive. For the new 8-0 version, I restructured the state management to support multiple isolated game flows. I introduced 4 entirely new modes, including:&lt;/p&gt;

&lt;p&gt;2026 Random XI: Pure chaos. You get what you get.&lt;br&gt;
The Redemption Tournament: A mode with slightly different risk/reward mechanics.&lt;br&gt;
Tech difference: Instead of a monolithic match simulation hook, I had to decouple the simulation logic from the drafting phase, allowing different rulesets to be injected dynamically depending on the selected mode.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. UI/UX Overhaul: Cinematic Dark Mode &amp;amp; Mobile App Shell&lt;/strong&gt;&lt;br&gt;
The old version had a standard, functional UI. For 8-0, I wanted a premium, cinematic feel. I completely ripped out the old CSS and implemented a comprehensive Dark Mode across the entire app.&lt;/p&gt;

&lt;p&gt;Tech difference: I built a mobile-first App Shell with a cinematic fade-out splash screen. I also had to hunt down and refactor dozens of hardcoded inline styles that were causing contrast issues. The result is a much denser, more immersive UI that actually feels like a high-end gaming dashboard rather than a simple web utility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Hitting 100/100 Lighthouse (Taming Render-Blocking Ads)&lt;/strong&gt;&lt;br&gt;
One of the biggest headaches in the previous build was mobile web performance, specifically how third-party ad networks (like Adsterra) were destroying my Core Web Vitals.&lt;/p&gt;

&lt;p&gt;Tech difference: I implemented a strict lazy-loading strategy for the ad containers. By properly handling the visual whitespace (padding/margin) before the ads load, I eliminated layout shifts (CLS). Combined with ARIA accessibility patches and eliminating render-blocking dependencies, the React SPA now hits a perfect 100/100 on mobile PageSpeed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Taking Multi-lingual SEO to the Next Level (IndexNow)&lt;/strong&gt;&lt;br&gt;
In my last post, I mentioned using a Node.js post-build script to generate 13 different language static index.html files with hreflang tags. That worked great for structure, but waiting for search engines to crawl all those new 8-0 routes was taking too long.&lt;/p&gt;

&lt;p&gt;Tech difference: I didn't want to wait. Instead of manually submitting sitemaps via Bing/Yandex Webmaster UI, I wrote a custom Python automation script to integrate directly with the open IndexNow protocol. Now, whenever I push a new language update or a new game mode, the script pings the API with a custom verification key, forcing instant indexing across major search engines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try to beat the RNG (Again)&lt;/strong&gt;&lt;br&gt;
The game is now fully migrated to its new home at 👉 &lt;a href="https://8-0.online/" rel="noopener noreferrer"&gt;8-0.online&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I still haven't managed to go undefeated in the 2026 Random XI mode with a tier-3 nation. If anyone manages to pull it off, please let me know what tactical setup you used!&lt;/p&gt;

&lt;p&gt;Also, I'd love to hear from fellow React devs: how do you typically handle state persistence for multi-step progressive web games without overcomplicating things with Redux?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>simulator</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Building a hardcore football simulator in React (and failing to win my own game)</title>
      <dc:creator>Chen Tao</dc:creator>
      <pubDate>Fri, 19 Jun 2026 16:05:51 +0000</pubDate>
      <link>https://dev.to/cksmct/building-a-hardcore-football-simulator-in-react-and-failing-to-win-my-own-game-5glh</link>
      <guid>https://dev.to/cksmct/building-a-hardcore-football-simulator-in-react-and-failing-to-win-my-own-game-5glh</guid>
      <description>&lt;p&gt;I've always found commercial soccer draft games to be a bit too easy and forgiving. You just click some shiny cards and eventually win. So for my recent side project, I decided to build something much more punishing.&lt;/p&gt;

&lt;p&gt;The idea was simple: &lt;strong&gt;You must win 7 consecutive matches to lift the World Cup, using randomly drafted squads based on real FC 24 player stats.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Tech Stack
&lt;/h3&gt;

&lt;p&gt;I wanted to keep it lightweight, so I went with pure &lt;strong&gt;React + Vite&lt;/strong&gt;. No heavy state management libraries, just good old React hooks to handle the match simulation logic and RNG purely on the client side.&lt;/p&gt;

&lt;p&gt;One of the fun challenges was making it multi-lingual for global football fans. Instead of a backend, I wrote a Node.js post-build script that dynamically generates &lt;code&gt;index.html&lt;/code&gt; files with proper &lt;code&gt;hreflang&lt;/code&gt; tags for 13 different languages, ensuring it's SEO-friendly out of the box.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Result
&lt;/h3&gt;

&lt;p&gt;The match simulation turned out to be brutally realistic. I've been trying to win the tournament with the China PR squad, and I keep getting absolutely demolished by France or Brazil in the semi-finals. The RNG has no mercy. 😂&lt;/p&gt;

&lt;p&gt;If you want to try the simulation logic (or see if you can break the curse with an underdog nation like China), the game is live here: &lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://7-0worldcup.org" rel="noopener noreferrer"&gt;7-0 World Cup Draft Simulator&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Would love to hear any feedback from fellow React devs on how to better balance client-side RNG for games like this!&lt;/p&gt;

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