Loom (Alpha) #1 of 4: skeleton + theme + Project Manager launcher#292
Conversation
First of a multi-PR rebuild of the "Loom" GUE redesign as a parallel
alpha editor. The previous attempt retrofitted Loom concepts on top of
GUE's F-UI surface; F-UI's quirks (window M_HIDE no-ops, listbox /
combobox handle inversion, Tab M_SETINDEX nested-iterator pathology,
unyielding visual language) made that path a losing game. This rebuild
runs as its own .bb / .exe so the UI shell can be designed from scratch
without fighting F-UI on a surface it wasn't designed for.
This PR is architectural proof only -- it ships the smallest possible
slice that demonstrates the build pipeline and the Project Manager
hook. The atlas, world view, and composer surfaces arrive in PRs 2-4.
What's in:
- src/Loom.bb -- entry point. Boots Blitz3D, opens a window, runs
a splash loop until Esc. Mirrors GUE.bb's bootstrap so paths and
log placement match (writes to Data/Logs/Loom Log.txt next to
GUE's log).
- src/Modules/Loom/Theme.bb -- color tokens from the Loom design
palette (stone / arcane / brass / parchment) plus 2D drawing
helpers (LoomFill, LoomGradientV, LoomHRule, LoomText...) wrapping
Blitz3D primitives. Subsequent surfaces paint through this layer
instead of F-UI so they can express the gradient-heavy aesthetic.
- src/Project Manager.bb -- adds an "Open in Loom (Alpha)" button
next to the existing "Game Unified Editor" button in the Editors
group. Auto-disables when bin/Loom.exe is missing. Launches with
the same CWD as the GUE button so projects load identically.
- compile.bat / compile.sh -- new build target for bin/Loom.exe
placed alongside the existing GUE.exe / Server.exe / Client.exe
invocations.
What's deliberately NOT in (deferred to PR 2+):
- Data loading. The skeleton does not Include Items.bb / Actors.bb /
Spells.bb yet; PR 2 wires those up so Loom reads the same in-memory
representation GUE does.
- F-UI integration. None of F-UI is included here. PR 3 will pull it
in only for the text-input + file-dialog surfaces where F-UI earns
its keep; everything visual stays in the Loom theme layer.
- Atlas / world view / composer. PRs 2, 3, 4 respectively.
Verified: all five engine targets (Server, Client, Project Manager,
GUE, Loom) compile clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f290a65427
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rr = r1 + ((r2 - r1) * i) / (h - 1) | ||
| gg = g1 + ((g2 - g1) * i) / (h - 1) | ||
| bb = b1 + ((b2 - b1) * i) / (h - 1) |
There was a problem hiding this comment.
Handle 1px gradients without dividing by zero
LoomGradientV divides by (h - 1) for color interpolation, which triggers an arithmetic exception when h = 1. A 1-pixel-tall fill is a valid input for this helper (e.g., thin bars or collapsed panels), so this can crash the editor as soon as such a call is added. Add a fast path for h = 1 (draw one line with either endpoint color) before entering the interpolation loop.
Useful? React with 👍 / 👎.
Reviewer corrections on the dead-BVM audit-comment cluster:
1. Stale line numbers (3 of 5 audit cross-references were off after the
comment blocks themselves displaced the dispatch cases downward).
Rewrote as symbolic references:
- "ServerAreas.bb:53" -> "ServerAreas.bb (the Type OwnedScenery and
Field OwnedScenery[] declarations are commented out)" -- the Type
name is unique enough to grep.
- "RC_Standard_Invoker.bb:1363/1494" -> "Case 501 / Case 530" --
Case numbers don't drift even if the surrounding code shifts.
- "ScriptingCommands.bb:1046/1071" -> the impls are now found via
`grep ';Function BVM_SETOWNER'` / `;Function BVM_SCENERYOWNER`
instead of by line.
- "RC_Standard_Invoker.bb:~95" -> "near the top of this file (grep
'DEAD-API')" -- the unique sentinel finds the comment.
2. "Above" wording was wrong (the contract entries are *after* the
audit-comment block, not before). Replaced with "next two lines".
3. .bcs file was not updated. Added the same audit-comment block at
src/RC_Standard.bcs:113-121 so a maintainer reading the static
command-set file sees the same trap warning as one reading the
runtime-string builder.
Recon also surfaced that the just-rebased develop pulled in PR #292
(Loom Alpha) which adds src/Loom.bb + src/Modules/Loom/Theme.bb.
Verified Loom compiles cleanly alongside the BVM fix.
Compile-verified across all 5 engine targets (Server + Client + GUE +
Project Manager + Loom).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
First of a multi-PR rebuild of the Loom GUE redesign as a parallel alpha editor (
bin/Loom.exe), launched from Project Manager next to the existingGame Unified Editorbutton.The previous round retrofitted Loom concepts on top of GUE's F-UI surface (PRs #271 / #273 / #274 / #275, all now closed). F-UI's quirks (window
M_HIDEno-ops, listbox/comboboxM_GETSELECTEDhandle inversion,Tab M_SETINDEXnested-iterator pathology, an unyielding visual language) made that path a losing game. This rebuild runs as its own.bb/.exeso the UI shell can be designed from scratch without fighting F-UI on a surface it wasn't designed for.This PR is architectural proof only. The atlas, world view, and composer arrive in the next three PRs.
What's in
src/Loom.bbGUE.bb's bootstrap so paths and log placement match (writesData/Logs/Loom Log.txtnext to GUE's log).src/Modules/Loom/Theme.bbLoomFill,LoomGradientV,LoomHRule,LoomText...) wrapping Blitz3D primitives. Subsequent surfaces paint through this layer instead of F-UI so they can express the gradient-heavy aesthetic.src/Project Manager.bbLoom (Alpha)button in the Editors group, next toGame Unified Editor. Auto-disables whenbin/Loom.exeis missing. Launches with the same CWD as the GUE button so projects load identically.compile.bat/compile.shbin/Loom.exe.What's deliberately NOT in (deferred)
Include Items.bb/Actors.bb/Spells.bbyet; PR Modernize and reorganize the project #2 wires those up so Loom reads the same in-memory representation GUE does.Roadmap
Blast radius
Project Manager.bband the additive build line incompile.bat/compile.sh.GUE.exe/Server.exe/Client.exeare untouched.Test plan
compile.bat-- buildsbin/Loom.exealongside the others, no errorsGame Unified EditorandLoom (Alpha)buttons; the Loom button is enabledLoom (Alpha)-- new window opens, dark background,LOOMtitle centered with brass divider underneath, project name shown, skeleton notice visibleData/Logs/Loom Log.txt-- contains startup / shutdown linesbin/Loom.exe, restart Project Manager --Loom (Alpha)button is greyed out🤖 Generated with Claude Code