feat: integrate room framework and isolated subgame bundles

Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
This commit is contained in:
2026-09-09 03:13:18 +08:00
parent a7ec8aa6a7
commit 35216f75e7
1028 changed files with 835556 additions and 21415 deletions
@@ -362,7 +362,9 @@ export class WireClient {
if (!this.open || this.stopped || this.transport === null) {
throw new Error('connection is not open');
}
this.transport.send(serializeOutbound(envelope));
const frame = serializeOutbound(envelope);
this.logPacket('发送', frame);
this.transport.send(frame);
}
switchServer(url: string): void {
@@ -454,12 +456,19 @@ export class WireClient {
private onMessage(frame: string): void {
const decoded = decodeFrame(frame);
if (decoded.kind !== 'heartbeat') this.logPacket('接收', frame);
if (decoded.kind === 'ignore') return;
this.watchdog.feed();
if (decoded.kind !== 'message') return;
this.emit({ type: 'message', message: decoded.message });
}
private logPacket(direction: '发送' | '接收', frame: string): void {
if (STARTUP_CONFIG.debugIO) {
console.log(`[收发包] ${direction}`, {server:this.policy.current(),time:new Date().toISOString()}, frame);
}
}
private onReceiveTimeout(): void {
if (!this.open || this.stopped) return;
this.emit({ type: 'slow' });