<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n" -->

---
title: Building a Procedural Hex Map with Wave Function Collapse
description: A deep dive into building a procedural medieval island map generator using Wave Function Collapse (WFC) on a hex grid with ~4,100 tiles. The post covers the...
canonical: https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building a Procedural Hex Map with Wave Function Collapse | daily.dev
og:description: A deep dive into building a procedural medieval island map generator using Wave Function Collapse (WFC) on a hex grid with ~4,100 tiles. The post covers the...
og:url: https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n
og:image: https://api.daily.dev/og/posts/0Wz2fQK8n.png
og:image:alt: Building a Procedural Hex Map with Wave Function Collapse
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a Procedural Hex Map with Wave Function Collapse

**[Hacker News](https://daily.dev/sources/hn)** · 13 min read · 1 upvotes · 0 comments

## Summary

A deep dive into building a procedural medieval island map generator using Wave Function Collapse (WFC) on a hex grid with ~4,100 tiles. The post covers the WFC algorithm adapted for 6-edge hex tiles with 30 tile types, 5 elevation levels, and a modular multi-grid approach to handle large-scale generation. Key engineering challenges include a layered backtracking and recovery system for cross-grid constraint failures, cube coordinate math for hex geometry, and combining WFC with Perlin noise for organic tree/building placement. The renderer uses Three.js WebGPU with TSL shaders, BatchedMesh for single-draw-call rendering, GTAO ambient occlusion, depth-of-field post-processing, and a custom coastal wave shader with a CPU-side cove detection hack.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://felixturner.github.io/hex-map-wfc/article/>

## Similar posts on daily.dev

- [Introduction to Wave Function Collapse](https://daily.dev/posts/introduction-to-wave-function-collapse-7idfbkozu) · Atomic Spin · 1 upvotes · 0 comments
- [Building an Interactive Wave Propagation Cube Grid with Three.js](https://daily.dev/posts/building-an-interactive-wave-propagation-cube-grid-with-three-js-bqgdu2m10) · Codrops · 1 upvotes · 0 comments
- [Dev Blog\#20 — Creating Fog Of War On Hex Overworld In Godot](https://daily.dev/posts/dev-blog-20-creating-fog-of-war-on-hex-overworld-in-godot-uvb1ejaa8) · Medium · 2 upvotes · 0 comments
- [Water Simulation Made for Low-Poly Game World](https://daily.dev/posts/water-simulation-made-for-low-poly-game-world-0ifof6cky) · 80 LEVEL · 6 upvotes · 2 comments

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#threejs](https://daily.dev/tags/threejs), [#webgpu](https://daily.dev/tags/webgpu)

[View this post on daily.dev](https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building a Procedural Hex Map with Wave Function Collapse","url":"https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n"},"datePublished":"2026-03-09T18:25:34.999Z","dateModified":"2026-04-02T02:16:40.295Z","description":"A deep dive into building a procedural medieval island map generator using Wave Function Collapse (WFC) on a hex grid with ~4,100 tiles. The post covers the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/75737227ca6730d938f310450d07aaaa?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/75737227ca6730d938f310450d07aaaa?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-a-procedural-hex-map-with-wave-function-collapse-0wz2fqk8n","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"game-development,threejs,webgpu","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Building a Procedural Hex Map with Wave Function Collapse"}]}
```

