<?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: Cat</title>
    <description>The latest articles on DEV Community by Cat (@pointinvaders).</description>
    <link>https://dev.to/pointinvaders</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%2F4258082%2Fa2da9774-31d8-4240-becd-5bd54376b1e4.png</url>
      <title>DEV Community: Cat</title>
      <link>https://dev.to/pointinvaders</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pointinvaders"/>
    <language>en</language>
    <item>
      <title>What I learned shipping a 31-game arcade in the browser with no engine</title>
      <dc:creator>Cat</dc:creator>
      <pubDate>Sun, 22 Nov 2026 02:30:23 +0000</pubDate>
      <link>https://dev.to/pointinvaders/what-i-learned-shipping-a-31-game-arcade-in-the-browser-with-no-engine-2en6</link>
      <guid>https://dev.to/pointinvaders/what-i-learned-shipping-a-31-game-arcade-in-the-browser-with-no-engine-2en6</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I build Point Invaders with an AI coding assistant (Claude), and this article was drafted with AI help and edited by me.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Point Invaders is a neon arcade that runs in the browser: 31 missions you can play in flat 2D or full 3D, live 1v1 duels, a 20-chapter campaign, hover-car racing, and a 3D hub you fly a ship around. No download, no signup. Here's what's under the hood, and what bit me along the way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftirt0bnhfwpbt5riqzau.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftirt0bnhfwpbt5riqzau.gif" alt="Hover-car race on a glowing road through Saturn's rings, from the CIRCUITS mode" width="512" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  One page, no framework, no engine
&lt;/h2&gt;

&lt;p&gt;The whole arcade is four files at the top of the site: &lt;code&gt;index.html&lt;/code&gt;, &lt;code&gt;app.js&lt;/code&gt;, &lt;code&gt;style.css&lt;/code&gt; and a service worker. &lt;code&gt;app.js&lt;/code&gt; is about 8 MB of unminified, commented JavaScript — you can open it in your browser — and it's served compressed at about 2.5 MB. There's no framework and no game engine: the 3D is the game's own WebGL renderer.&lt;/p&gt;

&lt;p&gt;Shipping one big script has a cost on a slow phone. Measured on throttled "Slow 4G" with a 4× slower CPU, first paint comes at about 3.7 s and the buttons work at about 16 s, so the page shows a "still downloading" note after six seconds rather than leaving dead buttons on screen. Splitting the script is next on my list.&lt;/p&gt;

&lt;h2&gt;
  
  
  2D and 3D are the same game
&lt;/h2&gt;

&lt;p&gt;Every mission exists twice — a flat canvas version and a 3D one — and both score the same points onto the same boards. The 2D version runs at 60 fps on almost anything; the 3D one has LITE, NORMAL and ULTRA tiers, and LITE holds an older phone at a steady 30 fps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Models from Unreal and Blender, in a format of my own
&lt;/h2&gt;

&lt;p&gt;The ships, stations, asteroids and bosses are built in Unreal Engine and Blender, run headless from scripts, and exported into the arcade's own model format. They arrive in chunks, only the ones a screen draws, so the 2D arcade never downloads them.&lt;/p&gt;

&lt;p&gt;Each 3D file's address carries the first eight hex digits of its SHA-256. The service worker checks a file's bytes against that stamp before keeping it, keeps good files across releases, and so an update only downloads what changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Drawing only what you can see
&lt;/h2&gt;

&lt;p&gt;The Flight Deck was slow on laptops. Skipping the ships and stations behind the camera, no longer shading surfaces hidden behind nearer ones, and dropping a slow extra step the browser was adding to every triangle took it from about 23 fps to about 40 on the laptop I measured, with an identical picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  iPhones and the missing colour
&lt;/h2&gt;

&lt;p&gt;On iPhones the 3D models came out black or in harsh flat colours. Every browser on iOS decodes images with Safari's engine, and it threw away the colour of the textures wherever they keep extra data. The fix was to check how the browser decodes and, where colour would be lost, decode the textures in the game itself, exactly as they were made.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every sound is code
&lt;/h2&gt;

&lt;p&gt;There are no audio files. Every effect and every music loop is synthesised at runtime with Web Audio, which keeps the download small and lets a laser change pitch shot by shot. Players can write their own 16-step loop in the Drive Lab and play the arcade to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live duels on a realtime database
&lt;/h2&gt;

&lt;p&gt;Duels run over Firebase Realtime Database. A Pong duel streams the ball and both paddles many times a second; score races exchange scores and "hacks" that scramble the rival's board for a few seconds. When nobody answers, a labelled droid takes the seat, playing over a local stand-in for the database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Link previews from a Worker
&lt;/h2&gt;

&lt;p&gt;Chat apps never run JavaScript, so a shared challenge or level used to unfurl as the same picture. A Cloudflare Worker now answers the share paths, rewrites the page's &lt;code&gt;og:&lt;/code&gt; tags for that challenge, level or player card, and points them at the mission's own 1200×630 image.&lt;/p&gt;

&lt;h2&gt;
  
  
  A bug worth knowing: centred flex columns lose their top
&lt;/h2&gt;

&lt;p&gt;The sign-in screen was a flex column with &lt;code&gt;justify-content: center&lt;/code&gt;. On a phone the column was taller than the screen, and a centred flex item that overflows overflows at both ends — the part above the top can't be scrolled to. The logo sat 32 px above the top of an iPhone 13. Auto margins (&lt;code&gt;margin-block: auto&lt;/code&gt; on the child) centre when there's room and fall to zero when there isn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Releasing without breaking returning players
&lt;/h2&gt;

&lt;p&gt;A release is a number written in six places (the service worker's cache name and shell, the two &lt;code&gt;?v=&lt;/code&gt; stamps in the page, and the newest "What's new" entry). A check script verifies they agree, that every asset stamp matches its file, and that nothing unreferenced is published; a Playwright smoke test then boots the real page against the Firebase emulators.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working with an AI coding assistant
&lt;/h2&gt;

&lt;p&gt;Most of the code is written by Claude from my direction, release by release: I decide what the next version should do and how it should feel, test it, and send it back until it's right. The tests and the check script matter more for that, not less.&lt;/p&gt;

&lt;p&gt;You can play it at &lt;strong&gt;&lt;a href="https://pointinvaders.com" rel="noopener noreferrer"&gt;https://pointinvaders.com&lt;/a&gt;&lt;/strong&gt;. I'd like to hear where you got stuck in the first minute, and how 3D runs on your machine.&lt;/p&gt;

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