A loaded world starts around the player first, the rest a few areas a tick (t21)
- Areas within 150 grains of the bot start at once; the others 12 a tick, nearest first, and any the bot flies toward start straight away. A Huge world is fully started after 17 s. - Huge world, first 600 ticks: average 15.2 -> 5.5 ms/tick, worst 79.7 -> 16.2. - New test/t_load.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -358,6 +358,12 @@ above, including:
|
||||
still sleep. Through burning fuel sinking stays at the old slow pace: furnace beds are tuned to
|
||||
it, and dirt heaped on a burning pile must smother it into charcoal rather than sink through.
|
||||
|
||||
- **A loaded world starts around the player first (t21, 2026-10-25).** Loading used to start every
|
||||
area of the world at once, and a Huge world then took 15 ms a tick for its first 10 seconds,
|
||||
with ticks up to 80 ms. Now the areas within 150 grains of the bot start at once, the rest 12 a
|
||||
tick, nearest first (a Huge world is fully started after 17 s), and flying toward areas still
|
||||
waiting starts them. Nothing is skipped: the same settling happens, spread out.
|
||||
|
||||
## Ideas not built yet
|
||||
|
||||
- **Concrete**, as a stronger wall material from rubble.
|
||||
|
||||
+6
-5
@@ -220,10 +220,10 @@ Starter furnace designs and the milestone list shown in the notebook.
|
||||
- functions: smelterBlueprint
|
||||
- variables: STARTER_DESIGNS, MILESTONES
|
||||
|
||||
### src/sim/world.js (102 lines)
|
||||
### src/sim/world.js (104 lines)
|
||||
World state: the per-cell typed arrays, alloc(), ambient temperature by depth, waking.
|
||||
- functions: emit, bagCap, discover, alloc, depthU, depthY, meanSurface, computeAmbient, fillNoise, wakeXY, wakeHeatXY, wakeIdx, wakeHeatIdx
|
||||
- variables: W, H, N, CW, CH, NCH, mat, temp, life, flags, stamp, part, mach, digp, noiseB, airS, netId, isPow, occ, surfY, dirtY, graniteY, basaltY, magmaY, roofY, AMB, worldSeed, surfBase, underD, shallowD, lapse, BW, BH, NB, blockP, blockV, ents, bgm, flyers, ghostBlocks, ghostMolds, awake, hot, hotLvl, powderArea, roofDirty, tick, tickStamp, machines, molds, nets, pcells, powerDirty, beltL, beltR, tubeLists, brokenMachines, ghostMachines, ghostBlocked, EV, bot, bag, bagTotal, player, seen, ledger, stats
|
||||
- variables: W, H, N, CW, CH, NCH, mat, temp, life, flags, stamp, part, mach, digp, noiseB, airS, netId, isPow, occ, surfY, dirtY, graniteY, basaltY, magmaY, roofY, AMB, worldSeed, surfBase, underD, shallowD, lapse, BW, BH, NB, blockP, blockV, ents, bgm, flyers, ghostBlocks, ghostMolds, awake, hot, hotLvl, powderArea, roofDirty, loadWakeOrder, loadWakePending, loadWakeIndex, tick, tickStamp, machines, molds, nets, pcells, powerDirty, beltL, beltR, tubeLists, brokenMachines, ghostMachines, ghostBlocked, EV, bot, bag, bagTotal, player, seen, ledger, stats
|
||||
|
||||
### src/sim/fog.js (52 lines)
|
||||
Exploration only: never changes grains or the random stream.
|
||||
@@ -329,7 +329,7 @@ Weather: clouds from steam, rain and snow, and the world water count.
|
||||
- functions: wrnd, resetWeather, rainGap, worldWater, absorbSteam, spawnRain, rainAt, weatherTick
|
||||
- variables: WBAND, WS, weather
|
||||
|
||||
### src/sim/tick.js (27 lines)
|
||||
### src/sim/tick.js (28 lines)
|
||||
simTick: one simulation step, in order.
|
||||
- functions: simTick
|
||||
|
||||
@@ -342,9 +342,9 @@ World generation helpers: noise and removal of tiny hard rock specks.
|
||||
World generation: staged terrain, ore, caves and placement, with synchronous and async entry points.
|
||||
- functions: generateWorld, generateWorldAsync
|
||||
|
||||
### src/sim/save.js (141 lines)
|
||||
### src/sim/save.js (177 lines)
|
||||
Saving and loading a world (serializeWorld / deserializeWorld) and old-save migration.
|
||||
- functions: serializeWorld, deserializeWorld
|
||||
- functions: serializeWorld, deserializeWorld, startLoadWake, wakeLoadArea, wakeLoadNearBot, loadWakeTick
|
||||
- variables: SAVE_VERSION, TOFF
|
||||
|
||||
### src/render/setup.js (200 lines)
|
||||
@@ -509,6 +509,7 @@ The frame loop and boot.
|
||||
- `test/t_econ.js`: Economy: the dock (instant sale), orders, prices, the market dip, money for machines, alloys.
|
||||
- `test/t_fog.js`: Fog: surface, sight, range, saves and simulation independence.
|
||||
- `test/t_furnace_repeat.js`: The starter furnaces keep working when fired again and again without cleaning, however the charge goes in: mixed, ore first with coal on top, or blown in through the vent. Each case plays furnace_play.js, which builds the design and fires it like a player.
|
||||
- `test/t_load.js`: Reload wakes nearby areas first, without losing distant water, fire or saved state.
|
||||
- `test/t_molds.js`: Molds and furnaces stay usable: ingots drop below and keep their stubs, plugs over molds are cleared, spoiled castings can be knocked out, grains never drop through a grate by teleporting, and slag lets the fire breathe.
|
||||
- `test/t_physics.js`: Sand and other powders, molten metal and gases: heaps, sorting, sinking, setting, rising and fading. Water has its own suite (t_water.js). Tall worlds keep geothermal heat out of the way.
|
||||
- `test/t_pipes.js`: Pipes, pumps and outlets move liquids; the Grinder grinds waste rock for trace ore.
|
||||
|
||||
@@ -4,6 +4,18 @@ What agents have done, newest first. Add an entry for every piece of work: the d
|
||||
note or request it was for, what changed, the files touched, the tests run, and anything left
|
||||
open or not verified. Keep each entry short; the git history has the details.
|
||||
|
||||
## 2026-10-25: t21: a loaded world starts around the player first (Claude Code, Codex)
|
||||
|
||||
- Owner: "lets speed up the first load speed. load in areas around the player first".
|
||||
- `src/sim/save.js`: `deserializeWorld` no longer wakes every area; `startLoadWake()` keeps the
|
||||
load-time heat scan's result per area, wakes those within 150 grains of the bot, and queues the
|
||||
rest by distance; `loadWakeTick()` (from `simTick`) wakes 12 a tick and, every 8 ticks, any still
|
||||
waiting within 150 grains of the bot. The queue is not saved.
|
||||
- Huge world, ms/tick before -> after: ticks 0-600 average 15.2 -> 5.5, max 79.7 -> 16.2, 95th
|
||||
percentile 21.0 -> 11.0; ticks 600-1800 average 7.3 -> 10.0 (the same work, later). Every area
|
||||
has started by tick 1024 (17 s).
|
||||
- `test/t_load.js` (19 checks). `run_all.py --browser` ALL PASSED.
|
||||
|
||||
## 2026-10-24: t21 phase 4: duplicates merged, largest files split (Claude Code, Codex)
|
||||
|
||||
- Merged seven real duplicates: wall refunds (`removeWallCell`, walls and molds), tube edges and
|
||||
|
||||
Reference in New Issue
Block a user