From 6d04c8229b5c5d29425b54bf9d81b035e316a2f8 Mon Sep 17 00:00:00 2001 From: megaproxy Date: Sun, 10 May 2026 22:30:40 +0100 Subject: [PATCH] Phase 5 visual polish: real 3/4 walls, bigger cabin, subtle grass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User feedback after first visual inspection: 'walls looked really thick and there was hardly any inside space'. Five targeted fixes: 1. Wall._draw rewrite — proper within-tile 3/4 perspective. Previously the wall was a 16w×32h bottom-anchored rect that rose UP into the cell above (which encroached on the cabin interior whenever the wall faced south). New layout: 16×16 fitting strictly inside its own tile, with a lit-top 5px band + shaded-front 11px band + mortar lines + outline. Reads as 'a wall standing up' without overlapping adjacent cells. Same shape for stone and wood materials (different palettes). 2. Demo cabin expanded from 5×4 to 8×6 — interior went from 6 cells (closet) to 24 cells (actual room). 3. Grass-tile border darken: 0.15 → 0.04. Killed the graph-paper effect that dominated at 3×+ zoom. Tile boundary still readable when looking carefully; doesn't dominate the visual. 4. Removed Phase 1 _paint_sample_walls() seed. That 8×8 stone ring lived only on the Wall TileMap layer (set to visible=false in the Phase 5 rendering pivot) — so it was an invisible path obstacle. Cleaner to not seed it at all now that walls render at entity level. 5. CameraRig default target_zoom: 1.0 → 2.5. At 1× on a 1280-px viewport the world feels sparse and pawns become 6-pixel dots. 2.5× shows ~30 tiles wide which is the 'comfortable inspection' level. MCP-verified visually: the cabin now reads as a proper 8×6 stone room with raised 3/4 walls and a real 24-cell interior. Subtle grass field. The 'commit to 3/4 perspective' rendering decision is now actually visible (was conceptual-only before). Co-Authored-By: Claude Opus 4.7 (1M context) --- scenes/entities/wall.gd | 59 ++++++++++++++++++++------------------ scenes/world/camera_rig.gd | 6 ++-- scenes/world/world.gd | 19 ++++++++---- 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/scenes/entities/wall.gd b/scenes/entities/wall.gd index 9e7fc80..124b8b6 100644 --- a/scenes/entities/wall.gd +++ b/scenes/entities/wall.gd @@ -117,50 +117,53 @@ static func from_dict(d: Dictionary) -> Dictionary: # ── render ───────────────────────────────────────────────────────────────────── func _draw() -> void: - # Wall is drawn as a bottom-anchored 16×32 rect occupying the lower portion - # of the virtual sprite area. The origin (0, 0) of _draw() sits at position, - # which is at the tile's bottom-centre (tile_y * 16 + 16). - # Drawing upward: Y goes from 0 to -32 in local space. + # 3/4-perspective wall rendering — fits WITHIN the wall's own tile so it + # never encroaches on adjacent floor/interior tiles. Two-band look: + # Top band (lit) = the wall's "top surface" (looking down at it) + # Bottom band (dark) = the wall's "front face" (looking at the side) + # + # Origin (0, 0) is at the tile's bottom-centre. Tile spans local Y: -16 to 0. + # We draw entirely within that 16×16 box. var alpha: float = 1.0 if _completed else 0.4 if wall_material == MATERIAL_STONE: _draw_stone_wall(alpha) else: - # Fallback: render as wood until art assets are wired in Phase 6+. _draw_wood_wall(alpha) func _draw_stone_wall(alpha: float) -> void: - var base := Color(0.55, 0.55, 0.50, alpha) - var mortar := Color(0.40, 0.40, 0.38, alpha) - - # Main body: 16 px wide, 32 px tall, origin at bottom-centre. - draw_rect(Rect2(Vector2(-8.0, -32.0), Vector2(16.0, 32.0)), base) - - # Mortar / horizontal stone-course lines (4 lines spaced 8 px apart). - for i in range(1, 5): - var y: float = -8.0 * float(i) - draw_line(Vector2(-8.0, y), Vector2(8.0, y), mortar, 1.0) + var top_face := Color(0.65, 0.65, 0.60, alpha) # lit top surface + var front_face := Color(0.42, 0.42, 0.38, alpha) # shaded front + var mortar := Color(0.28, 0.28, 0.25, alpha) + var outline := Color(0.18, 0.18, 0.16, 0.7 * alpha) + # Top face — thin lit strip at upper-third of the tile. + draw_rect(Rect2(Vector2(-8.0, -16.0), Vector2(16.0, 5.0)), top_face) + # Front face — main wall body, lower two-thirds. + draw_rect(Rect2(Vector2(-8.0, -11.0), Vector2(16.0, 11.0)), front_face) + # Mortar lines on the front face only. + draw_line(Vector2(-8.0, -7.0), Vector2(8.0, -7.0), mortar, 1.0) + draw_line(Vector2(-8.0, -3.0), Vector2(8.0, -3.0), mortar, 1.0) + # Border between top and front (gives the depth illusion). + draw_line(Vector2(-8.0, -11.0), Vector2(8.0, -11.0), Color(0.20, 0.20, 0.18, alpha), 1.0) # Outline. - draw_rect(Rect2(Vector2(-8.0, -32.0), Vector2(16.0, 32.0)), Color(0.0, 0.0, 0.0, 0.5 * alpha), false, 1.0) + draw_rect(Rect2(Vector2(-8.0, -16.0), Vector2(16.0, 16.0)), outline, false, 1.0) func _draw_wood_wall(alpha: float) -> void: - var base := Color(0.55, 0.40, 0.22, alpha) - var plank := Color(0.45, 0.32, 0.16, alpha) + var top_face := Color(0.62, 0.45, 0.25, alpha) + var front_face := Color(0.42, 0.30, 0.16, alpha) + var plank := Color(0.30, 0.20, 0.10, alpha) + var outline := Color(0.16, 0.10, 0.04, 0.7 * alpha) - draw_rect(Rect2(Vector2(-8.0, -32.0), Vector2(16.0, 32.0)), base) - - # Vertical plank lines. + draw_rect(Rect2(Vector2(-8.0, -16.0), Vector2(16.0, 5.0)), top_face) + draw_rect(Rect2(Vector2(-8.0, -11.0), Vector2(16.0, 11.0)), front_face) + # Vertical plank seams on the front face. for x_offset in [-3.0, 2.0]: - draw_line( - Vector2(x_offset, -32.0), - Vector2(x_offset, 0.0), - plank, 1.0 - ) - - draw_rect(Rect2(Vector2(-8.0, -32.0), Vector2(16.0, 32.0)), Color(0.0, 0.0, 0.0, 0.5 * alpha), false, 1.0) + draw_line(Vector2(x_offset, -11.0), Vector2(x_offset, 0.0), plank, 1.0) + draw_line(Vector2(-8.0, -11.0), Vector2(8.0, -11.0), Color(0.20, 0.14, 0.06, alpha), 1.0) + draw_rect(Rect2(Vector2(-8.0, -16.0), Vector2(16.0, 16.0)), outline, false, 1.0) # ── internal ─────────────────────────────────────────────────────────────────── diff --git a/scenes/world/camera_rig.gd b/scenes/world/camera_rig.gd index 1d1a8a4..85fb4a6 100644 --- a/scenes/world/camera_rig.gd +++ b/scenes/world/camera_rig.gd @@ -22,8 +22,10 @@ var _centre_tween: Tween = null func _ready() -> void: position_smoothing_enabled = false - # Start at the mid-range of the zoom band - target_zoom = 1.0 + # Phase 5 visual polish: default 2.5× — at 1× the world feels sparse on phone + # and pawns become 6-pixel dots; 2.5× shows ~30 tiles wide which is the + # "comfortable inspection" zoom level. + target_zoom = 2.5 zoom = Vector2(target_zoom, target_zoom) diff --git a/scenes/world/world.gd b/scenes/world/world.gd index d77bcc6..eb843de 100644 --- a/scenes/world/world.gd +++ b/scenes/world/world.gd @@ -67,7 +67,11 @@ func _ready() -> void: for layer in [terrain_layer, floor_layer, wall_layer, designation_layer, roof_layer, fog_layer]: layer.tile_set = tileset _paint_terrain() - _paint_sample_walls() + # Phase 5: removed _paint_sample_walls() — the old 8×8 stone ring rendered + # only on the (now-hidden) Wall TileMap layer. With the rendering pivot + # to entity-based walls, that ring was invisible to the player but still + # blocked pathing. Removing it cleans the world view; the Phase 5 cabin + # is now the only player-visible structure. _apply_camera_bounds() pathfinder.setup(MAP_SIZE_TILES) @@ -130,7 +134,10 @@ func _build_placeholder_tileset() -> TileSet: ] for i in palette.size(): var base: Color = palette[i] - var border: Color = base.darkened(0.15) + # Subtle border — was darkened(0.15) which made grass look like graph paper. + # darkened(0.04) keeps the tile boundary readable when squinting but doesn't + # dominate the visual. + var border: Color = base.darkened(0.04) for px in TILE_SIZE_PX: for py in TILE_SIZE_PX: var on_border := ( @@ -213,10 +220,10 @@ func _seed_phase5_demo_buildings() -> void: # player-driven designation UI; for now the player sees the construction # loop without needing to paint anything. # - # Layout: ~5×4 wall ring at (45, 25), with an open door slot. - var origin := Vector2i(45, 25) - var w := 5 - var h := 4 + # Layout: 8×6 wall ring at (44, 23) — interior 6×4 = 24 cells of real room. + var origin := Vector2i(44, 23) + var w := 8 + var h := 6 for x in w: EventBus.designation_added.emit(origin + Vector2i(x, 0), Designation.TOOL_BUILD_WALL) EventBus.designation_added.emit(origin + Vector2i(x, h - 1), Designation.TOOL_BUILD_WALL)