A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Map: SeaCraft's boats at their real length x the train's 24x scale (Fixes #1094) (#1100)
Beri04e4f6e98208
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 51486e959..d07f1d071 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -80,6 +80,9 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIBoffered, 100% always (owner ruling of 19 Oct 2026 on #1011): the layout suites do not pass at 125% or 150% yet, sofor now the row offers 100% alone, and a saved 125% or 150% starts at 100% (the file keeps the choice).### Changed+- The map's code-built boats (SeaCraft's feluccas, cutters, moored fishing boats and Haifa's coastal steamer) are+ now their real length at the train's one 24x scale, like every other model: a felucca about 290 m (1.4 locomotive+ cars) where it was 2,040 m. Seen from 60 km off Jaffa they are white flecks a few pixels across (Fixes #1094).- The map pans left and right from the first frame (#1062, player report): the game opens at 90 km, not 120 km, underthe ~106 km where a 16:9 view is wider than the map and held centred (#174). A 21:9 window still opens centreduntil zoomed in a little.diff --git a/docs/visual-v1.md b/docs/visual-v1.mdindex f67cdce02..5c226f58f 100644--- a/docs/visual-v1.md+++ b/docs/visual-v1.md@@ -1645,8 +1645,9 @@ and the calm and swells are also behind `seatexture`.- Each hull, plus a margin, lies in open sea and meets no breakwater or mole piece. The kits now record each piece asa "breakwater" in the census. `SeaCraftTests.NoHullEverMeetsABreakwaterOrMole` sweeps five landmark scales and 16draws each.- - Sizes are symbolic, like the buildings: a felucca is 34 landmark metres (2 km at the default scale), a quarter of a- hex across, about promo 03's share.+ - Each boat is its real length x `SettlementKits.ModelScale` (the train's 24x, #1094): a felucca 12 m (about 290 m), a+ cutter 10, a moored fishing boat 8, the coastal steamer 50 (about 1,200 m). Design values, not sourced. Before #1094+ a felucca was 34 landmark metres (2 km at the default scale).- Every boat heads east or west, give or take 35 degrees, so the north-looking gameplay camera sees its sails side-on.- The sails are lit as cloth turned mostly to the sky (each face's normal tipped up by 0.7). Lit as flat plates, theface the camera saw was often the one turned from the sun, and the sails read grey.diff --git a/unity/Assets/Scripts/Map/Kits/SeaCraft.cs b/unity/Assets/Scripts/Map/Kits/SeaCraft.csindex 7265c113d..2205c8e14 100644--- a/unity/Assets/Scripts/Map/Kits/SeaCraft.cs+++ b/unity/Assets/Scripts/Map/Kits/SeaCraft.cs@@ -7,8 +7,8 @@ namespace Statecraft.Game.Map.Kits/// <summary>The boats on the Mediterranean, as promo 03 draws them (refs #388): white-sailed craft under way off the coast/// and craft moored in and off the harbours of Jaffa, Tel Aviv and Haifa. Craft of the period: lateen-rigged and/// gaff-rigged sailing and fishing boats, and a small coastal steamer at anchor off Haifa's breakwater; no motor- /// launches or modern craft. Like the buildings, sizes are symbolic: a felucca is drawn about a quarter of a hex across- /// (2 km at the default scale), as the promo's boats are, so it reads at the gameplay zoom. One static mesh under the+ /// launches or modern craft. Each boat is its real length at the one world scale of every model (SettlementKits.ModelScale,+ /// 24x, the owner on #1094): a 12 m felucca is about 290 m, 1.4 of the steam train's locomotive cars. One static mesh under the/// kits' root, drawn with Kit.mat, so the "kits" toggle covers it. Seeded: the same map draws the same boats.</summary>public static class SeaCraft{@@ -23,9 +23,10 @@ namespace Statecraft.Game.Map.Kitspublic Vector2 Forward { get { float a = Yaw * Mathf.Deg2Rad; return new Vector2(Mathf.Cos(a), Mathf.Sin(a)); } }}- /// <summary>Lengths in the kits' landmark metres (x KitScale.Landmarks): a felucca 34, a cutter 30, the steamer 46, a- /// moored boat 16; a felucca is about a quarter of a hex across at the default scale.</summary>- static float LengthOf(Kind k) => k switch { Kind.Felucca => 34f, Kind.Cutter => 30f, Kind.Steamer => 46f, _ => 16f } * KitScale.Landmarks;+ /// <summary>A boat's length (world m): its real length (design values for craft of the period, not sourced: a felucca+ /// 12 m, a cutter 10, the coastal steamer 50, a moored fishing boat 8; #1086's fishing boat is 10) times+ /// SettlementKits.ModelScale. Before #1094 they were the kits' landmark metres x 60, a felucca 2,040 m.</summary>+ static float LengthOf(Kind k) => k switch { Kind.Felucca => 12f, Kind.Cutter => 10f, Kind.Steamer => 50f, _ => 8f } * SettlementKits.ModelScale;/// <summary>The coasts the boats under way sail off: a point on the shore (lon, lat), the direction out to sea (world/// x, z) and how many boats. Jaffa's, Tel Aviv's and Haifa's are the points the settlement kits build those ports at@@ -69,7 +70,7 @@ namespace Statecraft.Game.Map.Kits{var kind = rnd.Value() < 0.6f ? Kind.Felucca : Kind.Cutter;float L = LengthOf(kind);- var c = s + seaward * rnd.Range(OffshoreNearM, OffshoreM) * m + along * rnd.Range(-2.2f, 2.2f) * L;+ var c = s + seaward * rnd.Range(OffshoreNearM, OffshoreM) * m + along * rnd.Range(-AlongM, AlongM) * m;var craft = new Craft(kind, c, Heading(ref rnd, 35f), L, place);if (!Clear(craft, ground, works, list, 0.5f * L) || NearPort(c, ports, 0.8f * L)) continue;list.Add(craft); put++;@@ -87,6 +88,11 @@ namespace Statecraft.Game.Map.Kits/// edge of the gameplay pose's view of the coast.</summary>internal const float OffshoreNearM = 2400f, OffshoreM = 7500f;+ /// <summary>How far along the coast either side of its point a boat under way may sail (world m at the default landmark+ /// scale): 2.2 felucca lengths when a felucca was 2,040 m, kept when the boats shrank to the train scale (#1094) so+ /// they still spread along the coast instead of bunching off its point.</summary>+ const float AlongM = 4500f;+/// <summary>A harbour's water as the settlement kits record it: Jaffa's a circle (its breakwater's centre and radius,/// SettlementKits.Port), Tel Aviv's and Haifa's a box (centre, width east-west, depth north-south). Returns how far/// <paramref name="q"/> lies outside it (0 inside).</summary>diff --git a/unity/Assets/Tests/EditMode/SeaCraftTests.cs b/unity/Assets/Tests/EditMode/SeaCraftTests.csindex 1ff16573f..e01047685 100644--- a/unity/Assets/Tests/EditMode/SeaCraftTests.cs+++ b/unity/Assets/Tests/EditMode/SeaCraftTests.cs@@ -39,7 +39,7 @@ public class SeaCraftTests/// <summary>About ten boats under way (feluccas and cutters, never a steamer) off the coast, two or more moored in or off/// each of the three harbours with Haifa's coastal steamer at anchor among them, every hull and its margin in open sea (not a rift lake),- /// no two boats overlapping, and promo 03's size: a sailing boat about a quarter of a hex across (0.15-0.5 allowed).</summary>+ /// no two boats overlapping.</summary>[Test]public void TheBoatsSailOffTheCoastAndMoorInTheHarbours(){@@ -52,8 +52,6 @@ public class SeaCraftTestsforeach (var port in new[] { "jaffa", "tel_aviv", "haifa" })Assert.GreaterOrEqual(crafts.Count(c => c.Place == port && (c.Kind == SeaCraft.Kind.Moored || c.Kind == SeaCraft.Kind.Steamer)), 2, port + ": moored craft");Assert.AreEqual(1, crafts.Count(c => c.Kind == SeaCraft.Kind.Steamer && c.Place == "haifa"), "one coastal steamer, at anchor off Haifa");- float hexAcross = Mathf.Sqrt(3f) * g.HexSizeM;- foreach (var c in under) Assert.That(c.Length / hexAcross, Is.InRange(0.15f, 0.5f), "a sailing boat at promo 03's size");foreach (var c in crafts){var f = c.Forward; var side = new Vector2(-f.y, f.x);@@ -67,6 +65,35 @@ public class SeaCraftTests}}+ /// <summary>Issue #1094 (the owner, 19 October 2026: "Yes, 24x like everything else"): every boat is its real length at+ /// the one world scale (SettlementKits.ModelScale, 24x: an 8.5 m house as long as the steam train's 204 m locomotive+ /// car), like #1086's 10 m fishing boat of about 1.2 cars: a 12 m felucca about 1.4 cars, a 10 m cutter about 1.2, an+ /// 8 m moored fishing boat about 0.9 and the 50 m coastal steamer about 5.9, where before a felucca was 2,040 m (10 cars),+ /// whatever the kits' landmark scale.</summary>+ [Test]+ public void EveryBoatIsItsRealLengthAtTheTrainScale()+ {+ var map = OpenMap();+ var crafts = Place(map, Ground(map));+ float car = Statecraft.Game.Map.Routes.RoadVehicles.LocomotiveCarM;+ Assert.AreEqual(204f, car, 1f, "the locomotive's car");+ var bands = new System.Collections.Generic.Dictionary<SeaCraft.Kind, (float lo, float hi)>+ {+ [SeaCraft.Kind.Felucca] = (1.2f, 1.6f), [SeaCraft.Kind.Cutter] = (1.0f, 1.35f),+ [SeaCraft.Kind.Moored] = (0.8f, 1.05f), [SeaCraft.Kind.Steamer] = (5f, 7f),+ };+ foreach (var kind in bands.Keys) Assert.IsTrue(crafts.Any(c => c.Kind == kind), $"the map has a {kind}");+ foreach (var c in crafts)+ {+ var (lo, hi) = bands[c.Kind];+ Assert.That(c.Length / car, Is.InRange(lo, hi), $"{c.Kind} at {c.Place}: {c.Length:0} m against the {car:0} m locomotive car");+ }+ // The one world scale, not the kits' landmark scale: at 120 the same kinds keep the same lengths.+ KitScale.CityBlocks = 120f;+ foreach (var c in Place(map, Ground(map)))+ Assert.AreEqual(crafts.First(o => o.Kind == c.Kind).Length, c.Length, 0.01f, $"{c.Kind} at landmark scale 120");+ }+/// <summary>Review of #536: no hull ever meets a harbour work. At five landmark scales (30-120, the default 60 among/// them) and 16 draws each (SeaCraft.Place's salt), no boat's rectangle (its length by 30% of it) overlaps a/// breakwater or mole piece the kits recorded at Jaffa, Tel Aviv or Haifa; the kits record some at each.</summary>