Phase 5 visual polish: real 3/4 walls, bigger cabin, subtle grass

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) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-10 22:30:40 +01:00
parent f82807ff3d
commit 6d04c8229b
3 changed files with 48 additions and 36 deletions

View file

@ -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 ───────────────────────────────────────────────────────────────────