<?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>Forem: purpleship</title>
    <description>The latest articles on Forem by purpleship (@purpleship).</description>
    <link>https://forem.com/purpleship</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3787787%2F182803ff-aed0-4e5b-85ae-79db3ac753ca.png</url>
      <title>Forem: purpleship</title>
      <link>https://forem.com/purpleship</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/purpleship"/>
    <language>en</language>
    <item>
      <title>I built a mipmap version of r/place — WebGL pixel art on a real world map</title>
      <dc:creator>purpleship</dc:creator>
      <pubDate>Mon, 23 Feb 2026 22:34:12 +0000</pubDate>
      <link>https://forem.com/purpleship/i-built-a-mipmap-version-of-rplace-webgl-pixel-art-on-a-real-world-map-5436</link>
      <guid>https://forem.com/purpleship/i-built-a-mipmap-version-of-rplace-webgl-pixel-art-on-a-real-world-map-5436</guid>
      <description>&lt;p&gt;I wanted to build a "mipmap version of r/place" -- zoom out and you see the whole world, zoom in and you're placing individual pixels at real geographic coordinates.&lt;/p&gt;

&lt;p&gt;The result: &lt;strong&gt;&lt;a href="https://worldcanvas.art" rel="noopener noreferrer"&gt;WorldCanvas&lt;/a&gt;&lt;/strong&gt; -- a real-time collaborative pixel art canvas where every pixel sits at an actual lat/lon position on a world map.&lt;/p&gt;

&lt;h2&gt;
  
  
  The concept
&lt;/h2&gt;

&lt;p&gt;r/place is great but the canvas is an abstract grid. I wanted the canvas to &lt;em&gt;mean&lt;/em&gt; something geographically. Place pixel art in Seoul and it shows up in Seoul. Tokyo, New York, Paris -- the map is the canvas.&lt;/p&gt;

&lt;p&gt;Zoom level 1 = world overview. Zoom level 12 = individual 1px cells. All backed by real Mercator coordinates.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hard parts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WebGL-only renderer
&lt;/h3&gt;

&lt;p&gt;My first version used Canvas2D as a fallback. During profiling I noticed zoom-out caused massive frame drops -- the culprit was Canvas2D's &lt;code&gt;drawImage&lt;/code&gt; on large tile counts. Solution: remove Canvas2D entirely. WebGL-only.&lt;/p&gt;

&lt;p&gt;Now it runs at 60fps regardless of zoom level.&lt;/p&gt;

&lt;h3&gt;
  
  
  Viewport-scoped SSE
&lt;/h3&gt;

&lt;p&gt;Initially I was broadcasting every pixel update to every connected client. Fine for low traffic, terrible at scale. Now SSE updates are scoped to the client's current viewport -- you only receive updates for tiles you can actually see.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-time at scale
&lt;/h3&gt;

&lt;p&gt;The tile system divides the world into a grid. Each tile is a 256x256 pixel region. Tiles load on demand, cache in memory, and invalidate via SSE when someone paints nearby.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: Vanilla JS + WebGL (no framework)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js + AWS App Runner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: PostgreSQL (pixel state) + S3 (tile cache)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time&lt;/strong&gt;: Server-Sent Events (SSE)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://worldcanvas.art" rel="noopener noreferrer"&gt;https://worldcanvas.art&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Still early. Curious what people think about the rendering approach or the geographic canvas concept.&lt;/p&gt;

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