Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

debug: dumduel bullet visibility — debug display + logging

Temporary debug to diagnose invisible bullets on client.

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

+8 -3
+8 -3
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 60 - if (snapCount <= 3 || snapCount % 100 === 0) { 61 - console.log(`📸 snap #${snapCount} phase=${s.phase} players=${s.players?.length} bullets=${s.bullets?.length} tick=${s.tick}`); 59 + // Log first few snapshots + periodic + any with bullets 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); 62 62 } 63 63 64 64 // Reconcile own prediction ··· 338 338 } 339 339 } 340 340 341 + // DEBUG: show bullet count 342 + ink(255, 0, 0).write(`B:${bullets.length}`, { x: 4, y: 4 }); 343 + 341 344 if (phase === "fight" || phase === "roundover") { 342 345 // Bullets (extrapolated client-side for smoothness) 343 346 for (const b of bullets) { ··· 345 348 if (b.owner === myHandle) ink(50, 120, 200, alpha); 346 349 else ink(200, 70, 60, alpha); 347 350 circle(ox + Math.round(b.x), oy + Math.round(b.y), BULLET_R, true); 351 + // DEBUG: draw bigger marker so bullet is unmissable 352 + ink(255, 0, 0, 120).box(ox + Math.round(b.x) - 4, oy + Math.round(b.y) - 4, 8, 8); 348 353 } 349 354 350 355 // Target indicator