Skip to content

[FEATURE] World features generate no collision — buildings, city volumes, and walls are solid to nothing #1627

Description

@Noisemaker111

Problem

Everything the engine generates as world geometry is render-only. A game gets a building, a city, or a wall on screen and nothing in the world can collide with it.

Traced concretely for building():

building(...)BuildingEnvironmentDescriptorresolveStructureBuildings (packages/core/src/world/environmentSummary.ts:24) → GeneratedBuilding[] carrying a real bounds: Aabb (packages/core/src/world/buildings.ts:94-109). That result has exactly two destinations:

  • render — packages/shell/src/environment/EnvironmentScene.tsx:314-336, which never touches collidersOf or scene.object.place
  • populateNavGridFromEnvironment (packages/core/src/nav/navFromEnvironment.ts:14-23) — whose only callers are its own tests. No game builds a nav grid.

So a building() cluster is passable to the player and to NPCs. The player obstacle set is built solely from ctx.scene.object.inBox (packages/core/src/movement/playerMovement.ts:529), and generated structures never enter the object store.

Same for the rest:

Feature Solid?
building() / structures no
cityKind volumes (CityRenderer.tsx) no — grep for collid returns nothing
world/walls.ts (wallSegments, roof plans) no — pure geometry, emits no collider and no scene object
pads no — only carves terrain height
vegetation no
terrain() floor only, never a wall

Only ctx.scene.object.place produces something solid.

Why it matters now

This is the reason Games/vice-isle/src/world.ts:91-95 abandoned structures: [building(...)] and re-authored every building as a placed scene object. That comment claims the clusters "blocked NPC navigation" — they did not; the nav bridge has never been called. They blocked nothing.

It also means the city kind can now render a fully kitted district (#1620) that no entity can touch — the better it looks, the worse the gap reads.

Acceptance criteria

  • Generated world geometry can contribute collision without a game hand-re-authoring it as scene objects. A GeneratedBuilding already carries bounds; a city lot and a wall segment have footprints too.
  • One notion of "solid": whatever the seam is, the player resolver and any AI obstacle consumer read the same source. Two parallel derivations is what produced this.
  • Opt-in per feature — a decorative wall should still be able to be non-solid on purpose.
  • A test asserting a given piece of world geometry is solid to the systems that claim to respect it. Nothing today would catch a divergence.
  • Fix the stale comment at Games/vice-isle/src/world.ts:91-95 — it documents behaviour that never existed.

Related

  • Walking NPCs consult no obstacles at all — filed separately; the two together are why "solid" currently means three different things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions