endlessStairs
Endless Stairs** builds an infinitely long, seeded staircase that streams in chunks around whatever is falling down it (a ragdoll, a ball, a runner, a camera) and recycles what is left behind, so a run of many kilometres keeps the same memory, entity count and frame time. Every f…
endlessStairs: an infinite streamed staircase with ten themed areas
Endless Stairs builds an infinitely long, seeded staircase that streams in chunks around whatever is falling down it (a ragdoll, a ball, a runner, a camera) and recycles what is left behind, so a run of many kilometres keeps the same memory, entity count and frame time. Every few hundred metres the course passes through an archway into a new themed area with its own stair materials, props, lighting, sky, fog, ambience and music. It is made for endless-falling / endless-runner games (it powers Tumblestep: The Endless Stair) and for anyone who needs an endless course.
Art direction is a "storybook toy diorama": chunky, softly bevelled shapes, saturated palettes, warm key light and cool fill, stairs in calm mid values with a bright readable nosing on every step edge.
What changed in 1.2.2
- Solid guards that a fast limb cannot cross. In Tumblestep, ragdolls at 19-23 m/s left the 1.2.1 course BELOW its 4.2 m guard and past its outer face, mostly on
zigzagS-bends. The guard was one exactMeshCollidershell, and a small fast capsule (a forearm or shin, no CCD) that crosses the shell within one 60 Hz step ends up inside it, where nothing pushes it back, and leaves through the far face. New optionguardShape = "boxes"(the default withtumbling) builds each guard run from solid orientedBoxColliders instead. Each box is at most 1.5 m long and 1 m thick, overlapping its neighbours by at least 0.4 m measured along the guard face (so the outside of a tight bend, where the face runs on a longer arc than the centre line, gets more boxes), with its inner face flush with the visible wall's inner face (set back on the inside of a bend so no box end reaches into the walkway), from 1.2 m below the rail line to the guard height. At every chunk join a run starts half a box befored0and ends half a box afterd1, so the two chunks' boxes overlap by 1.5 m.guardShape = "mesh"keeps the 1.2.1 slab (one collider per chunk) for games that do not throw bodies around. - Taller. The
tumblingpreset now setsguardHeight = 8,outerGuardHeight = 12and the newairGuard = 14(every guard run reaches at least this high above the highest tread within 0.35 m), because a body launched off a toy at 20+ m/s reaches 5-9 m over the treads. - Zigzag on both sides. An S-bend's outer side alternates, so
outerGuardHeightnow applies on BOTH sides of a wholezigzagchunk, from 2 m before it to 9 m past it. - Two holes a body test found. A thin capsule could slip through the 5 cm cracks between the pieces of a
brokentread, and a body that dropped into a floating-slab gap could slide out underneath the slabs or the flight after it (the pit floor was 0.3 m thick with open air around it). Broken treads now carry an invisible whole tread 4 cm under the pieces, pit floors are 1 m deep, and an invisible 1 m pan runs under the slab before each gap and the two elements after it. All of these go in the guard collider, in both guard shapes. - Still invisible and camera-transparent. Every box carries the
endlessStairsGuard(andendlessStairsChunk) attribute and has no model; the boxes live under a pooled<name>.guardsroot per chunk, moved byrebaselike the chunk. - Cost. A box is placed in the build coroutine within
budgetMs, a few per slice, and a pooled box keeps its collider and is only moved and resized when its chunk is reused (adding aBoxCollidercosts about 1 ms, moving one about 0.1 ms). With the tumbling preset and the defaultahead/behind, 9 live chunks hold about 340 boxes (course:stats().guardBoxes,.colliders). Streaming at 24 m/s in a dev build: the course'supdateaveraged 4.6 ms with boxes against 4.0 ms with the mesh guard, worst frame 24 ms (the mesh guard's worst was 109 ms in the same run). Filling the pool the first time costs about 1 ms per box, whichprewarmAsyncspreads over frames. - New:
endlessStairs.bodyTest(BodyTest.run(opts), play mode) and theendlessStairs_guardstest suite (edit mode). See the Physics section for the numbers.
What changed in 1.2.1
- Guards that hold a launched ragdoll. In Tumblestep, a ragdoll launched at about 17 m/s left the course over the outer side of
curvedturns and at the joins intobrokenandrampsteps, 0.7 to 3.5 m above the treads. There were three causes: the 1.2.0 guard was a 0.12 m sheet starting 0.8 m above the rail line, its height was measured from the rail line (up to a full riser below the tread near every nosing), and each chunk's sheet stopped exactly at the seam. Every wall run's guard is now a closed slab, collider only, from 1.2 m below the rail line toguardHeightabove the highest tread within 0.35 m, reaching from the inner face of the wall to 0.7 m past its outer face. At every chunk join and shape transition it runs 0.75 m into the neighbour, so guards overlap at the seams. - Taller outer guard on turns. New
outerGuardHeight(default 4.5 m): on the outer side of every arc (curved,zigzag, switchback and spiral turns), from 2 m before the arc to 9 m past it, the guard reaches this height. This includes the first metres of the next chunk, because a body leaves a turn on the tangent. - Tumbling preset.
tumbling = truenow also setsguardHeight = 4.2andouterGuardHeight = 5.0. As before, values you pass yourself win. - Measured (kfix, edit mode, raycasts against the built colliders). Rays were cast outward from the centre line at 0.3, 1, 2, 3 and 4 m above the treads where they cross the course edge, straight out and 35 degrees forward and back (to cross the seams), every 0.5 m on both sides, over 3 seeds x 1.2 km with the tumbling preset (every shape the preset uses, gates, every chunk join). See the Physics section for the numbers.
What changed in 1.2.0
- Tumbling bodies stay on the course. Every wall run now carries an invisible guard (a collider-only sheet) up to
guardHeight(2.6 m) above the rail line, and the switchback spine carries one too, so a tumbling ragdoll is turned back onto the stairs instead of rolling over a 1 m wall. The guards are a separate collider (endlessStairsGuardattribute) that is never drawn, so the camera still sees over the low walls. Floating-slab gaps keep their catch floors. - Tumbling-friendly geometry, opt in.
slope(degrees) scales every drop so a standard flight has that pitch (36 keeps a ragdoll tumbling),landingPitchtilts landings downhill,roundNosings/nosingRadiusround every step edge (in the collider too),stepFillputs invisible wedges in the step corners andtreadFrictionmakes the treads slippery without changing the surface name a game plays sounds from;tumbling = trueturns them all on as a preset. - Camera corridor. A box above and behind the stair centre line (
cameraClearance, 6 m wide, 6 m high by default) is kept clear: wall-top lamps, candy canes, light poles and set-pieces that would reach into it are left out or stood further out, floating candles and hanging chains go above it, and the visible wall is capped atcameraClearance.rail(1.05 m). SetcameraClearance = falsefor the 1.1 dressing. - See the character through anything.
course:occluders(cameraPos, characterPos)lists what stands in between (prop, set-piece, wall or gate, with its entity and box), andcourse:setCameraFade(cameraPos, characterPos)dithers away exactly the pixels of stairs, walls and props inside the camera-to-character capsule in the stair shader (no CPU cost). - Clean stone. The swirly contour lines on the rooftop stone are gone: UVs were wrapped per vertex at 512 m, so every tread straddling x = 0 squeezed hundreds of metres of pattern into one triangle. The UV origin is now wrapped once per mesh, and every pattern in
stairSurfaceis filtered by its pixel footprint (joints widen and fine noise fades before it can alias into moire). - Sky dome winding. The inward sky sphere was wound outward against its own normals (the engine warned "winds 1840 of its 1920 triangles away from the normals" on every rebuild). Every runtime mesh the kit builds now winds with its normals (checked: 0 of 56,568 triangles over 18 chunk meshes, plus the dome).
- New:
Course.VERSION, theset-up-endless-stairsworkflow (install, place, configure, verify), a sixth entity per chunk (the guard).
What changed in 1.1 (1.1.0, and 1.1.1 adding the stairSurface preview image)
- Colliders fixed. On a recycled chunk the stairs collider kept the previous chunk's shape, so bodies fell through most of the course after the first few chunks. Colliders are now rebuilt for every chunk; 0 of 108 thin CCD capsules fired at 30-60 m/s (also on chunk seams) tunnelled.
- Streaming keeps up with fast falls. Build-ahead, the forced range and the per-frame budget scale with the focus speed (0 misses at 60 m/s). New
course:prewarmAsync(pos, onDone)andcourse:isReady()for a hitch-free restart. - New look for every theme. Retuned key/fill light, saturated skies with depth on the kit's own sky dome, fog only as distance haze and abyss colour, darker walls, mid-value treads, bright nosings; procedural surface detail with bump (wood, stone, carpet, candy glaze, ice, metal, neon glass, cloud-stone, mossy stone) from the new
stairSurfaceshader. - Post you can turn down. Per-theme bloom + one-pass colour grade and vignette (
stairGrade), no motion blur or DOF, fixed exposure;Themes.setPost({...})for a graphics setting. - API to know:
Themes.fogScale/sunScale/ambientScalenow default to 1 (1.0.0's 0.35 / 1.25 / 0.5 are baked into the themes; a game that set them to the old defaults should remove those lines).Themes.useKitSky = falsekeeps a game's own sky. The sky dome is 700 m out (Themes.skyRadius): a camera far plane under ~750 m should lower it.
Quick start
local Course = require("endlessStairs.course")
local Themes = require("endlessStairs.themes")
local course = Course.new({ seed = 42 }) -- deterministic: same seed, same course
local start = course:startFrame() -- {pos, yaw, forward} on the top landing
course:on("areaEnter", function(a)
Themes.playAudio(a.theme) -- music + ambience for this peer
end)
-- every frame:
course:update(character.position) -- streams ahead/behind, blends lighting
StairsDemo (component) is a complete example: put it on a camera entity and
press play.
API: endlessStairs.course
Course.new(opts): opts:
| field | default | meaning |
|---|---|---|
seed | 1 | the course; same seed = same course on every peer |
origin | {0,0,0} | world position of the top step |
yaw | 0 | overall heading (0 runs toward -Z) |
areaLength | 300 | metres of course per themed area |
themes | all ten | list of theme ids in course order (repeats cyclically) |
shapeWeights | built in | { shape = weight }, 0 disables a shape |
width | 4.4 | standard walking width in metres |
ahead / behind | 80 / 40 | metres kept built in front / behind the focus |
synced | false | entities are always local; see Multiplayer |
decorate | nil | fn(chunk) called for every spawned chunk |
applyLighting | true | blend the scene's sun/sky/fog to each area on entry |
props | true | build the theme dressing |
budgetMs | 3 | Luau build time per frame |
catchUpMs | 8 | build time per frame while chunks within ~1.5 s of travel are still missing |
autoRebase | nil | metres from the origin past which the world shifts back |
rise / run | 0.27 / 0.56 | standard step rise and tread depth |
slope | nil | degrees: scale every drop so a standard flight has this pitch (e.g. 32-40 for a ragdoll that keeps tumbling) |
landingPitch | 0 | degrees landings fall over their length (8 keeps a tumble going across them) |
roundNosings | false | round every step edge (radius 0.09 m, in the mesh and the collider) |
nosingRadius | nil | the step-edge radius in metres (overrides roundNosings; the default edge is a 0.035 m chamfer) |
treadFriction | nil | friction of the treads (the theme surface's other values and its name are kept) |
stepFill | 0 | 0..0.9: an invisible collider wedge in the inner corner under every nosing (this share of the riser and of the tread below), so limbs cannot lock into the corners |
tumbling | false | the preset for a ragdoll that falls down the stairs: slope = 36, landingPitch = 12, roundNosings, stepFill = 0.6, treadFriction = 0.25, guardHeight = 8, outerGuardHeight = 12, airGuard = 14, guardShape = "boxes", and no switchback, narrow or spiral flights (U-turn landings stop a passive tumble, a body jams across the narrow flight, the spiral's inner wedge ends are cliffs against its column); every value you pass yourself wins |
Tumbling set-up used for Tumblestep-style games: Course.new({ seed = s, tumbling = true }).
Tumble test (1.2.0): an 11-segment, 70 kg jointed ragdoll (box torso, capsule limbs, ball joints) dropped and pushed down the course, side by side on several courses, about 1.6 km in total over every shape and the first four themes. Falls off the course (nothing of the course under it for 0.6 s while outside the walls or far below the stairs): 0. With the tumbling preset the doll kept moving on its own for most of the course (one kick every ~4.6 m on seed 23, 348 m, versus one every ~1.6 m on the default geometry); a passive doll still comes to rest on long landings and gate landings, so a game should keep nudging its tumbler down the course.
| guards / guardHeight | true / 2.6 | invisible guard colliders on every wall run (and the switchback spine), this many metres above the highest nearby tread; tumbling sets 8 |
| guardShape | "mesh" ("boxes" with tumbling) | "boxes": each guard run is solid oriented BoxColliders (at most 1.5 m long, 1 m thick, overlapping by at least 0.4 m along the guard face, inner face flush with the visible wall, from 1.2 m below the rail line), which a small fast body cannot cross within one step; "mesh": one exact MeshCollider slab per chunk (the 1.2.1 guard, one collider per chunk) |
| airGuard | nil | every guard run reaches at least this many metres above the highest tread within 0.35 m; tumbling sets 14 |
| outerGuardHeight | 4.5 | guard height on the outer side of every turn, from 2 m before the arc to 9 m past it (into the next chunk too), and on BOTH sides of a whole zigzag chunk (an S-bend's outer side alternates), from 2 m before it to 9 m past it; never below guardHeight; tumbling sets 12 |
| cameraClearance | {width = 6, height = 6, rail = 1.05, floor = 0.35} | the corridor over the centre line kept clear of dressing: width across, up to height above the rail line, starting floor above the visible wall, which is capped at rail; false turns it off |
Methods:
course:update(focusPos): call every frame. Streams chunks (spread over frames), recycles old ones, fires events, blends lighting.course:prewarm(focusPos): build everything in range now, in one frame (a few hundred ms: use it behind a loading screen).course:prewarmAsync(focusPos, onDone?, {budgetMs = 8, maxFrames = 600})→ cancel fn: build everything in range over the next frames, then callonDone(course). Use it for a restart ("Again") so the game never hitches; keep callingupdatemeanwhile.course:isReady(): true once every chunk in range of the last focus is built.
Streaming follows the focus speed: the course measures how fast the focus travels along it, builds ahead + 1.5 s × speed in front, forces the chunks within 12 m + 0.5 s × speed to finish now, and raises the per-frame budget to catchUpMs whenever a chunk within ~1.5 s of travel is missing. Measured: a focus flown at 60 m/s never reached an unbuilt chunk (0 misses under the focus or 25 m ahead over 440 frames).
course:startFrame()→{pos, yaw, forward}where a character stands on the top landing.course:distanceAt(pos, hint?)→ metres along the course nearest to a world position.course:sample(dist)→{pos, forward, right, up, width, yaw, shape, theme}on the walking surface centre line.course:areaAt(dist)→{index, theme, name, d0, d1}.course:on(event, fn)→ unsubscribe function. Events:"chunkSpawned"(chunk): chunk ={index, area, theme, shape, d0, d1, root, slots};slots= list of{dist, pos, forward, right, width, kind = "step"|"landing"|"gap"|"ramp", length}, one per tread / landing / ramp / gap, where other kits place trampolines, bumpers, coins…"chunkDespawned"(chunk): remove what you placed (anything you parented underchunk.rootis removed for you)."areaEnter"({index, theme, name, d0, d1})."rebase"({delta}): the world shifted by-delta; move your own bodies and camera by-delta.
course:rebase(delta?): shift the world sodelta(default: the focus) becomes the origin.course:chunks(): live chunks in order;course:stats(): live/pooled chunks, entities, build timings (buildMsMaxis a chunk's total build time across frames,uploadMsMax,updateMsAvg/updateMsMax/slowUpdates= this course's own cost perupdate), shift.course:destroy(): removes every entity and mesh.
API: endlessStairs.themes
Themes.list()/Themes.get(id)→{id, name, description, surface, palette = {primary, secondary, accent, landing, wall, wallTop, gate, p1..p4, glowA, glowB, liquid, bg}, lighting = {sunColor, sunIntensity, sunDir, ambientColor, ambientIntensity, zenith, horizon, ground, stars, fogColor, fogSunColor, fogDensity, fogFalloff, bloom, exposure}, ambience = soundClip ref, music = soundClip ref}. Palette colours are sRGB.Themes.apply(id, {blend = seconds}): blends the scene's sun, ambient, sky, height fog, bloom and colour grade.Themes.setPost({enabled, strength, bloom, vignette, grade, exposure}): how much of the kit's post a game wants (wire it to a graphics setting):enabled = falseremoves bloom and grade from the chain,strength0..1 fades both,bloom/vignetteare multipliers,grade = falsekeeps bloom only,exposureis a fixed multiplier.Themes.getPost()reads it back. The kit never adds motion blur or depth of field and never adapts exposure. The grade is the kit's ownstairGradepost shader (contrast, saturation, temperature gain, shadow lift, vignette in one pass); it does not use the engine's colorGrade/color_correction shaders.Themes.useKitSky(true): draw the sky as the kit's dome: an inward sphere (Themes.skyRadius, 700 m; keep it inside your camera's far plane) whose vertex colours carry the theme's gradient, drawn unlit bystairSkyDome. The course keeps it centred on the focus (Themes.setSkyCenter(x, y, z)if you drive Themes yourself). Set it false before the firstapplyto keep your own sky;Themes.removeSky()takes the dome away. The scene's ProceduralSky colours are written either way.Themes.setFogAnchor(y): keeps the haze centred on the action (the course does this).Themes.playAudio(id, {fade, music, ambience, musicOn, ambienceOn})/Themes.stopAudio(): this peer's music + ambience crossfade.Themes.defineSurfaces(): registers the physics surfaces;Themes.fogScale,sunScale,ambientScaleare global multipliers on the tuned look (1 = as tuned; they were 0.35 / 1.25 / 0.5 in 1.0.0, whose values are now baked into the themes).
Themes (ids)
| id | look | surface |
|---|---|---|
rooftops | terracotta steps over city roofs: chimneys, water towers, laundry lines, lit windows, peach sunset | stone |
library | crimson carpet with brass nosings between bookshelves, reading lamps, globes, floating candles | carpet |
candy | glossy icing steps, mint walls, gumdrops, lollipops, candy canes, cupcakes, donuts | candy |
haunted | grey planks, pumpkin-orange edges, tombstones, jack-o'-lanterns, dead trees, ghost lights, night | wood |
ice | glassy ice steps with snow edges, crystals, icicles, pines, snowmen, peaks | ice |
neon | dark glass steps with glowing edges, neon signs and towers, light poles, synthwave night | glass |
clouds | cloud-stone with gold trims, cloud banks, hot-air balloons, rainbows, pennants | cloud |
forge | iron steps with hot edges, lava channels, anvils, cauldrons, braziers, chains, smokestacks | metal |
jungle | mossy temple steps, palms, ferns, vines, stone idols, fireflies | stone |
clockwork | walnut and brass, giant gears, clock faces, pendulums, pipes | metal |
Every theme follows the same look rules: a strong warm key sun low enough to rake the treads, a cool, fairly dark fill, a saturated sky whose zenith is much darker than its horizon, height fog that starts 22-45 m out and pools in the void below (it is the colour of the abyss, never a veil over the stairs), dark walls, mid-value treads and a bright nosing on every step. Each theme also carries its grade (lighting.vignette, contrast, saturation, gain, lift, bloom) and sky extras (clouds, cloudColor, horizonGlow, fogStart).
Surface detail: the stairs, walls and props draw with the kit's stairSurface shader: the vertex colour is the paint, and the shader cuts analytic detail on top with a bump normal (rooftops dressed stone, library velvet carpet, candy glaze with sprinkles, haunted weathered boards, ice cracks and frost, neon glass tiles with a glowing grid, cloud-stone with gold veins, forge riveted brushed plate, jungle mossy temple stone, clockwork lacquered walnut). No texture memory is used; detail is read from path-space UVs the mesh builder writes, so it runs on across chunk seams and origin rebases.
Each theme ships materials under materials/ (<id>_solid, <id>_glowA, <id>_glowB, <id>_liquid) and generated audio under audio/ (amb_<id>, music_<id>).
Stair shapes
straight, grand (twice as wide, deep treads, urns), narrow (slim, tall walls), switchback (three flights round a central spine), spiral (two turns of wedge steps round a core column), curved (one sweeping arc), zigzag (S-bends), floating (slabs with gaps over glowing catch floors), terraces (big ledges), broken (cracked, chipped, sunken pieces), rampsteps (smooth ramps mixed with flights), cascade (wide treads with a waterfall stream down the middle), plus the gate landing with an archway that opens every area. Widths ease between shapes so walls never jump; every chunk starts exactly where the last one ended.
Physics
Each chunk's treads, risers, walls, column and spine are one merged mesh of closed volumes with one exact MeshCollider whose surface is the theme's surface (and the entity carries the attribute surface). Physics.defineSurface gives each surface its friction/bounce (ice slides, clouds and candy bounce, carpet grips). Fixed in 1.1.0: on a recycled chunk the collider kept the shape of the chunk the pooled entity drew before (bodies fell straight through most chunks after the first few); the collider is now rebuilt with every new mesh, after the entity is active. Tunnelling test (1.1.0): thin capsules (radius 0.06 m, CCD on and off) fired at 30, 45 and 60 m/s into treads, landings and exactly on chunk seams: 0 of 108 passed through any built chunk (the engine sweeps fast bodies against static colliders). A new chunk's collider takes a frame or two to exist, which is why the streaming keeps the chunks ahead built early. Visible walls are 1.05 m above the rail line (capped by cameraClearance.rail); since 1.2.0 an invisible guard collider on every wall run and on the switchback spine reaches guardHeight (2.6 m) above the rail line, so a tumbling body stays on course. Guard test (1.2.1, tumbling preset, seeds 7, 23 and 42 x 1.2 km, every shape the preset uses, 161 chunk joins including curved>broken, curved>rampsteps, broken>rampsteps and rampsteps>gate): 215,165 outward rays at 0.3 to 4 m above the treads, straight out and 35 degrees forward and back, every 0.5 m on both sides, 18,480 of them within 1 m of a join: every one met a guard collider (0 misses; on 1.2.0 the same test missed 8,367 of 14,360 rays on its first 240 m). Diagonals that never leave the course footprint within 14 m (along an S-bend of zigzag) were left out as not outward. The spiralx27s inner side is closed by its core column. Floating-slab gaps are intended and have a catch floor 0.32 m below the next slab, between the walls.
Body test (1.2.2, endlessStairs.bodyTest, play mode, tumbling preset with guardShape = "boxes"): capsules of radius 0.05 m, 3 kg, CCD off, fired outward at 15, 20 and 25 m/s, straight and 30 degrees forward and back, 0.5 to 6 m above the treads, on both sides, along every curved, zigzag, broken and rampsteps chunk and across every chunk join (7 points from 1.4 m before to 1.4 m after each d0), in batches of 200 that pass through each other. Seeds 5, 7, 23 and 42 x 420 m (73 chunks, 73 joins): 20,376 bodies fired, 0 ended outside the footprint (more than 3.8 m from the centre line, or 6 m below the treads). The same test on the 1.2.1 guards (guardShape = "mesh", 4.2 / 5.0 m, seed 7, 280 m): 894 of 3,528 outside. The endlessStairs_guards suite (edit mode) checks every box's size and that points just behind the wall, every 0.25 m and 1.5 to 13.5 m up, all lie inside a box.
Performance
A chunk is 8 entities (root + stairs/collider, props, two glow meshes, liquid, invisible guard collider, and the root of its guard boxes), about 5 draw calls and 2 colliders, plus one entity and one BoxCollider per guard box with guardShape = "boxes" (about 35-70 per chunk, 1.2.2). 5-8 chunks are live at a time (about 42-56 entities without boxes). Building runs as a coroutine inside a per-frame budget (budgetMs, default 3 ms) with the GPU upload split across frames; entity sets are pooled and meshes are freed when replaced. Measured on desktop (1.0.0): about 60 fps steady with 5.7 ms engine CPU per frame. 1.1.0 adds one post pass (grade), one sky-dome draw (~2k triangles) and the procedural detail in the stair shader; the course's own update averaged 0.5-3 ms while streaming at 25 m/s in a dev build; the physics step averaged 1.35 ms with spikes up to ~11 ms on the frames a new chunk's exact collider is built. An endurance run of 1.75 km at 25 m/s through six areas with two rebases held at 5-7 live chunks and 42-48 course entities.
Multiplayer
All course entities are local and temporary (unsynced), so every peer streams its own course around its own character without touching anyone else's game. Because the layout is a pure function of the seed, two peers with the same seed see the same staircase. synced = true is not supported (runtime GPU meshes do not replicate); share the seed instead.
Large coordinates
The course descends forever (≈ 0.4 m per metre of course), so positions grow. Call course:rebase() or set autoRebase (e.g. 1500 m): the course shifts every live chunk and fires "rebase" with the delta so your bodies and camera move with it. Course distance (dist) is unaffected and stays exact in double precision.
Guides
how-to-make-an-endless-runner-track-that-streams-forever: how the streaming works and how to use it.example-make-an-endless-falling-stairs-game: a small game built on it, step by step.
Scoped to this part · feeds back into the world's score.