Progress bar and steps while generating, loading, opening claims and travelling; saving chip (t30)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -252,6 +252,13 @@ above, including:
|
||||
career and come along; buildings stay on their claim and wait (they don't run) until you
|
||||
travel back from the notebook's Claims page.
|
||||
|
||||
- **Long waits show what's happening (t30, 2026-10-24).** Generating, loading, opening a claim
|
||||
and travelling show the loading overlay with a title, a moving bar and the current step
|
||||
("Laying rock and ore", "Unpacking", "Building the world"...). Generation runs as steps that
|
||||
give the browser a frame every 30 ms, producing exactly the same world as before. A small
|
||||
"Saving…" chip shows bottom right only when a save takes longer than 150 ms. The owner found big
|
||||
worlds froze on a 0% bar with no sign of progress.
|
||||
|
||||
- **Clay bricks come from a Brick press (t28, 2026-10-24).** A hopper block like the Saw: every
|
||||
8 clay lumps on top become a Green brick below, and a Green brick fires into a Brick above about
|
||||
900°C (any fire). 2 Bricks build a brick wall block; builders order them. The owner found it odd
|
||||
|
||||
+8
-8
@@ -324,9 +324,9 @@ Weather: clouds from steam, rain and snow, and the world water count.
|
||||
simTick: one simulation step, in order.
|
||||
- functions: simTick
|
||||
|
||||
### src/sim/worldgen.js (326 lines)
|
||||
### src/sim/worldgen.js (344 lines)
|
||||
World generation: noise, layers, ores, caves, water, trees, and clearing tiny hard specks.
|
||||
- functions: makeNoise, fbm, clearHardSpecks, generateWorld
|
||||
- functions: makeNoise, fbm, clearHardSpecks, generateWorld, generateWorldAsync
|
||||
- variables: SPECK_MIN
|
||||
|
||||
### src/sim/save.js (126 lines)
|
||||
@@ -376,19 +376,19 @@ The title screen art.
|
||||
- functions: buildTitleCells, drawTitle
|
||||
- variables: FONT5, TITLE
|
||||
|
||||
### src/ui/saves.js (212 lines)
|
||||
### src/ui/saves.js (224 lines)
|
||||
Saves in IndexedDB, world files (export / import) and the blueprint library.
|
||||
- functions: newWorldId, worldWrite, listWorlds, putWorldEntry, worldNewest, deleteWorld, cleanWorldName, renameWorld, migrateWorlds, saveWorld, newestSave, b64FromBytes, bytesFromB64, gz, packBuffers, unpackBuffers, exportWorld, importWorldFile, libLoad, libSave, bpEncode, bpValid, bpDecode
|
||||
- variables: DB, worldIdTime, worldIdCounter, worldWrites
|
||||
- variables: DB, worldIdTime, worldIdCounter, worldWrites, savingCount
|
||||
|
||||
### src/ui/claims.js (141 lines)
|
||||
### src/ui/claims.js (145 lines)
|
||||
Shared player state; the world save remains a complete standalone fallback.
|
||||
- functions: careerState, validCareer, applyCareerState, loadCareer, claimName, openNewClaim, travel, renderClaimsTab
|
||||
- variables: career, claimBusy
|
||||
|
||||
### src/ui/session.js (133 lines)
|
||||
### src/ui/session.js (157 lines)
|
||||
Starting, loading and quitting a game; modal dialogs; the pause menu.
|
||||
- functions: showLoading, enterGame, setupNewWorld, startNewWorld, startFromSave, quitToTitle, refreshContinue, anyModal, openModal, closeModal, closeAllModals, topModal, dialog, openPause, renderWorlds
|
||||
- functions: showLoading, enterGame, setupNewWorld, startNewWorld, startFromSave, loadSavedWorld, quitToTitle, refreshContinue, anyModal, openModal, closeModal, closeAllModals, topModal, dialog, openPause, renderWorlds
|
||||
|
||||
### src/ui/settings.js (124 lines)
|
||||
The settings screen.
|
||||
@@ -442,7 +442,7 @@ Previews drawn under the cursor: build ghosts, drill aim and pulses, selections,
|
||||
Events from the simulation (emit) turned into sounds, toasts and cards.
|
||||
- functions: drainEvents
|
||||
|
||||
### src/ui/loop.js (126 lines)
|
||||
### src/ui/loop.js (127 lines)
|
||||
The frame loop and boot.
|
||||
- functions: scanVisible, frame, boot
|
||||
- variables: lastT, acc, lastRender, frameMs, simMs, fpsSm, ambientT
|
||||
|
||||
@@ -4,6 +4,19 @@ 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-24: t30: progress while generating, loading and saving (Claude Code, Codex)
|
||||
|
||||
- `worldgen.js`: `worldSteps` generator yields `[fraction, label]`; `generateWorld` (sync, tests)
|
||||
and `generateWorldAsync` (yields every 30 ms) run it. Small and Medium mat/temp/flags hashes
|
||||
match the old generator exactly.
|
||||
- `session.js` `showLoading(on, p, label, title)` with `#loadstep`; `GAME.loading` stops the
|
||||
frame loop's sim and drawing while worlds swap. `loadSavedWorld` for Continue and the world
|
||||
list; `worldNewest`/`unpackBuffers`/`startFromSave` report progress; travel and new claims too.
|
||||
`#saving` chip after 150 ms of saving.
|
||||
- Tests: t_world progress labels and identical worlds; play.py overlay, responsiveness during
|
||||
async generation, Continue labels, saving chip. All pass except t_smooth half-resolution
|
||||
(fails under load, as before). Screenshots `shots/t30-loading.png`, `shots/t30-saving.png`.
|
||||
|
||||
## 2026-10-24: t3 follow-up: claim names; t30 added (Claude Code, Codex)
|
||||
|
||||
- New claims get a camp name from their seed ("Cinder Gulch"; `claimName` in `src/ui/claims.js`,
|
||||
|
||||
Reference in New Issue
Block a user