Skip to content

Paint the dirt and village grass instead of loading kit maps #13

Summary

  • Replace the 64px kit ground maps with procedural 512px dirt and grass textures painted at load time, so crumbs, gravel and blades still read when a tile covers about a metre.
  • Share one wrapped value-noise sampler between the albedo and the dirt normal map, and draw every detail across wrapped neighbours so each tile stays seamless.
  • Retile the battlefield floor at roughly one metre and route the repeat, RepeatWrapping and anisotropy through a single tileGround helper.
  • Reuse the painted dirt for the village road, clamped to whole tiles across its width, and drop the grain overlay from 0.7 to 0.34 now that the base map carries the detail.
  • Stop shipping the two ground PNGs from the bundle; the pond texture is the only ground file still loaded.

Testing

  • bun test — 49 pass, 0 fail.
  • bun scripts/check.js — all game modules bundle cleanly.
  • bun scripts/bundle.js — still bundles, now with 72 assets and no ground PNGs.
  • bun scripts/shot.js village and bun scripts/shot.js battle against a local port — both scenes render with clean diagnostics, including forced close-up cameras to inspect the ground detail.
  • Not run: manual play-through on the dev server, since it serves a different checkout.

Sign in to comment on this pull request.