feat: migrate simulation to physically-based unit system
Replace arbitrary game units with real-world measurements throughout the simulation and viewer: planet orbits in AU, sizes in km, galaxy positions in light-years. Add SimulationUnits helpers for conversions, separate WarpSpeed from FtlSpeed for ships, fix FTL transit progress to use galaxy-space distances, overhaul Lagrange point placement with Hill sphere approximation, and update the viewer to scale and format all distances correctly. Ships in FTL transit now render in galaxy view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,53 @@
|
||||
{
|
||||
"initialStations": [
|
||||
{ "constructibleId": "station-core", "systemId": "helios", "planetIndex": 2, "lagrangeSide": -1 }
|
||||
{
|
||||
"constructibleId": "station-core",
|
||||
"systemId": "helios",
|
||||
"planetIndex": 2,
|
||||
"lagrangeSide": -1
|
||||
}
|
||||
],
|
||||
"shipFormations": [
|
||||
{ "shipId": "constructor", "count": 1, "center": [45, 0, 20], "systemId": "helios" },
|
||||
{ "shipId": "miner", "count": 1, "center": [52, 0, 24], "systemId": "helios" },
|
||||
{ "shipId": "gas-miner", "count": 1, "center": [60, 0, 28], "systemId": "helios" }
|
||||
{
|
||||
"shipId": "constructor",
|
||||
"count": 1,
|
||||
"center": [
|
||||
45,
|
||||
0,
|
||||
20
|
||||
],
|
||||
"systemId": "helios"
|
||||
},
|
||||
{
|
||||
"shipId": "miner",
|
||||
"count": 1,
|
||||
"center": [
|
||||
52,
|
||||
0,
|
||||
24
|
||||
],
|
||||
"systemId": "helios"
|
||||
},
|
||||
{
|
||||
"shipId": "gas-miner",
|
||||
"count": 1,
|
||||
"center": [
|
||||
60,
|
||||
0,
|
||||
28
|
||||
],
|
||||
"systemId": "helios"
|
||||
},
|
||||
{
|
||||
"shipId": "gas-miner",
|
||||
"count": 1,
|
||||
"center": [
|
||||
60,
|
||||
0,
|
||||
32
|
||||
],
|
||||
"systemId": "helios"
|
||||
}
|
||||
],
|
||||
"patrolRoutes": [],
|
||||
"miningDefaults": {
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
"label": "Vanguard Frigate",
|
||||
"role": "military",
|
||||
"shipClass": "frigate",
|
||||
"speed": 50,
|
||||
"ftlSpeed": 3200,
|
||||
"speed": 120000,
|
||||
"warpSpeed": 0.22,
|
||||
"ftlSpeed": 0.75,
|
||||
"spoolTime": 2.2,
|
||||
"cargoCapacity": 0,
|
||||
"color": "#7ed4ff",
|
||||
@@ -19,8 +20,9 @@
|
||||
"label": "Bulwark Destroyer",
|
||||
"role": "military",
|
||||
"shipClass": "destroyer",
|
||||
"speed": 34,
|
||||
"ftlSpeed": 2900,
|
||||
"speed": 95000,
|
||||
"warpSpeed": 0.18,
|
||||
"ftlSpeed": 0.68,
|
||||
"spoolTime": 2.8,
|
||||
"cargoCapacity": 0,
|
||||
"color": "#ff8f70",
|
||||
@@ -34,8 +36,9 @@
|
||||
"label": "Aegis Cruiser",
|
||||
"role": "military",
|
||||
"shipClass": "cruiser",
|
||||
"speed": 28,
|
||||
"ftlSpeed": 2750,
|
||||
"speed": 85000,
|
||||
"warpSpeed": 0.16,
|
||||
"ftlSpeed": 0.62,
|
||||
"spoolTime": 3.1,
|
||||
"cargoCapacity": 0,
|
||||
"color": "#9ec1ff",
|
||||
@@ -49,8 +52,9 @@
|
||||
"label": "Citadel Carrier",
|
||||
"role": "military",
|
||||
"shipClass": "capital",
|
||||
"speed": 18,
|
||||
"ftlSpeed": 2500,
|
||||
"speed": 60000,
|
||||
"warpSpeed": 0.12,
|
||||
"ftlSpeed": 0.5,
|
||||
"spoolTime": 4.1,
|
||||
"cargoCapacity": 0,
|
||||
"color": "#c6f4ff",
|
||||
@@ -66,8 +70,9 @@
|
||||
"label": "Atlas Hauler",
|
||||
"role": "transport",
|
||||
"shipClass": "industrial",
|
||||
"speed": 22,
|
||||
"ftlSpeed": 2600,
|
||||
"speed": 70000,
|
||||
"warpSpeed": 0.14,
|
||||
"ftlSpeed": 0.55,
|
||||
"spoolTime": 3.3,
|
||||
"cargoCapacity": 180,
|
||||
"cargoKind": "bulk-liquid",
|
||||
@@ -83,8 +88,9 @@
|
||||
"label": "Pioneer Constructor",
|
||||
"role": "construction",
|
||||
"shipClass": "industrial",
|
||||
"speed": 20,
|
||||
"ftlSpeed": 2200,
|
||||
"speed": 65000,
|
||||
"warpSpeed": 0.13,
|
||||
"ftlSpeed": 0.48,
|
||||
"spoolTime": 3.5,
|
||||
"cargoCapacity": 160,
|
||||
"cargoKind": "manufactured",
|
||||
@@ -100,8 +106,9 @@
|
||||
"label": "Prospector Miner",
|
||||
"role": "mining",
|
||||
"shipClass": "industrial",
|
||||
"speed": 26,
|
||||
"ftlSpeed": 2400,
|
||||
"speed": 75000,
|
||||
"warpSpeed": 0.15,
|
||||
"ftlSpeed": 0.5,
|
||||
"spoolTime": 3.1,
|
||||
"cargoCapacity": 120,
|
||||
"cargoKind": "bulk-solid",
|
||||
@@ -117,8 +124,9 @@
|
||||
"label": "Nimbus Gas Harvester",
|
||||
"role": "mining",
|
||||
"shipClass": "industrial",
|
||||
"speed": 24,
|
||||
"ftlSpeed": 2350,
|
||||
"speed": 72000,
|
||||
"warpSpeed": 0.145,
|
||||
"ftlSpeed": 0.49,
|
||||
"spoolTime": 3.2,
|
||||
"cargoCapacity": 120,
|
||||
"cargoKind": "bulk-gas",
|
||||
|
||||
@@ -5,45 +5,45 @@
|
||||
"position": [0, 0, 0],
|
||||
"starColor": "#ffd27a",
|
||||
"starGlow": "#ffb14a",
|
||||
"starSize": 56,
|
||||
"starSize": 720000,
|
||||
"gravityWellRadius": 210,
|
||||
"asteroidField": {
|
||||
"decorationCount": 180,
|
||||
"radiusOffset": 330,
|
||||
"radiusVariance": 90,
|
||||
"heightVariance": 18
|
||||
"radiusOffset": 330000,
|
||||
"radiusVariance": 90000,
|
||||
"heightVariance": 18000
|
||||
},
|
||||
"resourceNodes": [],
|
||||
"planets": [
|
||||
{ "label": "Icarus", "orbitRadius": 180, "orbitSpeed": 0.18, "size": 20, "color": "#d4a373", "tilt": 0.2 },
|
||||
{ "label": "Viridia", "orbitRadius": 300, "orbitSpeed": 0.11, "size": 30, "color": "#58a36c", "tilt": -0.4 },
|
||||
{ "label": "Aster", "orbitRadius": 460, "orbitSpeed": 0.08, "size": 38, "color": "#6ea7d4", "tilt": 0.3, "hasRing": true },
|
||||
{ "label": "Noctis", "orbitRadius": 670, "orbitSpeed": 0.05, "size": 50, "color": "#6958a8", "tilt": -0.15 }
|
||||
{ "label": "Icarus", "orbitRadius": 0.36, "orbitSpeed": 0.5093, "size": 4200, "color": "#d4a373", "tilt": 0.2 },
|
||||
{ "label": "Viridia", "orbitRadius": 0.60, "orbitSpeed": 0.2366, "size": 6200, "color": "#58a36c", "tilt": -0.4 },
|
||||
{ "label": "Aster", "orbitRadius": 0.92, "orbitSpeed": 0.1246, "size": 7800, "color": "#6ea7d4", "tilt": 0.3, "hasRing": true },
|
||||
{ "label": "Noctis", "orbitRadius": 1.34, "orbitSpeed": 0.0710, "size": 11200, "color": "#6958a8", "tilt": -0.15 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perseus",
|
||||
"label": "Perseus Gate",
|
||||
"position": [4400, 0, 620],
|
||||
"position": [4.4, 0, 0.62],
|
||||
"starColor": "#9dc6ff",
|
||||
"starGlow": "#66a0ff",
|
||||
"starSize": 48,
|
||||
"starSize": 930000,
|
||||
"gravityWellRadius": 230,
|
||||
"asteroidField": {
|
||||
"decorationCount": 180,
|
||||
"radiusOffset": 330,
|
||||
"radiusVariance": 90,
|
||||
"heightVariance": 18
|
||||
"radiusOffset": 330000,
|
||||
"radiusVariance": 90000,
|
||||
"heightVariance": 18000
|
||||
},
|
||||
"resourceNodes": [
|
||||
{ "angle": 0.45, "radiusOffset": 360, "oreAmount": 3000, "itemId": "ore", "shardCount": 7 },
|
||||
{ "angle": 2.544395102, "radiusOffset": 360, "oreAmount": 3000, "itemId": "ore", "shardCount": 7 },
|
||||
{ "angle": 4.638790205, "radiusOffset": 360, "oreAmount": 3000, "itemId": "ore", "shardCount": 7 }
|
||||
{ "angle": 0.45, "radiusOffset": 180000, "oreAmount": 3000, "itemId": "ore", "shardCount": 7 },
|
||||
{ "angle": 2.544395102, "radiusOffset": 180000, "oreAmount": 3000, "itemId": "ore", "shardCount": 7 },
|
||||
{ "angle": 4.638790205, "radiusOffset": 180000, "oreAmount": 3000, "itemId": "ore", "shardCount": 7 }
|
||||
],
|
||||
"planets": [
|
||||
{ "label": "Talos", "orbitRadius": 200, "orbitSpeed": 0.15, "size": 24, "color": "#c48f6a", "tilt": 0.18 },
|
||||
{ "label": "Cygnus", "orbitRadius": 360, "orbitSpeed": 0.1, "size": 34, "color": "#4f84c4", "tilt": -0.22, "hasRing": true },
|
||||
{ "label": "Rhea", "orbitRadius": 540, "orbitSpeed": 0.07, "size": 44, "color": "#8f8fb0", "tilt": 0.08 }
|
||||
{ "label": "Talos", "orbitRadius": 0.40, "orbitSpeed": 0.4348, "size": 5000, "color": "#c48f6a", "tilt": 0.18 },
|
||||
{ "label": "Cygnus", "orbitRadius": 0.72, "orbitSpeed": 0.1800, "size": 6900, "color": "#4f84c4", "tilt": -0.22, "hasRing": true },
|
||||
{ "label": "Rhea", "orbitRadius": 1.08, "orbitSpeed": 0.0981, "size": 9600, "color": "#8f8fb0", "tilt": 0.08 }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user