Improve bullet sprite appearance and reduce its render scale

- 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
This commit is contained in:
Brian Fertig 2026-08-21 19:40:45 -06:00
parent c86ccb9d1f
commit 2cc075e8be
3 changed files with 21 additions and 6 deletions

View File

@ -48,11 +48,23 @@ function paintItem(scene, key, color) {
g.destroy(); 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) { 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 }); 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.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.generateTexture('wolf-bullet', S, S);
g.destroy(); g.destroy();
} }

View File

@ -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 }); 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) { 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); const invDet = 1 / (camera.planeX * camera.dirY - camera.dirX * camera.planeY);

View File

@ -169,9 +169,12 @@ same aspect ratio is what matters most):
- `wolfenstein-item-pistol`, `wolfenstein-item-ammo`, `wolfenstein-item-health` - `wolfenstein-item-pistol`, `wolfenstein-item-ammo`, `wolfenstein-item-health`
— pickup icons. Placeholder is 64×64; square, transparent background. — pickup icons. Placeholder is 64×64; square, transparent background.
Rendered at billboard scale 0.45 (`WolfensteinView._drawSprites`). Rendered at billboard scale 0.45 (`WolfensteinView._drawSprites`).
- `wolfenstein-bullet` — pistol round in flight. Placeholder is 16×16, a - `wolfenstein-bullet` — pistol round in flight. Placeholder is 12×12 (see
small bright circle; rendered at scale 0.18, so keep it simple/legible at `WolfensteinArt.paintBullet`: a brass/copper body with a bright tracer
tiny sizes. 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 - `wolfenstein-muzzle` — muzzle-flash sprite. Placeholder is 48×48. Not
currently spawned by the scene at all (no code creates a `wolf-muzzle` 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 image instance yet, painted or not) — wire it up on `weaponFired` events