PulseCore

Chapter 8 · Section 6

The Proto Layer

The BPT law

BPT Part 3.14, in "Proto Wells: Where Wells Will Form", defines them: "So a Proto Well is not a well. Formed in the data before the physical layer, it is the deepest place of the Data Matter, the seed of a halo (Part 3.13), and at the Physical Nova it becomes a site: where the gas will gather, where the first stars will light, and where a well will be born. It is the data's prediction of where the wells of matter will form, as the peaks of the early density field are where halos collapse in standard cosmology." They live between the Data Nova and the Physical Nova, in the data layer of Part 3.6, and they form as collapses do: the data's overflow past the skin, (n + 1)² − χ_∂, collapsing at the densest places. BPT Part 3.13 adds that a Proto Well can fail, by the Dimensional Failure Law P⦰ = 2^(−D); a failed one "never reaches the physical layer" and its data "goes home along the Data Loop before the Physical Nova". After the Physical Nova a site "pulls and gathers its galaxy but is no well: it is not counted, drawn, ranked or shining". Where they stand is Chapter 3's: the densest places of the universe's own data (app.js densePlaces).

The established physics

None: a game method. The one exact piece is the perspective projection of a size in the scene onto the screen: a length ℓ at depth z under a vertical field of view θ is ℓ·h/(2·tan(θ/2)·z) pixels on a view h pixels tall.

The game's math

setProtoLayer(protos) scene3d.js:1619 draws every Proto Well as one point of one shared layer, three draw calls for any number (since 2026-10-29). For each well (scene3d.js:1638–1641):

lm    = min(10, log₂(1 + mass))
s₀    = max(0.006 + 0.0025·lm,  horizon·cellW)        (the mark, as in Part 8.5)
ring  = s₀ · PROTO_K,   PROTO_K = 3.4 if the canvas is under 700 px wide, else 2.2
glow  = 0.05 + 0.006·lm
phase = frac(0.618 · the digits of its id)

The vertex shader breathes the glow, k = ½ + ½·sin(2π·(0.8·t + phase)), g = glow·(0.8 + 0.4·k), and sizes the point to hold both:

half = max(2.2·ring, 0.5·g)
gl_PointSize = max(3, 2·half·uProj / −z),   uProj = h / (2·tan(fov/2))      (pulseProtoWells(), scene3d.js:1659)

The fragment shader draws, at d = twice the distance from the point's center over its size: a violet core out to the ring's radius (vR = ring/half), a magenta ring at 1.9 core radii, width max(0.06, 0.18·vR), and a white-to-magenta glow falling as (1 − d/vG)², vG = ½g/half. A fragment under alpha 0.01 is discarded. The "Show the wells' rings" setting zeroes the ring (uRing).

The buffer holds protoCap = max(64, ceil(1.3·n)) points and is reallocated whenever n exceeds it, so every Proto Well has its point. placeProtos(frac) scene3d.js:1650 puts each at its surface point, frac of the way along its step's motion; moveWells() keeps their places as they ride the lattice. pickWell() finds them by their place on the screen (Part 8.10).

In the game

From the Data Nova the Proto Wells appear on the skin as violet points, each in a magenta ring with a soft white-to-magenta glow, breathing at about 0.8 times a second, each a little out of step with the rest. They stand where the data is densest, along the lattice's lines and at its nodes, and they ride with the lattice as it turns, so the player sees the data's own forecast of where the wells of matter will form. On a phone they are drawn larger (3.4 times the mark, against 2.2) so they read on a small screen. The wells' readout is labeled "Proto Wells" while they stand (app.js:2141); "Show the wells' rings" hides their rings, and "Well labels" names each <id> data well · …. A tap on one selects it as a tap on a well does.

At the Physical Nova the Proto layer empties. Each Proto Well that did not fail becomes a site (promoteDataWells() app.js:1378), and a site is not drawn: what the player sees instead is the gas gathering there and, later, a well being born at it. The "Wells:" readout then counts the sites still waiting, · … sites waiting (app.js:2141).

The scale model

Every Proto Well the game holds is drawn, one point each. Each stands for wellMult of the level's Proto Wells (Chapter 3; Chapter 9 says how that ratio is set). The ring and glow are pictures, two to three times a physical well's mark so a Proto Well reads across the torus.

Where the game and the theory differ

  • The proto branches left inside setWells() (the wire sphere, protoGlow, PROTO_K at scene3d.js:1514) no longer run, since setWells() hands every data well to this layer first (scene3d.js:1480).

Fixed numbers

Number Where What it is Kind
64, 1.3 setProtoLayer() scene3d.js:1624 buffer floor and headroom; reallocated as needed METHOD (allocation, not a limit)
3.4, 2.2, 700 px scene3d.js:1637 Proto Well size, phone and desktop DISPLAY
0.006, 0.0025, 10, 0.05, 0.006 scene3d.js:1639–1640 mark and glow by mass DISPLAY
0.618 scene3d.js:1640 phase spread (golden ratio) DISPLAY
0.8 Hz, 0.8, 0.4 scene3d.js:1630 breathing DISPLAY
2.2, 0.5, 3 px scene3d.js:1630 point size holds ring and glow, at least 3 px DISPLAY
600 (uProj start) scene3d.js:1629 replaced each frame by h/(2·tan(fov/2)) METHOD (exact projection)
1.9 scene3d.js:1631 ring at 1.9 core radii (matches the well ring, Part 8.5) DISPLAY
0.06, 0.18, 0.35, 0.8, 0.9, colors, 0.01 scene3d.js:1631 ring width, core, glow, discard DISPLAY
1001 scene3d.js:1634 render order DISPLAY