<?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: Zohaib Saleem</title>
    <description>The latest articles on DEV Community by Zohaib Saleem (@zohaib_saleem).</description>
    <link>https://dev.to/zohaib_saleem</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%2F4265216%2F3ef52e17-eb04-44ad-bab3-f2182532dc32.png</url>
      <title>DEV Community: Zohaib Saleem</title>
      <link>https://dev.to/zohaib_saleem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zohaib_saleem"/>
    <language>en</language>
    <item>
      <title>I put Minecraft's world generation in the browser with WebAssembly</title>
      <dc:creator>Zohaib Saleem</dc:creator>
      <pubDate>Wed, 25 Nov 2026 16:53:37 +0000</pubDate>
      <link>https://dev.to/zohaib_saleem/i-put-minecrafts-world-generation-in-the-browser-with-webassembly-3ogj</link>
      <guid>https://dev.to/zohaib_saleem/i-put-minecrafts-world-generation-in-the-browser-with-webassembly-3ogj</guid>
      <description>&lt;h1&gt;
  
  
  I put Minecraft's world generation in the browser with WebAssembly
&lt;/h1&gt;

&lt;p&gt;I play Minecraft myself, and I wanted to see what a seed holds before starting a world I'd spend weeks on: where the villages, biomes and structures are. So I built Seed Map Viewer — &lt;a href="https://seedmapviewer.com/" rel="noopener noreferrer"&gt;seedmapviewer.com&lt;/a&gt; — you paste a seed and see the full map before you play. It's free, there's no sign-up, and everything runs in your browser.&lt;/p&gt;

&lt;p&gt;It's now about 40 pages: the viewer, more than a dozen finders, seed lists and a few guides. Here's what this post covers: how I run Minecraft's world generation in the browser, test it against the real game, and fix what it gets wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why cubiomes
&lt;/h2&gt;

&lt;p&gt;Cubiomes is an open-source library that recreates Minecraft's world generation, so the map shows where the game puts biomes and structures. I chose it because it's accurate and free to use. I made it run fully in your browser, so no server ever calculates your map.&lt;/p&gt;

&lt;p&gt;Cubiomes is written in C by Cubitect and MIT-licensed — &lt;a href="https://github.com/Cubitect/cubiomes" rel="noopener noreferrer"&gt;github.com/Cubitect/cubiomes&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting the engine in the browser
&lt;/h2&gt;

&lt;p&gt;Browsers can't run C, so I use cubiomes as WebAssembly. I started with a ready-made npm package (seedmaps-engine-wasm), then compiled it myself with Emscripten (emsdk 3.1.64) from a pinned cubiomes commit to add Nether and End maps — the live engine is about 131 KB over the wire.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version mapping
&lt;/h2&gt;

&lt;p&gt;The version numbers changed to 26.x, but on 26.3, biome and structure placement are the same as 1.21.4. I checked real 26.3 worlds against the map, and the structures I tested were where the map put them.&lt;/p&gt;

&lt;p&gt;So the site maps 26.3, 26.2, 26.1.2, 1.21.11 and 1.21.4 to the 1.21.4 rules. Only 26.3 has been tested in-game.&lt;/p&gt;

&lt;p&gt;With the wrong version mapping, the map would show biomes and structures in the wrong places. A player could travel hundreds of blocks to a village that doesn't exist, or start a long world on a seed that isn't what they expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bedrock
&lt;/h2&gt;

&lt;p&gt;The Bedrock view shows largely the same biomes as Java. Bedrock players shouldn't trust the structure markers, though: those positions come from Java, and Bedrock places structures differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the seed lists are made
&lt;/h2&gt;

&lt;p&gt;Every seed is run through cubiomes, and I keep it only if the spawn biome and nearby structures match what the list claims. Islands are rarer, so I scanned 80,000 seeds and kept only real ones: spawn on land, with water all around it. 33 qualified, and I published 12.&lt;/p&gt;

&lt;p&gt;For the 26.3 list I scanned 20,000 seeds — 1,526 had a village within 250 blocks of spawn, and I published the 12 closest, with no more than three sharing the same centre biome. The cherry blossom list came from 30,000 seeds.&lt;/p&gt;

&lt;h2&gt;
  
  
  What /locate gets wrong
&lt;/h2&gt;

&lt;p&gt;I ran /locate in real worlds and compared it with my map. On seed 987654321, in the Nether on Java 1.21.4, /locate pointed to a fortress 735 blocks away, but the map found a closer one at just 57 blocks.&lt;/p&gt;

&lt;p&gt;In total I ran /locate 75 times across five seeds, for fortresses, bastions and End cities. In 46 of the 75 tests, /locate skipped a nearer structure; for fortresses and bastions alone, it was 25 of 50. /locate doesn't always give you the nearest structure. The map shows every fortress, so you can pick the nearest yourself.&lt;/p&gt;

&lt;p&gt;The full data is published as a CSV on the &lt;a href="https://seedmapviewer.com/locate-nearest-fortress-test/" rel="noopener noreferrer"&gt;study page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Separately, I checked 24 stronghold positions in-game, and all 24 matched. The slime chunk finder was verified a different way — three independent implementations of the slime formula agreeing on 135,006 chunk positions, with zero mismatches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two bugs
&lt;/h2&gt;

&lt;p&gt;Bug 1: the Village Finder only checked the biome at a village's centre, so it missed a real village on seed 987654321 because its centre was forest. The village at (368, 336) was real, and a farther village was labelled nearest. Now it uses the engine's own viability check.&lt;/p&gt;

&lt;p&gt;Bug 2: the scanner missed cherry grove seeds because the biome's name didn't match the engine's label — it compared the display name 'Cherry Grove' with the engine's id 'cherry_grove', so every cherry grove came back as 'none found'. I fixed the matching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;p&gt;The map doesn't show mineshafts, dungeons or End ships. The 3D view isn't real terrain height, and Bedrock markers use Java positions. On Java, biome and structure positions match the game.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;Players build whole worlds on this map, so they shouldn't have to trust me blindly. I publish my data so anyone can check it.&lt;/p&gt;

&lt;p&gt;The site is &lt;a href="https://seedmapviewer.com/" rel="noopener noreferrer"&gt;seedmapviewer.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've worked with cubiomes or WebAssembly: how do you get exact Bedrock structure positions, and how do you keep big maps fast on mobile? I'd love to hear what worked for you.&lt;/p&gt;




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