Create stub pawn model and place on game map. Determine game map scaliing #22
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder#22
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?
Create a simple Pawn scene with just a capsule shape. Determine the scaling of the game map - how big is a tile? Assume 1m² and see how that fits. A pawn will be approximately 1.6m tall if we're to assume realistic proportions, but is this a falacy?
Map scaling decision
Recorded here so it doesn't only live in a chat log.
Is "1 m² per tile, 1.6 m pawn" a fallacy?
Partly — and the code already contains the proof. Two arithmetic checks against the current
TerrainGriddefaults:1. The step rule contradicts the height quantum.
level_height = 0.25withmax_step_levels = 1says a pawn cannot step up more than 25 cm. A person manages 40–50 cm without thinking. On a metrically honest map the pathfinder therefore treats a kerb as a cliff, and a lot of the terraces visible on a plains map are already impassable for no readable reason.2. The map is a house plot. 64 tiles × 1 m = a 64 m square. A football pitch is 105×68 m. The design docs want extraction → processing chains linked by manual haulage, with carry capacity and walking distance as real pressure (the Settlers 2 comparison in CLAUDE.md). A pawn crosses 64 m in roughly twenty seconds; there is no room for haulage to be a decision.
Growing
grid_sizewould fix (2), but it is the expensive knob:_paint_cells()sets one GridMap cell per tile and_build_navigation()adds one A* node per walkable tile, both rebuilt on every reroll, under GL Compatibility. At 256×256 that is ~65k of each.tile_sizeis free;grid_sizeis not.The general principle
Metric truth is not what matters — the ratio of pawn to tile to building at the default zoom is, plus whether the silhouette survives being zoomed out. Settlers, Anno and Two Point all make pawns oversized relative to buildings, because the pawn is the object the player's eye tracks.
The only quantities that genuinely need to be metric are ones the fiction prices: solar output per m², habitat area per colonist, storage volume. Those can be denominated in tiles rather than metres, which decouples them from this decision entirely.
Decision
Tile = 2 m, height step = 0.5 m,
grid_sizestays at 64.tile_sizelevel_heightmax_step_levels = 1meansheight_scale = 5.0givesConsequences:
The pawn itself stays at 1.6 m tall × 0.5 m diameter (capsule radius 0.25). Realistic proportions are kept — it is the tile that stops being human-scale, not the pawn.
Caveat to watch when changing
tile_sizeIn
_build_mesh_library()the picking collider isshape.size = Vector3(tile_size, tile_size, tile_size)— a cube as tall as the tile is wide. At a 2 m tile with 0.5 m terraces that collider hangs 1.5 m down into the tile below. Probably still fine for raycast picking (it is deliberately shallow rather than full-depth, per the comment there), but it is a coupling to be conscious of rather than surprised by.Remaining work on this issue
tile_size/level_heightdefaults and re-check the presets headed.game.gdaftermap.generate()usingcell_to_world()/random_walkable_position(), plus half its height — the currentgame.tscntransform hard-codesy = 1.5406733, which is correct for exactly one seed at exactly one tile.Status update
Both remaining checklist items are done on
22-add-pawn-scene:tile_size = 2.0/level_height = 0.5(873ad65). Also fixed a walkability bug found along the way —is_walkable()was comparing against the datum directly instead of asking_kind_for(), which left 61–85% of a plains map undrawn-but-unreachable — and restoredplains.tresas the Map node's preset (it had been silently replaced by a blank embedded resource). Verified headed against all four presets.3ec2e35).map.random_walkable_position()+ half its height ingame.gd(a87c1ad), replacing the old hardcodedy = 1.5406733transform ingame.tscn.Not yet done: opening the PR. Branch is pushed to
origin/22-add-pawn-scenebut no PR exists yet.