Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Map: open at 90 km so the map pans left and right from the first frame (Fixes #1062) (#1080)

Beria8cc3e0e49b6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d9322e6b..a67242799 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,6 +52,9 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
- Unit cards show the sourced Hebrew unit name in the Hebrew UI, with an English fallback. INS Haganah gains its
sourced Hebrew name, still flagged for a native speaker's review (#902).
### Changed
+- The map pans left and right from the first frame (#1062, player report): the game opens at 90 km, not 120 km, under
+ the ~106 km where a 16:9 view is wider than the map and held centred (#174). A 21:9 window still opens centred
+ until zoomed in a little.
- Content: every option that did not happen now says who proposed it, with sources, or that it is a design assumption
(R-ALT-004; refs #949, #939). The 30 records are copied from the owner-checked
`research_notes/Alternate timelines/roads-checked.md` with the owner's road rulings of 18 October 2026: roads 1, 22
diff --git a/unity/Assets/Map.unity b/unity/Assets/Map.unity
index 4050fc929..b05ba8eb5 100644
--- a/unity/Assets/Map.unity
+++ b/unity/Assets/Map.unity
@@ -531,7 +531,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Statecraft.Game::Statecraft.Game.Map.CameraRig
LookAt: {x: 0, y: 0, z: 0}
- Distance: 120000
+ Distance: 90000
Yaw: 0
--- !u!81 &1996827303
AudioListener:
diff --git a/unity/Assets/Scripts/Map/CameraRig.cs b/unity/Assets/Scripts/Map/CameraRig.cs
index 55732da77..1e1861014 100644
--- a/unity/Assets/Scripts/Map/CameraRig.cs
+++ b/unity/Assets/Scripts/Map/CameraRig.cs
@@ -11,7 +11,9 @@ namespace Statecraft.Game.Map
public sealed class CameraRig : MonoBehaviour
{
public const float Pitch = 50f, Fov = 35f;
- public Vector3 LookAt; public float Distance = 120000f; public float Yaw;
+ // The opening zoom: under the ~106 km where a 16:9 view grows wider than the map and CameraController centres it
+ // (issue #1062: at 120 km the map could not be panned left or right).
+ public Vector3 LookAt; public float Distance = 90000f; public float Yaw;
/// <summary>Share of the screen height (0..1) the UI covers at the top. The view is shifted so LookAt sits in the
/// middle of the map area below it (an off-centre frustum: picking rays and WorldToScreenPoint follow it).</summary>
public float TopInset;
diff --git a/unity/Assets/Scripts/Map/PromoPose.cs b/unity/Assets/Scripts/Map/PromoPose.cs
index 018c82bcd..bb965a60b 100644
--- a/unity/Assets/Scripts/Map/PromoPose.cs
+++ b/unity/Assets/Scripts/Map/PromoPose.cs
@@ -44,7 +44,7 @@ namespace Statecraft.Game.Map
/// <summary>Issue #659: the other town types up close, for the main / branch captures the issue's done-when asks for:
/// Jerusalem and Haifa at 12 km, the moshava Rishon LeZion (its b23 winery) and the Arab town Nazareth at 8 km, the
/// kibbutz Degania Alef and the moshav Nahalal at 6 km, each over its settlements_1948.yaml point; and start120, the
- /// 120 km starting distance over the centre, where #917's whole-town landmarks draw and the kits do. Capture poses
+ /// README map's 120 km over the centre, where #917's whole-town landmarks draw and the kits do. Capture poses
/// only: VisualShots shoots them after CloseUps; FrameProfile and the model tests keep to CloseUps (a kibbutz at 6 km
/// holds fewer models than their floors).</summary>
public static IReadOnlyList<PromoPose> TownChecks { get; } = new[]
diff --git a/unity/Assets/Tests/EditMode/CameraInputTests.cs b/unity/Assets/Tests/EditMode/CameraInputTests.cs
index 3de69b88e..ebda2e24a 100644
--- a/unity/Assets/Tests/EditMode/CameraInputTests.cs
+++ b/unity/Assets/Tests/EditMode/CameraInputTests.cs
@@ -265,6 +265,42 @@ public class CameraInputTests
finally { Object.DestroyImmediate(rig.gameObject); }
}
+ /// <summary>Issue #1062 (player report): at the distance the game opens at (Map.unity's camera rig; MapScene.Build keeps
+ /// it), a 16:9 view (1280x720, 1920x1080) is narrower than the map, so the arrow keys and a right-drag pan it east and
+ /// west from the first frame, with or without the top bar's inset; panning on still stops where #174 stops it.</summary>
+ [Test]
+ public void AtTheOpeningZoomTheMapPansLeftAndRight()
+ {
+ UnityEditor.SceneManagement.EditorSceneManager.OpenScene("Assets/Map.unity", UnityEditor.SceneManagement.OpenSceneMode.Single);
+ float opening = Camera.main.GetComponent<CameraRig>().Distance;
+ UnityEditor.SceneManagement.EditorSceneManager.NewScene(UnityEditor.SceneManagement.NewSceneSetup.EmptyScene,
+ UnityEditor.SceneManagement.NewSceneMode.Single);
+ var rig = new GameObject("RigTest", typeof(Camera)).AddComponent<CameraRig>();
+ try
+ {
+ // A rig MapScene adds itself (a camera without one) opens there too.
+ Assert.AreEqual(opening, rig.Distance, "the rig's default is the scene's opening distance");
+ var cam = rig.GetComponent<Camera>(); cam.aspect = 16f / 9f; cam.fieldOfView = CameraRig.Fov; // the game's view (Init is not run here)
+ foreach (var inset in new[] { 0f, 0.1f })
+ foreach (var (input, east) in new[]
+ {
+ (new CameraInput { Pan = Vector2.right }, 0.08f), (new CameraInput { Pan = Vector2.left }, -0.08f), // 0.8 distances a second for 0.1 s
+ (new CameraInput { DragPan = new Vector2(-50f, 0f) }, 0.06f), (new CameraInput { DragPan = new Vector2(50f, 0f) }, -0.06f),
+ })
+ {
+ var what = $"inset {inset}, pan {input.Pan}, drag {input.DragPan}";
+ rig.LookAt = new Vector3(RealMap.center.x, 0, RealMap.center.y); rig.Distance = opening; rig.Yaw = 0; rig.TopInset = inset;
+ CameraController.Step(rig, default, 0f, RealMap);
+ float x = rig.LookAt.x;
+ CameraController.Step(rig, input, 0.1f, RealMap);
+ Assert.AreEqual(x + east * opening, rig.LookAt.x, 1f, what + ": the view moves sideways");
+ for (int i = 0; i < 40; i++) CameraController.Step(rig, input, 0.1f, RealMap);
+ AssertViewOnMap(rig, RealMap, what + ", panned on");
+ }
+ }
+ finally { Object.DestroyImmediate(rig.gameObject); }
+ }
+
/// <summary>Issue #174: over low ground the look-at point stays on y = 0 (the approved framing); over ground high enough
/// to come within MinClearanceShare of the camera, it is lifted just enough, and dropped again on the way back down.</summary>
[Test]
diff --git a/unity/Assets/Tests/EditMode/TiltShiftTests.cs b/unity/Assets/Tests/EditMode/TiltShiftTests.cs
index 4011c98b8..836c42828 100644
--- a/unity/Assets/Tests/EditMode/TiltShiftTests.cs
+++ b/unity/Assets/Tests/EditMode/TiltShiftTests.cs
@@ -94,7 +94,7 @@ public class TiltShiftTests
public void TheFarBandIsLighterAtTheGameplayZoom()
{
Assert.AreEqual(TiltShift.FarGameplayStrength, TiltShift.FarStrength(PromoPose.Gameplay03.Distance), 1e-6f);
- Assert.AreEqual(TiltShift.FarGameplayStrength, TiltShift.FarStrength(120000f), 1e-6f, "CameraRig's starting zoom");
+ Assert.AreEqual(TiltShift.FarGameplayStrength, TiltShift.FarStrength(90000f), 1e-6f, "CameraRig's starting zoom");
Assert.AreEqual(1f, TiltShift.FarStrength(CameraController.MaxDistance), 1e-6f, "the overview keeps it in full");
Assert.Less(TiltShift.FarStrength(200000f), 1f); Assert.Greater(TiltShift.FarStrength(200000f), TiltShift.FarGameplayStrength);
var p = TiltShift.Params(0.09f, 60000f);
@@ -109,7 +109,7 @@ public class TiltShiftTests
{
Assert.That(TiltShift.NearGameplayStrength, Is.InRange(0.5f, 0.9f), "lighter than before, but a tilt-shift");
Assert.AreEqual(TiltShift.NearGameplayStrength, TiltShift.NearStrength(PromoPose.Gameplay03.Distance), 1e-6f);
- Assert.AreEqual(TiltShift.NearGameplayStrength, TiltShift.NearStrength(120000f), 1e-6f, "CameraRig's starting zoom");
+ Assert.AreEqual(TiltShift.NearGameplayStrength, TiltShift.NearStrength(90000f), 1e-6f, "CameraRig's starting zoom");
Assert.AreEqual(0f, TiltShift.NearStrength(CameraController.MaxDistance), 1e-6f, "none at the overview");
Assert.Less(TiltShift.NearStrength(200000f), TiltShift.NearGameplayStrength); Assert.Greater(TiltShift.NearStrength(200000f), 0f);
Assert.AreEqual(0.35f, TiltShift.FarGameplayStrength, "the far band is the #390 ruling's");
@@ -180,9 +180,9 @@ public class TiltShiftTests
}
/// <summary>Issue #390, the owner's ruling (2026-10-13): a lighter tilt-shift at the gameplay zoom, so the far towns and
- /// tokens stay readable, as on promo 03, whose far edge is only gently soft. At gameplay03 (60 km) and at the
- /// starting zoom (CameraRig's 120 km, the README map), under the web tier's top bar, the far band keeps at least 60% of
- /// its local contrast (4abb64f kept 14-25%: a smear). Promo 03's far band, measured against its own focus band and
+ /// tokens stay readable, as on promo 03, whose far edge is only gently soft. At gameplay03 (60 km), the starting zoom
+ /// (CameraRig's 90 km, #1062) and the README map's 120 km, under the web tier's top bar, the far band keeps at least
+ /// 60% of its local contrast (4abb64f kept 14-25%: a smear). Promo 03's far band, measured against its own focus band and
/// compared with the same ratio on a sharp frame of ours, keeps about 37%, so 60% is at least as readable.</summary>
[UnityTest]
public IEnumerator TheFarBandStaysReadableAtTheGameplayZoom()
@@ -193,7 +193,7 @@ public class TiltShiftTests
var cam = Camera.main; var rig = cam.GetComponent<CameraRig>();
try
{
- foreach (var distance in new[] { PromoPose.Gameplay03.Distance, 120000f }) // 120 km: CameraRig's starting zoom
+ foreach (var distance in new[] { PromoPose.Gameplay03.Distance, 90000f, 120000f }) // 90 km: CameraRig's starting zoom; 120 km: the README map
{
PromoPose.Gameplay03.Apply(rig, map.Frame); rig.Distance = distance; rig.TopInset = 0.09f; rig.Apply();
TiltShift.Enabled = false; var sharp = RenderSample.Render(cam, 960, 540);
diff --git a/unity/Assets/Tests/EditMode/TownLandmarksTests.cs b/unity/Assets/Tests/EditMode/TownLandmarksTests.cs
index 5ee5ef870..d42b586d6 100644
--- a/unity/Assets/Tests/EditMode/TownLandmarksTests.cs
+++ b/unity/Assets/Tests/EditMode/TownLandmarksTests.cs
@@ -187,7 +187,7 @@ public class TownLandmarksTests
/// <summary>The swap with #700's building models: the landmarks draw where TownModelLayer draws the kits' far view and
/// hide where it draws the building models (TownModelLayer.CloseAt: in below CloseEnterM, out above CloseExitM), with
- /// the same hysteresis, at the start view (120 km), the gameplay view (60 km), both sides of the band and the closest
+ /// the same hysteresis, at the start view (90 km), the gameplay view (60 km), both sides of the band and the closest
/// zoom.</summary>
[Test]
public void TheLandmarksSwapWithTheBuildingModelsAtTheThreshold()
@@ -201,7 +201,7 @@ public class TownLandmarksTests
var tel = map.KitFootprints.First(f => f.id == "tel_aviv").centre;
foreach (var (d, close, why) in new[]
{
- (120000f, false, "the start view"), (60000f, false, "the gameplay view"),
+ (90000f, false, "the start view"), (60000f, false, "the gameplay view"),
(TownModelLayer.CloseEnterM + 1000f, false, "inside the band, coming in"), (TownModelLayer.CloseEnterM - 1000f, true, "past the threshold"),
(TownModelLayer.CloseExitM - 2000f, true, "inside the band, going out"), (TownModelLayer.CloseExitM + 1000f, false, "out of the band"),
(CameraController.MinDistance, true, "the closest zoom"),