Skip to content

More ores & materials (gold, diamond, redstone-equivalent) #9

Description

@MichaelFisher1997

Adds the ore/material ids that smelting (#3) and tool tiers (#4) will depend on. Independent of crafting, but should land before those so they have materials to consume.

Context

Worldgen currently emits only three ores — coal, iron, copper — defined in src/game/gen/Ores.ts:30-34 and src/game/gen/BlockIds.ts:22-24 (COAL_ORE=16, IRON_ORE=17, COPPER_ORE=18). No gold, diamond, redstone, lapis or emerald exist yet.

Scope

  • src/game/gen/BlockIds.ts — append new ore ids to BLOCKS (never reorder — chunk data stores raw ids, per AGENTS.md). Add: GOLD_ORE, DIAMOND_ORE, REDSTONE_ORE (redstone-equivalent), LAPIS_ORE, EMERALD_ORE. Also add their deepslate variants if Graphics & performance pass: presets, perf overlay, water, debug tooling #3's deepslate layer lands here.
  • src/engine/Textures.ts — add tile painters for each new ore in the 8x8 atlas (speckled-on-stone pattern, consistent with existing ore painters). flipY = false UV math must be preserved.
  • src/game/gen/Ores.ts — add depth-gated veins: gold (deep), diamond (very deep, rare), redstone/lapis/emerald (mid-deep).
  • src/game/Items.ts — add raw-ore drops to DROP_TABLE (line 114) and creative palette entries (line 84).
  • src/game/Blocks.ts — add BlockDef entries with appropriate hardness and miningTier (diamond should require iron-tier or higher to mine).

Gotchas

  • Noise thresholds must be measured, not guessed. AGENTS.md warns that Perlin's real range is ~[-0.9, 0.93] and that thresholds that "feel right" often never fire. Measure percentile distribution of existing ore noise before setting spawn thresholds, or veins will be absent (or everywhere).
  • Adding a block = coordinated edit across BlockIds.ts, Blocks.ts, Textures.ts.

Acceptance criteria

  • Each new ore generates deterministically from the seed at sensible depths and rarity.
  • Each ore has a distinct, readable atlas texture.
  • Each ore drops its raw item when mined with an appropriate-tier tool (mining-tier gating can stub until Water overhaul: liquid simulation, flow physics, rendering, interaction #4 lands).
  • Existing coal/iron/copper generation is unchanged.

Roadmap reference

Phase 2 — "More ores & materials".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-2Phase 2 — Crafting & survival depth (active)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions