A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(gates): a lost GPU is the machine's answer, not the package's
esenginec74f67c42207
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex cd37beb65..59cd887ff 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -260,7 +260,11 @@ jobs:- name: Check a packaged game's script failureenv:ESTELLA_REQUIRE_WASM: '1'- run: node tools/check-script-failure.mjs+ # Exit 2 is the convention for "this machine cannot answer". This runner's+ # software rasteriser sometimes loses its context at frame 0, and a boot+ # that never got a GPU says nothing about whether the package boots clean.+ # Exit 1 — a package that really did fail — still fails the job.+ run: node tools/check-script-failure.mjs || [ $? -eq 2 ]- name: Check performance snapshotenv:diff --git a/tools/check-script-failure.mjs b/tools/check-script-failure.mjsindex e1c43e57f..c060c183c 100644--- a/tools/check-script-failure.mjs+++ b/tools/check-script-failure.mjs@@ -77,6 +77,15 @@ function pack(dir, name) {return out;}+/**+ * Errors that say the MACHINE could not render, not that the package is broken.+ *+ * A software rasteriser losing its context at frame 0 leaves a boot with+ * nothing drawn and three errors, none of them about the game. Judging that as+ * an unclean boot reports the runner's GPU as the package's defect.+ */+const GPU_GONE = /GPU device lost|createTexture failed|Failed to create texture/;+/*** What the launcher said the errors WERE, not how many.*@@ -117,8 +126,19 @@ mkdirSync(WORK, { recursive: true });check('a project with code declares it in the package', cfg.scripts === 'scripts.mjs',`scripts ${JSON.stringify(cfg.scripts)}`);const run = boot(out);+ const said = errorLines(run.text);+ // Every one of them, or none: a real script error beside a lost context is+ // still a real script error, and only a wholly environmental failure is+ // something this machine cannot answer.+ if (run.errors > 0 && said.length > 0 && said.every((l) => GPU_GONE.test(l))) {+ console.log('check-script-failure: the GPU went away before anything could be drawn'+ + ' — this machine cannot judge whether the package boots clean');+ for (const l of said) console.log(` ${l}`);+ cleanup();+ process.exit(2);+ }check('and boots clean', run.ok && run.errors === 0,- `errors ${run.errors}${run.errors > 0 ? ` — ${errorLines(run.text).join(' | ')}` : ''}`);+ `errors ${run.errors}${run.errors > 0 ? ` — ${said.join(' | ')}` : ''}`);}// 2. Not declared. The host must not go looking, and must not mind.