Grid and map primitives #2
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
icub3d/terra-redux#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stand up
src/world/with the spatial types the rest of M1 builds on, and a map thatcan be authored as data rather than hardcoded.
Follow
src/character/exactly — it is the reference implementation for a data-backedsubsystem: an authored
*Deftype (src/character/definition.rs), a validated registry(
src/character/registry.rs), and a plugin that drives loading. Reuse the existingRonAssettrait insrc/data/loader.rs; claim a*.map.roncompound extension so mapfiles never contend with any other definition type.
Scope
GridPosnewtype overIVec3— no bareIVec3passed around (CLAUDE.md§ Code Style).Tile: at minimum walkable/blocked and a height. Cover and LOS properties are M2 —leave room, do not implement them.
MapDef/MapAssetimplementingRonAsset, with validation at load: unknown tilereferences, out-of-bounds spawn points, and duplicate ids fail at startup naming the
offending id, never silently.
assets/data/maps/, big enough for two units toneed to move toward each other.
Acceptance criteria
cargo testparses the shipped map file, so a bad edit fails CI rather thansomeone's first run.
HashMapiteration order anywherethat could affect an outcome.