The Endless
An endless 3D dungeon in the browser. Exploring Wave Function Collapse, and the extra constraints that let different players discover the same world.
Notes
A door. A stair. A little further.
The Endless is a first-person place to get lost in: narrow corridors, stone arches, rooms that span several cells, stairs and ladders leading above and below. No finish line. The point is to keep wondering what is around the next corner.
Go explore · Try the discovery-driven mode · Open a specific world


“Finally! The control I always wanted when watching the 3D Maze screensaver on Win 95!”
blobdole on Hacker News · October 1, 2026
Building a world as you discover it
The first mode uses a Wave Function Collapse-inspired constraint solver. Each cell has possible connections: walls, passages, stairs, ladders. Existing neighbors rule out incompatible choices, and the generator picks from what remains, with weights that favor particular kinds of spaces.
The rules have to account for volume, too. A staircase reserves the cells it passes through. A tall room needs empty space above it. Corridors should sometimes bend or branch, and a larger room can emerge from several connected cells. Small Blender-authored pieces become architecture through their arrangement.
This makes exploration feel organic, but it creates an interesting problem: the route changes the result. A room generated early imposes constraints on rooms generated later. Two people can start with the same random seed and still get different layouts if they take different turns.
Making the same world repeatable
The stable mode keeps the constraint-based approach, but solves bounded zones of 16 × 16 × 16 cells before showing them.
Neighboring zones first agree on their shared face. A hash of the world seed and that face's coordinates determines whether it is closed or open, where the connections sit, and which kind of opening they use. Both zones derive the same answer independently.
Inside each zone, those boundary connections and reserved vertical passages are fixed first. Cells near mandatory openings receive higher priority; the remaining cells follow priorities derived from the seed and their coordinates. The entire zone is then solved in a deterministic order, with connectivity repairs completed before it becomes visible.
The next zone is prepared in a browser worker as the player approaches it. Walking north first or south first changes which zone is loaded first, but no longer changes its structure. There is no need to generate the whole world, or store a shared map on a server.
That is the part I find most interesting: choosing constraints that preserve the freedom to generate surprising spaces while making those spaces reproducible. A seed supplies repeatable randomness; shared boundaries and a fixed solve order make it a repeatable place. This holds for the same generator version and rules, so changing those rules can change the layout.
A place you can send someone
Stable worlds have an ID in their URL. The link also remembers the current tile and view direction, so it can bring someone to a particular location rather than just the entrance. Sharing a place does not require a multiplayer server.
The experience runs entirely in the browser with Three.js and Web Workers, served as static files on Cloudflare Pages. Geometry and materials are shared between instances. A handheld torch, quiet footsteps, room-dependent reverb and a 3D map give the exploration some texture. Keyboard and mouse or mobile touch controls both work.
There is still plenty to tune: the rhythm of corridors and rooms, how often a staircase interrupts a route, and how much variety a small modular asset kit can produce. The castle is the first setting; the longer-term idea is to try other environments with their own pieces and generation rules.