Remove plans

This commit is contained in:
2026-10-11 01:26:51 -03:00
parent cd3b39c3d7
commit 44a39bf8ec
10 changed files with 50 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
// generates chunks in worldgen workers (worldgen_worker.ts) instead of on the game's thread. the host starts the
// workers and gives the game a port to each, since the game has no permissions to start them itself (see
// GENERATION.md). requests go nearest first, a worker has a couple at a time so priorities stay fresh, and what the
// server/worldgen_workers.ts). requests go nearest first, a worker has a couple at a time so priorities stay fresh, and what the
// game stops wanting is dropped before it starts
import type { RawChunk } from "$/common/generation.ts";
import type { WorldgenBundle } from "$/common/worldgen_bundle.ts";
+5 -1
View File
@@ -1,7 +1,11 @@
// the worldgen workers (game/worldgen_worker.ts), started by the host because the game worker has no permissions to
// start workers itself: Deno checks a new worker's code against its parent's permissions. each gets one end of a
// channel and the game the other, so the game talks to them directly. a worker that crashes is started again and the
// game is given its new port. see GENERATION.md
// game is given its new port.
// what else was tried, in Deno 2.9: a worker without permissions can start one from a data: url, but that one can't
// import a single engine file either, so it would have to be the whole worker bundled into one script. and giving the
// game read access to the code isn't enough: imports from jsr (like @paulaboks/rng) also want permission to import
// from jsr.io, which would let engine access mods in the game import code from the internet
const WORKER_URL = new URL("./game/worldgen_worker.ts", import.meta.url);
// a worker that keeps crashing isn't started again after this many times, the game generates without it
const MAX_RESTARTS = 5;