From 2cc075e8beee72db1bbce4b8d41b2a514f7ffd18 Mon Sep 17 00:00:00 2001 From: Brian Fertig Date: Fri, 21 Aug 2026 19:40:45 -0600 Subject: [PATCH] Improve bullet sprite appearance and reduce its render scale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced the single-circle bullet texture with a three-circle design (brass/copper body, bright tracer core, and off-center highlight) for better readability against various backgrounds - Reduced bullet texture size from 16×16 to 12×12 to match the more detailed design - Decreased bullet render scale from 0.18 to 0.1 in the view to make bullets appear as small rounds rather than floating dots - Updated documentation in sprites.md to reflect the new bullet design, size, and scale changes --- src/games/wolfenstein/WolfensteinArt.js | 16 ++++++++++++++-- src/games/wolfenstein/WolfensteinView.js | 2 +- src/games/wolfenstein/sprites.md | 9 ++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/games/wolfenstein/WolfensteinArt.js b/src/games/wolfenstein/WolfensteinArt.js index aab75ef..21e1427 100644 --- a/src/games/wolfenstein/WolfensteinArt.js +++ b/src/games/wolfenstein/WolfensteinArt.js @@ -48,11 +48,23 @@ function paintItem(scene, key, color) { g.destroy(); } +// A flat solid dot read as a blob at any size. A real round has a dark +// brass/copper body (so it reads against bright walls, not just dark ones), +// a hot tracer core smaller than the body (implies motion/heat, not just a +// colored ball), and a tiny off-center highlight for a touch of roundness — +// three concentric circles instead of one, still cheap to generate. function paintBullet(scene) { - const S = 16; + const S = 12; + const cx = S / 2, cy = S / 2; const g = scene.make.graphics({ x: 0, y: 0, add: false }); + g.fillStyle(0x8a5a2a, 1); + g.fillCircle(cx, cy, S * 0.42); + g.lineStyle(1, 0x3a2410, 0.8); + g.strokeCircle(cx, cy, S * 0.42); g.fillStyle(0xfff2a8, 1); - g.fillCircle(S / 2, S / 2, S / 2); + g.fillCircle(cx, cy, S * 0.22); + g.fillStyle(0xffffff, 0.9); + g.fillCircle(cx - S * 0.08, cy - S * 0.08, S * 0.07); g.generateTexture('wolf-bullet', S, S); g.destroy(); } diff --git a/src/games/wolfenstein/WolfensteinView.js b/src/games/wolfenstein/WolfensteinView.js index 845a589..1fdae22 100644 --- a/src/games/wolfenstein/WolfensteinView.js +++ b/src/games/wolfenstein/WolfensteinView.js @@ -229,7 +229,7 @@ export default class WolfensteinView { sprites.push({ key: `pickup:${pk.id}`, x: pk.x, y: pk.y, tex: `wolf-item-${pk.itemId}`, scale: 0.45 }); } for (const proj of state.projectiles) { - sprites.push({ key: `proj:${proj.id}`, x: proj.x, y: proj.y, tex: 'wolf-bullet', scale: 0.18 }); + sprites.push({ key: `proj:${proj.id}`, x: proj.x, y: proj.y, tex: 'wolf-bullet', scale: 0.1 }); } const invDet = 1 / (camera.planeX * camera.dirY - camera.dirX * camera.planeY); diff --git a/src/games/wolfenstein/sprites.md b/src/games/wolfenstein/sprites.md index 6205285..a2487e1 100644 --- a/src/games/wolfenstein/sprites.md +++ b/src/games/wolfenstein/sprites.md @@ -169,9 +169,12 @@ same aspect ratio is what matters most): - `wolfenstein-item-pistol`, `wolfenstein-item-ammo`, `wolfenstein-item-health` — pickup icons. Placeholder is 64×64; square, transparent background. Rendered at billboard scale 0.45 (`WolfensteinView._drawSprites`). -- `wolfenstein-bullet` — pistol round in flight. Placeholder is 16×16, a - small bright circle; rendered at scale 0.18, so keep it simple/legible at - tiny sizes. +- `wolfenstein-bullet` — pistol round in flight. Placeholder is 12×12 (see + `WolfensteinArt.paintBullet`: a brass/copper body with a bright tracer + core and a small highlight, three concentric circles); rendered at scale + 0.1 (`WolfensteinView._drawSprites`, shrunk from 0.18 on 2026-08-21 to + read as a small round rather than a floating dot) — keep any replacement + simple/legible at tiny sizes, same as before. - `wolfenstein-muzzle` — muzzle-flash sprite. Placeholder is 48×48. Not currently spawned by the scene at all (no code creates a `wolf-muzzle` image instance yet, painted or not) — wire it up on `weaponFired` events