<?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: maydaychen</title>
    <description>The latest articles on DEV Community by maydaychen (@maydaychen).</description>
    <link>https://dev.to/maydaychen</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%2F4270268%2Fb022e875-5dea-471e-b4c9-626ffa133a82.png</url>
      <title>DEV Community: maydaychen</title>
      <link>https://dev.to/maydaychen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maydaychen"/>
    <language>en</language>
    <item>
      <title>Can One Zero-DOM Skeleton Power Both a Tower Defense and a Mario-Style Action Platformer?</title>
      <dc:creator>maydaychen</dc:creator>
      <pubDate>Sat, 28 Nov 2026 07:26:52 +0000</pubDate>
      <link>https://dev.to/maydaychen/can-one-zero-dom-skeleton-power-both-a-tower-defense-and-a-mario-style-action-platformer-14c0</link>
      <guid>https://dev.to/maydaychen/can-one-zero-dom-skeleton-power-both-a-tower-defense-and-a-mario-style-action-platformer-14c0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is written as part of the **Kiroween 2026 Hackathon&lt;/em&gt;* (&lt;code&gt;Skeleton Crew&lt;/code&gt; track).*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you join a "build a reusable code skeleton" hackathon track like &lt;strong&gt;Kiroween 2026 (&lt;code&gt;Skeleton Crew&lt;/code&gt;)&lt;/strong&gt;, it is tempting to make one game, swap the CSS theme, and ship two clones.&lt;/p&gt;

&lt;p&gt;We decided to test the opposite extreme: &lt;strong&gt;what happens if the skeleton stays 100% genre-pure and UI-free, while the two apps don't even share the same game genre?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The result is &lt;strong&gt;&lt;a href="https://github.com/maydaychen/kiroween-flow-defense" rel="noopener noreferrer"&gt;Kiroween Flow Defense&lt;/a&gt;&lt;/strong&gt; (&lt;a href="https://maydaychen.github.io/kiroween-flow-defense/" rel="noopener noreferrer"&gt;Play Live -- No Login&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;World #1 (&lt;code&gt;apps/crypt-warden&lt;/code&gt;)&lt;/strong&gt;: A Gothic graveyard &lt;strong&gt;Grid Tower Defense&lt;/strong&gt; (&lt;code&gt;mode: "grid-flow"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;World #2 (&lt;code&gt;apps/ddos-bastion&lt;/code&gt;)&lt;/strong&gt;: A 3 AM Cloud NOC &lt;strong&gt;2D Side-Scrolling Action Platformer&lt;/strong&gt; (&lt;code&gt;mode: "side-scroll-2d"&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They share &lt;strong&gt;zero UI components&lt;/strong&gt; and &lt;strong&gt;zero Canvas rendering code&lt;/strong&gt;, yet both are validated, simulated, and balanced by one TypeScript kernel (&lt;code&gt;@kiroween/flow-defense-core&lt;/code&gt;) and one portable Kiro Power (&lt;code&gt;flow-defense-power&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Where Should a Multi-Genre Skeleton Stop?
&lt;/h2&gt;

&lt;p&gt;Early on, we kept three strict rules in &lt;code&gt;.kiro/steering/tech.md&lt;/code&gt; and enforced them in CI tests (&lt;code&gt;tests/apps/kernel-purity.test.ts&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero DOM / Canvas / Browser globals in core&lt;/strong&gt;: Nothing in &lt;code&gt;packages/flow-defense-core/src/*.ts&lt;/code&gt; can touch &lt;code&gt;window&lt;/code&gt;, &lt;code&gt;document&lt;/code&gt;, or rendering code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero domain words in core&lt;/strong&gt;: Words like &lt;code&gt;graveyard&lt;/code&gt;, &lt;code&gt;lich&lt;/code&gt;, &lt;code&gt;ddos&lt;/code&gt;, &lt;code&gt;cdn&lt;/code&gt;, &lt;code&gt;tower&lt;/code&gt;, or &lt;code&gt;sla&lt;/code&gt; are forbidden in the kernel. The kernel only knows &lt;code&gt;Node&lt;/code&gt;, &lt;code&gt;Threat&lt;/code&gt;, &lt;code&gt;Budget&lt;/code&gt;, &lt;code&gt;Integrity&lt;/code&gt;, &lt;code&gt;damageTag&lt;/code&gt;, &lt;code&gt;weakTag&lt;/code&gt;, &lt;code&gt;resistTag&lt;/code&gt;, and structured &lt;code&gt;RejectionCode&lt;/code&gt;s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every core module stays &amp;lt;= 250 lines&lt;/strong&gt;: Keeping each subsystem small forced clean boundaries between shared combat math (&lt;code&gt;computeActualDamage&lt;/code&gt;, &lt;code&gt;getSkillUpgradeCost&lt;/code&gt;), grid simulation (&lt;code&gt;simulation.ts&lt;/code&gt;), and 2D platformer simulation (&lt;code&gt;action-physics.ts&lt;/code&gt;, &lt;code&gt;action-skills.ts&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The payoff: the same elemental counter formula (&lt;code&gt;weak&lt;/code&gt; = &lt;code&gt;1.5x&lt;/code&gt;, &lt;code&gt;resist&lt;/code&gt; = &lt;code&gt;0.55x&lt;/code&gt;, minus integer armor clamped to &lt;code&gt;&amp;gt;= 1&lt;/code&gt;) drives both a &lt;strong&gt;Frost Obelisk freezing Mist Wraiths&lt;/strong&gt; in a cemetery and a &lt;strong&gt;WAF Rule Engine beam piercing an SQLi Payload turret&lt;/strong&gt; in a server corridor.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Reversing the Perspective Inside Kiro Specs
&lt;/h2&gt;

&lt;p&gt;Halfway through the project, both apps were grid tower defenses. Using Kiro's native spec workflow (&lt;code&gt;.kiro/specs/ddos-bastion-platformer/&lt;/code&gt;), we turned &lt;strong&gt;World #2&lt;/strong&gt; into a full 2D side-scrolling platformer without throwing away the skeleton:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instead of passive grid towers placed by mouse, &lt;code&gt;CDN&lt;/code&gt;, &lt;code&gt;Token Bucket Limiter&lt;/code&gt;, &lt;code&gt;WAF&lt;/code&gt;, and &lt;code&gt;Elastic Worker Pool&lt;/code&gt; became &lt;strong&gt;active hero skills on &lt;code&gt;[1]&lt;/code&gt;--&lt;code&gt;[4]&lt;/code&gt;&lt;/strong&gt;, upgradable mid-run from &lt;code&gt;Lv.1&lt;/code&gt; to &lt;code&gt;Lv.3&lt;/code&gt; with &lt;code&gt;Shift+1&lt;/code&gt;--&lt;code&gt;4&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The blueprint validator gained &lt;code&gt;side-scroll-2d&lt;/code&gt; physics checks verified identically in both TypeScript (&lt;code&gt;action-validator.ts&lt;/code&gt;) and our zero-dependency Node MCP Power (&lt;code&gt;power/scripts/validate-action.mjs&lt;/code&gt;), with parity enforced by &lt;code&gt;64+&lt;/code&gt; cross-checks in &lt;code&gt;tests/apps/power-parity.test.ts&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;Anti-tunneling &lt;code&gt;maxFallSpeed&lt;/code&gt; cap (&lt;code&gt;&amp;lt;= (PLAYER_HEIGHT + minPlatformHeight) / 16ms&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Reachable pickup budget check (excluding embedded pickups inside solid geometry)&lt;/li&gt;
&lt;li&gt;Spawn platform support and boss-to-goal progression invariants&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Turning Kiro Hooks &amp;amp; Power Into Guardrails That Actually Fire
&lt;/h2&gt;

&lt;p&gt;Instead of keeping static prompt notes, we wired three real feedback loops into &lt;code&gt;.kiro/&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Steering (&lt;code&gt;.kiro/steering/&lt;/code&gt;)&lt;/strong&gt;: Five scoped rule files (&lt;code&gt;product.md&lt;/code&gt;, &lt;code&gt;structure.md&lt;/code&gt;, &lt;code&gt;tech.md&lt;/code&gt;, plus app-specific &lt;code&gt;crypt-warden.md&lt;/code&gt; and &lt;code&gt;ddos-bastion.md&lt;/code&gt;) keeping both aesthetics orthogonal -- parchment + spectral green vs CRT phosphor cyber NOC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Hooks (&lt;code&gt;.kiro/hooks/&lt;/code&gt;)&lt;/strong&gt;: Automatically run kernel unit + &lt;code&gt;fast-check&lt;/code&gt; property tests (&lt;code&gt;test-core-on-save.json&lt;/code&gt;) and dual-mode blueprint balance checks (&lt;code&gt;validate-blueprint-on-save.json&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Kiro Power (&lt;code&gt;power/&lt;/code&gt;)&lt;/strong&gt;: Built using only Node.js built-in modules so any developer can import &lt;code&gt;./power&lt;/code&gt; into Kiro IDE cleanly and call &lt;code&gt;validate_world_blueprint&lt;/code&gt;, &lt;code&gt;analyze_wave_balance&lt;/code&gt;, and &lt;code&gt;inspect_app_contract&lt;/code&gt; over stdio MCP.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Even in the live browser apps, clicking &lt;strong&gt;&lt;code&gt;Blueprint&lt;/code&gt;&lt;/strong&gt; opens an in-game &lt;strong&gt;Blueprint Lab&lt;/strong&gt; calling the exact same core validators on every keystroke so judges can tune physics, enemy HP, or skill upgrades and hot-reload live.&lt;/p&gt;

&lt;p&gt;The whole monorepo is guarded by &lt;strong&gt;442 automated tests&lt;/strong&gt; (37 core + 405 app, MCP parity, audio-unlock, and HUD regression tests), and Chrome CDP profiling lifted our Canvas2D platformer from &lt;code&gt;~20 fps&lt;/code&gt; to a steady &lt;strong&gt;&lt;code&gt;60 fps&lt;/code&gt;&lt;/strong&gt; by moving CRT scanlines to static CSS and baking offscreen scenery caches.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Live (Zero Login)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unified Portal&lt;/strong&gt;: &lt;code&gt;https://maydaychen.github.io/kiroween-flow-defense/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crypt Warden (Boss Wave 5 Deep Link)&lt;/strong&gt;: &lt;code&gt;https://maydaychen.github.io/kiroween-flow-defense/crypt-warden/?demo=boss&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DDoS Bastion (Boss Arena Deep Link)&lt;/strong&gt;: &lt;code&gt;https://maydaychen.github.io/kiroween-flow-defense/ddos-bastion/?demo=boss&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code (MIT + tracked &lt;code&gt;.kiro/&lt;/code&gt;)&lt;/strong&gt;: &lt;code&gt;https://github.com/maydaychen/kiroween-flow-defense&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kiro</category>
      <category>kiroween</category>
      <category>gamedev</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
