A1: Style guide, palette and the woodcut print pass

docs/STYLE.md sets Tidewall's look: a drowned coast printed by hand. It has the
palette, shape language, character proportions, shading, UI motifs, audio
palette and a do-not-do list.

- Palette (src/client/style/palette.gd) is the one table of client colours.
  Every colour that was scattered over the views now names its entry, with
  values unchanged. test_palette fails on a colour literal anywhere else in
  src/client or src/app, and on a palette colour the guide doesn't list.
- Look sets up the sky, the salt-faded grading (saturation 0.86, contrast
  1.05), the sun and the print pass, for the match view and the capture scenes.
- folk_print.gdshader is one full-screen quad multiplied over the frame. It
  draws ink lines at depth jumps and creases (fading with distance, scaled with
  screen height), diagonal hatching cut into real shadow, and faint paper
  grain. Ground under the sea gets none.
- make style-captures renders a hamlet and a dock with and without the pass.

Closes #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 08:57:11 -05:00
co-authored by Claude Opus 5.5
parent ce89ca4929
commit d7c8ed7e6e
24 changed files with 651 additions and 76 deletions
+6 -24
View File
@@ -17,37 +17,17 @@ var structures: StructureView
var entities: EntityView
var camera: Camera3D
var rig: CameraRig = CameraRig.new()
## The woodcut print pass over the camera (Look.add_print_pass).
var print_pass: MeshInstance3D
## Builds the scene for `simulation`. `local_id` is the player this client plays, or 0.
func setup(simulation: Simulation, local_id: int = 0) -> void:
sim = simulation
var sky_material: ProceduralSkyMaterial = ProceduralSkyMaterial.new()
sky_material.sky_top_color = Color(0.32, 0.5, 0.68)
sky_material.sky_horizon_color = Color(0.82, 0.78, 0.68)
sky_material.ground_bottom_color = Color(0.18, 0.2, 0.2)
sky_material.ground_horizon_color = Color(0.82, 0.78, 0.68)
var sky: Sky = Sky.new()
sky.sky_material = sky_material
var environment: Environment = Environment.new()
environment.background_mode = Environment.BG_SKY
environment.sky = sky
environment.ambient_light_source = Environment.AMBIENT_SOURCE_SKY
environment.ambient_light_energy = 0.45
environment.tonemap_mode = Environment.TONE_MAPPER_FILMIC
environment.fog_enabled = true
environment.fog_light_color = Color(0.78, 0.78, 0.74)
environment.fog_density = 0.0005
environment.fog_aerial_perspective = 0.4
var world: WorldEnvironment = WorldEnvironment.new()
world.environment = environment
world.environment = Look.environment()
add_child(world)
var sun: DirectionalLight3D = DirectionalLight3D.new()
sun.rotation_degrees = Vector3(-35.0, -130.0, 0.0)
sun.light_energy = 0.95
sun.shadow_enabled = true
sun.directional_shadow_max_distance = 400.0
add_child(sun)
add_child(Look.sun())
camera = Camera3D.new()
camera.near = CameraRig.NEAR
@@ -55,6 +35,7 @@ func setup(simulation: Simulation, local_id: int = 0) -> void:
camera.fov = CameraRig.FOV
add_child(camera)
camera.make_current()
print_pass = Look.add_print_pass(camera)
if sim.island != null:
terrain = TerrainView.new()
@@ -81,6 +62,7 @@ func setup(simulation: Simulation, local_id: int = 0) -> void:
## Matches everything drawn to the simulation as it is now.
func sync() -> void:
water.follow(sim)
Look.set_sea_level(print_pass, water.level)
props.sync()
structures.sync()
entities.sync()