The rowing boat: seagrass at the tide line and resin from pines; rope, pitch, and a boat at the workbench (driftwood, rope, pitch, nails); tied up at a berth of its own at the end of the pier, one each, saved; Set sail needs the ship's compass and the Highlands aren't charted yet; online too

This commit is contained in:
Paul Bailey
2026-11-07 11:16:15 +00:00
parent 9709d2c424
commit 2004fe193c
17 changed files with 579 additions and 5 deletions

View File

@@ -37,6 +37,11 @@ static func build(key: String) -> ArrayMesh:
match key:
"stick": m = _stick()
"driftwood": m = _driftwood()
"seagrass": m = _seagrass()
"rope": m = _rope()
"pine_resin": m = _pine_resin()
"pitch": m = _pitch()
"rowing_boat": m = _rowing_boat()
"treasure_map": m = _treasure_map()
"ship_compass": m = _ship_compass()
"spyglass": m = _spyglass()
@@ -203,6 +208,83 @@ static func _driftwood() -> ArrayMesh:
P._cylinder(st, Vector3(0.1, 0.09, 0.05), Vector3(0.22, 0.12, 0.24), 0.03, 0.015, 5, GREY, r)
return P._commit(st)
## A tangle of long, flat ribbons of seagrass.
static func _seagrass() -> ArrayMesh:
var st := P._begin()
var r := _rng(45)
for i in range(6):
var a := r.randf() * TAU
var col := Color(0.28, 0.42, 0.2).lerp(Color(0.5, 0.48, 0.25), r.randf())
_box(st, Vector3(r.randf_range(-0.03, 0.03), 0.01 + i * 0.006, r.randf_range(-0.03, 0.03)), Vector3(0.03, 0.006, 0.38),
col, Basis(Vector3.UP, a))
return P._commit(st)
## A coil of seagrass rope.
static func _rope() -> ArrayMesh:
var st := P._begin()
var r := _rng(47)
const ROPE := Color(0.6, 0.55, 0.36)
var n := 12
for k in range(2):
for i in range(n):
var a0 := TAU * i / n
var a1 := TAU * (i + 1) / n
var rr := 0.1 - k * 0.035
P._cylinder(st, Vector3(cos(a0) * rr, 0.025 + k * 0.03, sin(a0) * rr), Vector3(cos(a1) * rr, 0.025 + k * 0.03, sin(a1) * rr),
0.02, 0.02, 5, ROPE.darkened(r.randf() * 0.12), r)
return P._commit(st)
## A few lumps of sticky amber resin.
static func _pine_resin() -> ArrayMesh:
var st := P._begin()
var r := _rng(49)
var n := FastNoiseLite.new()
n.seed = 49
n.frequency = 3.0
for i in range(4):
var c := Vector3(r.randf_range(-0.05, 0.05), 0.03, r.randf_range(-0.05, 0.05))
P._blob(st, c, Vector3.ONE * r.randf_range(0.025, 0.045), n, 0.25, Color(0.8, 0.5, 0.12).darkened(r.randf() * 0.25), r, 1)
return P._commit(st)
## A small clay pot of black pitch, a stick stood in it.
static func _pitch() -> ArrayMesh:
var st := P._begin()
var r := _rng(51)
P._cylinder(st, Vector3(0, 0, 0), Vector3(0, 0.12, 0), 0.07, 0.085, 8, Color(0.55, 0.36, 0.24), r, 0.0)
P._cylinder(st, Vector3(0, 0.115, 0), Vector3(0, 0.125, 0), 0.078, 0.078, 8, Color(0.06, 0.05, 0.05), r, -1.0, Color(0.06, 0.05, 0.05))
P._cylinder(st, Vector3(0.01, 0.06, 0.0), Vector3(0.05, 0.24, 0.02), 0.008, 0.007, 4, HANDLE, r)
return P._commit(st)
## A rowing boat, bow to -Z: a model 0.55 m long (moorings.gd shows it eight
## times over at the pier). Driftwood planks, pitch-black seams, two thwarts
## and a pair of oars.
static func _rowing_boat() -> ArrayMesh:
var st := P._begin()
var r := _rng(53)
const WOOD := Color(0.66, 0.6, 0.5)
const SEAM := Color(0.1, 0.08, 0.07)
const OAR := Color(0.55, 0.42, 0.28)
var hw := 0.085 # half the beam amidships
# Bottom: a wide plank aft, narrowing to the bow.
_box(st, Vector3(0, 0.01, 0.07), Vector3(hw * 1.7, 0.012, 0.36), WOOD)
_box(st, Vector3(0, 0.014, -0.16), Vector3(hw * 1.1, 0.012, 0.12), WOOD)
for side in [-1.0, 1.0]:
# Sides amidships and aft, two strakes with a dark seam between.
_box(st, Vector3(side * hw, 0.03, 0.06), Vector3(0.008, 0.03, 0.38), WOOD.darkened(0.05))
_box(st, Vector3(side * hw, 0.047, 0.06), Vector3(0.0085, 0.004, 0.38), SEAM)
_box(st, Vector3(side * hw, 0.062, 0.06), Vector3(0.008, 0.028, 0.38), WOOD)
# Bow: the sides swept in to meet at the stem.
var bow := Basis(Vector3.UP, side * 0.53)
_box(st, Vector3(side * hw * 0.5, 0.048, -0.193), Vector3(0.008, 0.07, 0.17), WOOD, bow)
_box(st, Vector3(0, 0.055, -0.265), Vector3(0.014, 0.085, 0.014), WOOD.darkened(0.15)) # stem
_box(st, Vector3(0, 0.045, 0.25), Vector3(hw * 2.0, 0.06, 0.008), WOOD.darkened(0.08)) # transom
for z in [-0.02, 0.15]:
_box(st, Vector3(0, 0.055, z), Vector3(hw * 2.0, 0.008, 0.035), WOOD.darkened(0.12)) # thwarts
for side in [-1.0, 1.0]:
P._cylinder(st, Vector3(side * 0.04, 0.07, 0.17), Vector3(side * 0.05, 0.075, -0.13), 0.004, 0.004, 4, OAR, r)
_box(st, Vector3(side * 0.05, 0.075, -0.15), Vector3(0.022, 0.003, 0.05), OAR)
return P._commit(st)
## A rolled-up, torn sheet of old parchment tied with string.
static func _treasure_map() -> ArrayMesh:
var st := P._begin()