Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

debug: relay client logs to server for dumduel bullet diagnosis

Client now sends duel:clientlog via WS with snapshot info.
Server logs all snapshots containing bullets + client-relayed logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+12 -5
+3 -3
session-server/duel-manager.mjs
··· 559 559 560 560 const data = JSON.stringify(snapshot); 561 561 562 - // Log periodic snapshot info 563 - if (this.tick % 300 === 0) { 562 + // Log periodic snapshot info + always log when bullets present 563 + if (this.tick % 300 === 0 || bulletsData.length > 0) { 564 564 const channels = []; 565 565 for (const [h, p] of this.players) { 566 566 if (h === DUMMY_HANDLE) continue; 567 567 channels.push(`${h}:${p.udpChannelId ? "UDP" : p.wsId != null ? "WS" : "NONE"}`); 568 568 } 569 - console.log(`🎯 Duel snapshot #${this.tick} phase=${this.phase} via [${channels.join(", ")}]`); 569 + console.log(`🎯 Duel snapshot #${this.tick} phase=${this.phase} bullets=${bulletsData.length} via [${channels.join(", ")}]`); 570 570 } 571 571 572 572 // Send to each player with UDP channel, fallback to WS
+5
session-server/session.mjs
··· 2858 2858 if (parsed?.handle) duelManager.handlePing(parsed.handle, parsed.ts, id); 2859 2859 return; 2860 2860 } 2861 + if (msg.type === "duel:clientlog") { 2862 + const parsed = typeof msg.content === "string" ? JSON.parse(msg.content) : msg.content; 2863 + console.log(`🎯 [CLIENT ${parsed?.handle}] ${parsed?.msg}`, parsed?.bullets?.length > 0 ? JSON.stringify(parsed.bullets) : ""); 2864 + return; 2865 + } 2861 2866 if (msg.type === "duel:input") { 2862 2867 const parsed = typeof msg.content === "string" ? JSON.parse(msg.content) : msg.content; 2863 2868 if (parsed?.handle) duelManager.receiveInput(parsed.handle, parsed);
+4 -2
system/public/aesthetic.computer/disks/dumduel.mjs
··· 56 56 roundWinner = s.roundWinner; 57 57 roster = (s.roster || []).map((h) => ({ handle: h })); 58 58 59 - // Log first few snapshots + periodic + any with bullets 59 + // Log first few snapshots + periodic + any with bullets → relay to server 60 60 if (snapCount <= 3 || snapCount % 100 === 0 || s.bullets?.length > 0) { 61 - console.log(`📸 snap #${snapCount} phase=${s.phase} players=${s.players?.length} bullets=${s.bullets?.length} tick=${s.tick}`, s.bullets); 61 + const msg = `snap #${snapCount} phase=${s.phase} players=${s.players?.length} bullets=${s.bullets?.length} tick=${s.tick}`; 62 + console.log(`📸 ${msg}`, s.bullets); 63 + server?.send("duel:clientlog", { handle: myHandle, msg, bullets: s.bullets || [] }); 62 64 } 63 65 64 66 // Reconcile own prediction