diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c844098 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Uu]ser[Ss]ettings/ +/[Mm]emoryCaptures/ +/[Rr]ecordings/ +/.vs/ +/.idea/ +*.csproj +*.sln +*.user +*.pidb +*.booproj +*.opendb +*.VC.db +.DS_Store +.directory diff --git a/Assets/Soundings.meta b/Assets/Soundings.meta new file mode 100644 index 0000000..eb2ec75 --- /dev/null +++ b/Assets/Soundings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: abc846aee2c0aa04092d0ec8890324df +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Editor.meta b/Assets/Soundings/Editor.meta new file mode 100644 index 0000000..3d2e591 --- /dev/null +++ b/Assets/Soundings/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d27d8335f3c6532d95eca9a086c6854 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Editor/EconomyVerification.cs b/Assets/Soundings/Editor/EconomyVerification.cs new file mode 100644 index 0000000..151e079 --- /dev/null +++ b/Assets/Soundings/Editor/EconomyVerification.cs @@ -0,0 +1,117 @@ +using System; +using UnityEngine; + +namespace Soundings.Editor +{ + public static class EconomyVerification + { + public static void Run() + { + VerifyUsedStartAndProfit(); + VerifyFinancedStartAndConstruction(); + VerifyFlagshipCampaign(); + Debug.Log("Soundings economy verification passed: both starts, pricing, fuel, accounting, saves and flagship progression."); + } + + private static void VerifyUsedStartAndProfit() + { + Company company = Company.Start(false); + Ship ship = company.ActiveShip; + Require(company.Cash == 135000 && company.Debt == 0 && ship.Capacity == 256, "used start"); + Require(company.Forecast(ship, -1) == null, "disconnected route"); + Voyage standard = company.Forecast(ship, 1); + ship.Fare = 900; + Require(company.Forecast(ship, 1).Guests < standard.Guests, "price elasticity"); + ship.Fare = standard.Fare; + Require(company.Sail(ship, 3) != null && ship.Port == 0 && company.Day == 1, "permit gate"); + Require(company.Sail(ship, 1) == null, "first Caribbean sailing"); + Require(ship.Port == 1 && company.Day == standard.Day && company.Cash == 135000 + standard.CashChange, "voyage settlement"); + Require(ship.Fuel == 48 - standard.FuelBurn && company.LifetimeProfit == standard.NetIncome, "consumed fuel accounting"); + Require(Market.FuelPrice(1, company.Day) > Market.FuelPrice(0, company.Day), "foreign fuel market"); + int price = Market.FuelPrice(1, company.Day); + int priorCash = company.Cash; + double priorValue = ship.FuelValue; + Require(company.Refuel(ship, 10) == null && company.Cash == priorCash - price * 10, "local fuel purchase cash"); + Require(Math.Abs(ship.FuelValue - priorValue - price * 10) < .01, "fuel inventory average cost"); + Company loaded = JsonUtility.FromJson(JsonUtility.ToJson(company)); + Require(loaded.CanLoad() && loaded.History[0].CashChange == standard.CashChange && loaded.ActiveShip.Port == 1, "save round-trip"); + Require(company.Permit(2) == null && company.Permits[2], "permit purchase"); + Require(company.Acquire(0, true, null) == null && company.Fleet.Count == 2 && ship.Port == 1, "used fleet expansion"); + } + + private static void VerifyFinancedStartAndConstruction() + { + Company company = Company.Start(true); + Require(company.Cash == 580000 && company.Debt == 500000 && company.ActiveShip == null, "financed start"); + Require(company.ShipyardBlock(1, false) != null && company.ShipyardBlock(2, false) != null, "shipyard progression gates"); + Require(company.Acquire(0, false, "Peregrine") == null, "commission hull"); + Ship ship = company.ActiveShip; + Require(company.AddDeck(ship) == null && company.AddDeck(ship) != null, "deck limits"); + Require(company.Sail(ship, 1) != null, "empty ship cannot sail"); + for (int i = 0; i < 8; i++) + Require(company.Build(ship, 0, i, Facility.Cabin) == null, "cabin construction"); + Require(company.Build(ship, 0, 0, Facility.Dining) != null, "occupied berth rejection"); + Require(company.Build(ship, 1, 0, Facility.Dining) == null && company.Build(ship, 1, 1, Facility.Dining) == null, "dining construction"); + Require(company.Build(ship, 1, 2, Facility.Tank) == null, "tank construction"); + Voyage quote = company.Forecast(ship, 1); + int cash = company.Cash; + Require(company.Sail(ship, 1) != null && company.Cash == cash && company.Day == 1, "under-fueled voyage is atomic"); + Require(company.Refuel(ship, quote.RequiredFuel - 1) == null && company.Sail(ship, 1) != null, "reserve enforced"); + Require(company.Refuel(ship, 1) == null && ship.SafeRange >= quote.Miles, "range matches reserve"); + Require(company.Sail(ship, 1) == null && company.Debt == 500000 - quote.Principal && quote.LoanInterest > 0, "debt amortization"); + Require(company.Refuel(ship, ship.Tank - ship.Fuel) == null && company.Build(ship, 1, 2, Facility.Empty) != null, "cannot discard loaded tank"); + Require(company.PayDownDebt() == null, "voluntary debt payment"); + } + + private static void VerifyFlagshipCampaign() + { + Company company = Company.Start(false); + Ship starter = company.ActiveShip; + for (int i = 0; i < 18; i++) + Complete(company, starter, 1 - starter.Port); + Require(company.ShipyardBlock(2, false) == null, "flagship affordable after a run of profitable voyages"); + Require(company.Acquire(2, false, "Blue Meridian") == null, "commission flagship"); + Ship ship = company.ActiveShip; + for (int i = 0; i < 20; i++) + Require(company.Build(ship, 0, i, Facility.Cabin) == null, "flagship berths"); + for (int i = 0; i < 5; i++) + Require(company.Build(ship, 1, i, Facility.Dining) == null, "flagship dining"); + for (int i = 5; i < 9; i++) + Require(company.Build(ship, 1, i, Facility.Entertainment) == null, "flagship show capacity"); + Require(company.Build(ship, 1, 9, Facility.Tank) == null, "flagship range upgrade"); + Require(company.Permit(Market.Bermuda) == null && company.Permit(Market.Lisbon) == null, "Atlantic access"); + ship.Fare = 1050; + Complete(company, ship, Market.Bermuda); + ship.Fare = 1750; + Complete(company, ship, Market.Lisbon); + Require(company.Flagship && company.History[0].NetIncome > 0 && company.CanLoad(), "end-to-end flagship milestone"); + Debug.Log($"Flagship reference run reached Lisbon on day {company.Day} with ${company.Cash:N0} cash."); + + for (int port = Market.StarterPortCount; port < Market.Ports.Count; port++) + { + Require(company.Permit(port) == null, "global port permit"); + ship.Fare = 400 + 170 * company.Forecast(ship, port).Days; + Complete(company, ship, port); + } + ship.Fare = 1100; + Complete(company, ship, 0); + Require(ship.Port == 0 && company.Cash > 0 && company.CanLoad(), "completed a global circuit"); + Debug.Log($"Global circuit returned to Miami on day {company.Day} with ${company.Cash:N0} cash."); + } + + private static void Complete(Company company, Ship ship, int destination) + { + Voyage quote = company.Forecast(ship, destination); + int missing = quote.RequiredFuel - ship.Fuel; + if (missing > 0) + Require(company.Refuel(ship, missing) == null, "bunker for campaign voyage"); + Require(company.Sail(ship, destination) == null, "complete campaign voyage"); + } + + private static void Require(bool condition, string description) + { + if (!condition) + throw new InvalidOperationException("Economy verification failed: " + description); + } + } +} diff --git a/Assets/Soundings/Editor/EconomyVerification.cs.meta b/Assets/Soundings/Editor/EconomyVerification.cs.meta new file mode 100644 index 0000000..ecb2021 --- /dev/null +++ b/Assets/Soundings/Editor/EconomyVerification.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: cb8eb982cc3e724feb00ad602f1295c1 \ No newline at end of file diff --git a/Assets/Soundings/Editor/SoundingsBuild.cs b/Assets/Soundings/Editor/SoundingsBuild.cs new file mode 100644 index 0000000..42879bd --- /dev/null +++ b/Assets/Soundings/Editor/SoundingsBuild.cs @@ -0,0 +1,68 @@ +using System; +using System.IO; +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Build.Reporting; +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace Soundings.Editor +{ + public static class SoundingsBuild + { + private const string ScenePath = "Assets/Soundings/Scenes/Soundings.unity"; + + public static void Configure() + { + if (!File.Exists(ScenePath)) + { + var scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single); + if (!EditorSceneManager.SaveScene(scene, ScenePath)) + throw new BuildFailedException("Could not save the Soundings scene."); + } + + EditorBuildSettings.scenes = new[] { new EditorBuildSettingsScene(ScenePath, true) }; + PlayerSettings.companyName = "Soundings"; + PlayerSettings.productName = "Soundings"; + PlayerSettings.bundleVersion = "0.1.0"; + PlayerSettings.defaultScreenWidth = 1600; + PlayerSettings.defaultScreenHeight = 900; + PlayerSettings.fullScreenMode = FullScreenMode.Windowed; + PlayerSettings.resizableWindow = true; + PlayerSettings.runInBackground = true; + PlayerSettings.SetApplicationIdentifier(NamedBuildTarget.Standalone, "game.soundings.simulator"); + PlayerSettings.SetScriptingBackend(NamedBuildTarget.Standalone, ScriptingImplementation.Mono2x); + PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat.Disabled; + PlayerSettings.WebGL.template = "PROJECT:Soundings"; + AssetDatabase.SaveAssets(); + } + + public static void VerifyAndBuild() + { + Configure(); + EconomyVerification.Run(); + Build(); + } + + public static void Build() => BuildTargetPlayer(EditorUserBuildSettings.activeBuildTarget); + + private static void BuildTargetPlayer(BuildTarget target) + { + string output = Environment.GetEnvironmentVariable("SOUNDINGS_BUILD_PATH"); + if (string.IsNullOrEmpty(output)) + throw new BuildFailedException("Set SOUNDINGS_BUILD_PATH to the output file (native) or directory (WebGL)."); + string directory = Path.GetDirectoryName(Path.GetFullPath(output)); + Directory.CreateDirectory(directory); + BuildReport report = BuildPipeline.BuildPlayer(new BuildPlayerOptions + { + scenes = new[] { ScenePath }, + target = target, + locationPathName = output, + options = BuildOptions.None + }); + if (report.summary.result != BuildResult.Succeeded) + throw new BuildFailedException($"Soundings build failed: {report.summary.result}."); + Debug.Log($"Built Soundings for {target}: {report.summary.totalSize:N0} bytes at {output}."); + } + } +} diff --git a/Assets/Soundings/Editor/SoundingsBuild.cs.meta b/Assets/Soundings/Editor/SoundingsBuild.cs.meta new file mode 100644 index 0000000..41ef957 --- /dev/null +++ b/Assets/Soundings/Editor/SoundingsBuild.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: dc4f07bece3528022b87b86f02188032 \ No newline at end of file diff --git a/Assets/Soundings/Resources.meta b/Assets/Soundings/Resources.meta new file mode 100644 index 0000000..1bcb902 --- /dev/null +++ b/Assets/Soundings/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42715cd120639188198a5564d54d4953 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Art.meta b/Assets/Soundings/Resources/Art.meta new file mode 100644 index 0000000..946ef07 --- /dev/null +++ b/Assets/Soundings/Resources/Art.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa1059e890605c9b0a52b1cfe8e1ad3b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Art/FlagshipTitle.png b/Assets/Soundings/Resources/Art/FlagshipTitle.png new file mode 100644 index 0000000..8b706ad Binary files /dev/null and b/Assets/Soundings/Resources/Art/FlagshipTitle.png differ diff --git a/Assets/Soundings/Resources/Art/FlagshipTitle.png.meta b/Assets/Soundings/Resources/Art/FlagshipTitle.png.meta new file mode 100644 index 0000000..44fb500 --- /dev/null +++ b/Assets/Soundings/Resources/Art/FlagshipTitle.png.meta @@ -0,0 +1,132 @@ +fileFormatVersion: 2 +guid: e01c46595e8600400a97111226d3c524 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 4096 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Art/HarborPlate.png b/Assets/Soundings/Resources/Art/HarborPlate.png new file mode 100644 index 0000000..460471f Binary files /dev/null and b/Assets/Soundings/Resources/Art/HarborPlate.png differ diff --git a/Assets/Soundings/Resources/Art/HarborPlate.png.meta b/Assets/Soundings/Resources/Art/HarborPlate.png.meta new file mode 100644 index 0000000..4a38424 --- /dev/null +++ b/Assets/Soundings/Resources/Art/HarborPlate.png.meta @@ -0,0 +1,132 @@ +fileFormatVersion: 2 +guid: 698e381f301f3c6f28a45bc5bdbd1aff +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 4096 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Art/IberianHarbor.png b/Assets/Soundings/Resources/Art/IberianHarbor.png new file mode 100644 index 0000000..2ac31cf Binary files /dev/null and b/Assets/Soundings/Resources/Art/IberianHarbor.png differ diff --git a/Assets/Soundings/Resources/Art/IberianHarbor.png.meta b/Assets/Soundings/Resources/Art/IberianHarbor.png.meta new file mode 100644 index 0000000..dbea411 --- /dev/null +++ b/Assets/Soundings/Resources/Art/IberianHarbor.png.meta @@ -0,0 +1,132 @@ +fileFormatVersion: 2 +guid: 79d810021c034907a351af61c6665d0f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 4096 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Art/IslandHarbor.png b/Assets/Soundings/Resources/Art/IslandHarbor.png new file mode 100644 index 0000000..61ea714 Binary files /dev/null and b/Assets/Soundings/Resources/Art/IslandHarbor.png differ diff --git a/Assets/Soundings/Resources/Art/IslandHarbor.png.meta b/Assets/Soundings/Resources/Art/IslandHarbor.png.meta new file mode 100644 index 0000000..dca0177 --- /dev/null +++ b/Assets/Soundings/Resources/Art/IslandHarbor.png.meta @@ -0,0 +1,132 @@ +fileFormatVersion: 2 +guid: a31e0e1c639440aa9b577d18030caaf8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 4096 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Display-OFL.txt b/Assets/Soundings/Resources/Display-OFL.txt new file mode 100644 index 0000000..465cf9c --- /dev/null +++ b/Assets/Soundings/Resources/Display-OFL.txt @@ -0,0 +1,101 @@ +Digitized data copyright (c) 2010 Google Corporation + with Reserved Font Arimo, Tinos and Cousine. +Copyright (c) 2012 Red Hat, Inc. + with Reserved Font Name Liberation. + +This Font Software is licensed under the SIL Open Font License, +Version 1.1. + +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 + +PREAMBLE The goals of the Open Font License (OFL) are to stimulate +worldwide development of collaborative font projects, to support the font +creation efforts of academic and linguistic communities, and to provide +a free and open framework in which fonts may be shared and improved in +partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. +The fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply to +any document created using the fonts or their derivatives. + + + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. +This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components +as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting ? in part or in whole ? +any of the components of the Original Version, by changing formats or +by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer +or other person who contributed to the Font Software. + + +PERMISSION & CONDITIONS + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components,in + Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, + redistributed and/or sold with any software, provided that each copy + contains the above copyright notice and this license. These can be + included either as stand-alone text files, human-readable headers or + in the appropriate machine-readable metadata fields within text or + binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font + Name(s) unless explicit written permission is granted by the + corresponding Copyright Holder. This restriction only applies to the + primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font + Software shall not be used to promote, endorse or advertise any + Modified Version, except to acknowledge the contribution(s) of the + Copyright Holder(s) and the Author(s) or with their explicit written + permission. + +5) The Font Software, modified or unmodified, in part or in whole, must + be distributed entirely under this license, and must not be distributed + under any other license. The requirement for fonts to remain under + this license does not apply to any document created using the Font + Software. + + + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + + + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER +DEALINGS IN THE FONT SOFTWARE. diff --git a/Assets/Soundings/Resources/Display-OFL.txt.meta b/Assets/Soundings/Resources/Display-OFL.txt.meta new file mode 100644 index 0000000..9391d1e --- /dev/null +++ b/Assets/Soundings/Resources/Display-OFL.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 01fc2bf4938ed9d70914e70de7bd817b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Display.ttf b/Assets/Soundings/Resources/Display.ttf new file mode 100644 index 0000000..3e98e40 Binary files /dev/null and b/Assets/Soundings/Resources/Display.ttf differ diff --git a/Assets/Soundings/Resources/Display.ttf.meta b/Assets/Soundings/Resources/Display.ttf.meta new file mode 100644 index 0000000..da435de --- /dev/null +++ b/Assets/Soundings/Resources/Display.ttf.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2c84b0e6a19b54cf387171ed414e5afa +TrueTypeFontImporter: + externalObjects: {} + serializedVersion: 4 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 0 + characterPadding: 1 + includeFontData: 1 + fontNames: + - Liberation Serif + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + useLegacyBoundsCalculation: 0 + shouldRoundAdvanceValue: 1 + subsetRecipes: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/HarborReflection.shader b/Assets/Soundings/Resources/HarborReflection.shader new file mode 100644 index 0000000..6c81a00 --- /dev/null +++ b/Assets/Soundings/Resources/HarborReflection.shader @@ -0,0 +1,45 @@ +Shader "Soundings/Harbor Reflection" +{ + Properties + { + _Color ("Paint", Color) = (1,1,1,1) + } + SubShader + { + Tags { "Queue"="Background+3" "RenderType"="Transparent" } + Pass + { + Cull Off + ZWrite Off + Blend SrcAlpha OneMinusSrcAlpha + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + fixed4 _Color; + struct Output { float4 clip : SV_POSITION; float3 world : TEXCOORD0; }; + + Output vert(appdata_base input) + { + Output output; + float4 worldPosition = mul(unity_ObjectToWorld, input.vertex); + worldPosition.y = -worldPosition.y * .59; + worldPosition.z += sin(worldPosition.x * .53 + worldPosition.y * 2.14 + _Time.y * 1.55) * .27; + worldPosition.x += sin(worldPosition.y * .88 - _Time.y) * .29; + output.clip = UnityWorldToClipPos(worldPosition.xyz); + output.world = worldPosition.xyz; + return output; + } + + fixed4 frag(Output input) : SV_Target + { + clip(-input.world.y); + float breakup = .48 + .38 * sin(input.world.y * 14 + input.world.x * .62 - _Time.y * 1.02); + float alpha = saturate(1 + input.world.y / 7.5) * breakup * .34; + return fixed4(_Color.rgb * float3(.51,.60,.64), alpha); + } + ENDCG + } + } +} diff --git a/Assets/Soundings/Resources/HarborReflection.shader.meta b/Assets/Soundings/Resources/HarborReflection.shader.meta new file mode 100644 index 0000000..fe13ff6 --- /dev/null +++ b/Assets/Soundings/Resources/HarborReflection.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1eb58811a3bfa28f7ab593e087627bff +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/HarborSurface.shader b/Assets/Soundings/Resources/HarborSurface.shader new file mode 100644 index 0000000..bd5cd4c --- /dev/null +++ b/Assets/Soundings/Resources/HarborSurface.shader @@ -0,0 +1,63 @@ +Shader "Soundings/Harbor Surface" +{ + Properties + { + _Color ("Paint", Color) = (1,1,1,1) + _Roughness ("Roughness", Range(.02,1)) = .42 + _Metal ("Metal", Range(0,1)) = 0 + _Emissive ("Emission", Range(0,1)) = 0 + _Weather ("Weathering", Range(0,1)) = .1 + } + SubShader + { + Tags { "RenderType"="Opaque" } + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + fixed4 _Color; + float _Roughness, _Metal, _Emissive, _Weather; + struct Input { float4 vertex : POSITION; float3 normal : NORMAL; }; + struct Output { float4 clip : SV_POSITION; float3 normal : TEXCOORD0; float3 world : TEXCOORD1; }; + + Output vert(Input input) + { + Output output; + output.clip = UnityObjectToClipPos(input.vertex); + output.normal = UnityObjectToWorldNormal(input.normal); + output.world = mul(unity_ObjectToWorld, input.vertex).xyz; + return output; + } + + fixed4 frag(Output input) : SV_Target + { + float3 p = input.world; + float3 normal = normalize(input.normal); + float3 eye = normalize(_WorldSpaceCameraPos.xyz - p); + float3 sun = normalize(float3(-.69,.40,-.43)); + float3 halfVector = normalize(sun + eye); + float sunlight = saturate(dot(normal,sun)); + float sky = saturate(normal.y * .5 + .5); + float fresnel = pow(1 - saturate(dot(eye,normal)), 3.5); + float roughExponent = lerp(220, 9, _Roughness); + float specular = pow(saturate(dot(normal,halfVector)), roughExponent) * (1 - _Roughness * .65); + float3 reflected = reflect(-eye,normal); + float sunsetStripe = smoothstep(-.08,.13,reflected.y) * (1 - smoothstep(.13,.42,reflected.y)); + float3 skyReflection = lerp(float3(.11,.19,.27), float3(.39,.48,.60), saturate(reflected.y)) + + sunsetStripe * float3(.20,.12,.061); + float3 light = lerp(float3(.25,.34,.46),float3(.61,.68,.77),sky) + sunlight * float3(.62,.44,.30); + float micro = sin(p.x * 13.7 + p.y * 19.3) * sin(p.z * 15.4 - p.x * 8); + float abrasion = sin(p.x * .82 + p.z * 1.7) * sin(p.y * 3.5 + p.z * 4.8); + float surfaceGrain = 1 + _Weather * (.055 * micro + .10 * abrasion); + float3 diffuse = _Color.rgb * light * surfaceGrain; + float3 shine = skyReflection * (.07 + fresnel * .24 + _Metal * .21) * (1 - _Roughness * .48) + + specular * float3(.72,.51,.34) * (.14 + .59 * _Metal); + return fixed4(saturate(diffuse + shine + _Color.rgb * _Emissive * .60), 1); + } + ENDCG + } + } +} diff --git a/Assets/Soundings/Resources/HarborSurface.shader.meta b/Assets/Soundings/Resources/HarborSurface.shader.meta new file mode 100644 index 0000000..a9647e5 --- /dev/null +++ b/Assets/Soundings/Resources/HarborSurface.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a74ecdb9273108a4eaebd4c277a784ca +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/HarborWater.shader b/Assets/Soundings/Resources/HarborWater.shader new file mode 100644 index 0000000..f493cbb --- /dev/null +++ b/Assets/Soundings/Resources/HarborWater.shader @@ -0,0 +1,62 @@ +Shader "Soundings/Harbor Water" +{ + Properties + { + _Backdrop ("Harbor photograph", 2D) = "black" {} + _BackdropCrop ("Harbor crop", Vector) = (1,1,0,0) + _HullSpan ("Hull length and beam", Vector) = (71,7,0,0) + } + SubShader + { + Tags { "Queue"="Background" "RenderType"="Opaque" } + Pass + { + Cull Off + ZWrite Off + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + sampler2D _Backdrop; + float4 _BackdropCrop, _HullSpan; + struct Output { float4 clip : SV_POSITION; float4 screen : TEXCOORD0; float2 world : TEXCOORD1; }; + + Output vert(appdata_base input) + { + Output output; + output.clip = UnityObjectToClipPos(input.vertex); + output.screen = ComputeScreenPos(output.clip); + output.world = mul(unity_ObjectToWorld, input.vertex).xz; + return output; + } + + fixed4 frag(Output input) : SV_Target + { + float2 uv = input.screen.xy / input.screen.w; + uv = (uv - .5) * _BackdropCrop.xy + .5; + float waterMask = 1 - smoothstep(.55,.69,uv.y); + float2 p = input.world; + float t = _Time.y; + float textureWave = sin(p.y * 1.94 + p.x * .30 + sin(p.x * .44 - t * .30)) * .0015; + uv += waterMask * float2(textureWave, textureWave * .14); + float3 color = tex2D(_Backdrop, uv).rgb; + if (_HullSpan.x < 1) + return fixed4(color, 1); + + float halfLength = _HullSpan.x * .5; + float along = abs((p.x + halfLength * .022) / halfLength); + float shaft = saturate(1 - pow(max(0,along), 3.2)); + float waterline = _HullSpan.y * lerp(.28, 1, shaft); + float offset = abs(p.y + .5) - waterline; + float shadow = (1 - smoothstep(-.8, 5.1, offset)) * (1 - smoothstep(.90,1.12,along)); + color *= 1 - .39 * shadow * waterMask; + float edgeWave = sin(p.x * 1.46 + p.y * 1.88 + t * .65) + .36 * sin(p.x * 3.3 + p.y * 2.42 - t * .50); + float foam = saturate(edgeWave - .55) * (1 - smoothstep(.12, 1.3, abs(offset - .25))) * (1 - smoothstep(.81,1.06,along)); + color += float3(.19,.23,.24) * foam * waterMask; + return fixed4(color, 1); + } + ENDCG + } + } +} diff --git a/Assets/Soundings/Resources/HarborWater.shader.meta b/Assets/Soundings/Resources/HarborWater.shader.meta new file mode 100644 index 0000000..113e0a8 --- /dev/null +++ b/Assets/Soundings/Resources/HarborWater.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0b4abc0d8562a9a9ba3436bd2b107143 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Soundings.uss b/Assets/Soundings/Resources/Soundings.uss new file mode 100644 index 0000000..6ccbc96 --- /dev/null +++ b/Assets/Soundings/Resources/Soundings.uss @@ -0,0 +1,235 @@ +:root { + background-color: #101d26; + color: #e9ede7; + font-size: 14px; + -unity-font-style: normal; +} + +Label { margin: 0; padding: 0; } +.action { + background-color: #1b313b; + color: #e9ede7; + border-width: 1px; + border-color: #35515a; + border-radius: 5px; + padding: 0 13px; + height: 37px; + min-height: 37px; + margin: 0; + font-size: 13px; + -unity-font-style: bold; +} +.action:hover { background-color: #29444d; border-color: #557b80; } +.action:focus { border-color: #8dd4be; } +.action:disabled { background-color: #17272e; border-color: #2a4148; color: #84989b; opacity: .76; } +.primary { background-color: #8bd6bc; border-color: #8bd6bc; color: #132c2b; padding: 0 17px; } +.primary:hover { background-color: #a7e7cf; border-color: #b9f2dd; } +.primary:focus { border-color: #e9f7db; } +.active-option { background-color: #21413f; border-color: #568b78; } +.muted { color: #a3b8bc; font-size: 13px; -unity-font-style: normal; } +.gold { color: #e4bd85; } +.gain { color: #98dec8; } +.loss { color: #efa28a; } +.body-copy { color: #bbc9ca; white-space: normal; margin-top: 10px; font-size: 14px; } +.eyebrow { color: #a1b8bd; font-size: 11px; letter-spacing: 1.1px; -unity-font-style: bold; } +.on-image { color: #f0e9da; } +.tag { + background-color: #123037; + border-radius: 4px; + border-width: 1px; + border-color: #78a89e; + padding: 5px 9px; + font-size: 10px; + letter-spacing: .75px; + -unity-font-style: bold; +} +.brand { flex-direction: row; align-items: center; } +.brand-mark { width: 33px; height: 34px; margin-right: 11px; flex-shrink: 0; } +.brand-type { color: #f1e7d2; font-size: 23px; -unity-font-style: bold; } +.crest { margin-bottom: 44px; } +.title-screen { flex-direction: row; flex-grow: 1; background-color: #10232e; } +.title-intro { + width: 42%; + min-width: 405px; + max-width: 635px; + padding: 40px 48px; + justify-content: center; + flex-shrink: 0; + border-right-width: 1px; + border-color: #456066; +} +.title-intro .eyebrow { color: #e3bf8a; } +.title-display { color: #f1e9d8; font-size: 84px; margin-top: -6px; margin-bottom: 7px; } +.title-copy { color: #bdccce; font-size: 16px; margin-bottom: 31px; white-space: normal; } +.title-visual { flex-grow: 1; overflow: hidden; background-color: #2c494d; } +.splash-location { + position: absolute; + left: 27px; + right: 27px; + bottom: 25px; + flex-direction: row; + justify-content: space-between; + align-items: center; + background-color: rgba(16,32,38,.88); + border-radius: 5px; + padding: 11px 13px; +} +.title-action { margin: 8px 0 0; font-size: 15px; min-height: 45px; } +.start-option { + justify-content: center; + align-items: flex-start; + margin-top: 11px; + min-height: 68px; + padding: 7px 14px; +} +.option-title { color: #e9ede7; font-size: 16px; -unity-font-style: bold; margin-bottom: 2px; } +.shell { flex-grow: 1; } +.mast { height: 67px; flex-direction: row; align-items: center; padding: 0 25px; background-color: #132730; border-bottom-width: 1px; border-color: #35545b; flex-shrink: 0; } +.mast-brand { flex-grow: 1; } +.mast-sub { color: #92aeb2; font-size: 10px; letter-spacing: 1.25px; margin-left: 15px; margin-top: 3px; } +.mast-metrics { flex-direction: row; align-items: center; } +.head-metric { min-width: 105px; padding: 0 19px; border-left-width: 1px; border-color: #31515a; } +.head-value { font-size: 19px; -unity-font-style: bold; } +.menu-button { margin-left: 9px; } +.body { flex-direction: row; flex-grow: 1; min-height: 0; } +.rail { + width: 211px; + flex-shrink: 0; + background-color: #12262f; + border-right-width: 1px; + border-color: #304851; + padding: 24px 13px 15px; +} +.rail-heading { margin-left: 11px; margin-bottom: 10px; color: #93aeb4; } +.nav { flex-direction: row; justify-content: flex-start; align-items: center; margin-bottom: 5px; color: #b8c9cb; border-color: rgba(0,0,0,0); background-color: rgba(0,0,0,0); height: 42px; } +.nav.current { background-color: #25413f; border-color: #3e685e; color: #ebf0e8; } +.nav-name { font-size: 15px; } +.fleet-heading { margin-top: 24px; } +.fleet-scroll { flex-grow: 1; min-height: 20px; } +.ship-item { align-items: flex-start; justify-content: center; margin: 0 0 5px; min-height: 51px; background-color: #142b35; } +.ship-item.selected { border-color: #44746c; background-color: #1e373b; } +.ship-name { font-size: 14px; color: #e8ece6; } +.ship-location { font-size: 11px; color: #9bb9bb; } +.fleet-empty { margin-left: 10px; color: #a3b8bc; font-size: 13px; } +.rail-goal { background-color: #162f36; border-width: 1px; border-color: #32515a; border-radius: 5px; padding: 10px 11px; margin-top: 15px; flex-shrink: 0; } +.rail-goal .eyebrow { color: #d6ae74; font-size: 9px; } +.goal-name { font-size: 13px; -unity-font-style: bold; margin-top: 5px; } +.goal-detail { font-size: 11px; color: #9db5b7; margin-top: 4px; white-space: normal; } +.page-scroll { flex-grow: 1; min-width: 0; } +.page { max-width: 1580px; padding: 16px 28px 30px; } +.page-head { flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: 12px; min-height: 62px; } +.page-title { font-size: 48px; color: #ebe3cf; } +.page-meta { color: #b8a689; padding-top: 10px; } +.notice { background-color: #1a373b; color: #aee0cd; border-left-width: 3px; border-color: #7cc3ac; border-radius: 4px; margin-bottom: 12px; padding: 7px 10px; white-space: normal; font-size: 13px; } +.title-intro .notice { margin-top: 13px; } +.notice.warning { background-color: #3c302e; color: #f2c0a7; border-color: #d69073; } +.columns { flex-direction: row; align-items: stretch; } +.wide { flex-basis: 61%; flex-grow: 1; flex-shrink: 1; min-width: 0; margin-right: 13px; } +.narrow { flex-basis: 37%; flex-grow: 1; flex-shrink: 1; min-width: 0; } +.half { margin-right: 9px; flex-basis: 50%; flex-grow: 1; flex-shrink: 1; min-width: 0; } +.second-row { margin-top: 13px; } +.hero { + position: relative; + height: 280px; + overflow: hidden; + background-color: #335353; + border-width: 1px; + border-color: #496068; + border-radius: 7px; +} +.harbor-image { position: absolute; left: 0; top: 0; right: 0; bottom: 0; } +.hero-port { position: absolute; top: 16px; left: 16px; } +.hero-label { + position: absolute; + left: 16px; + bottom: 15px; + background-color: rgba(12,32,39,.93); + border-left-width: 2px; + border-color: #e6bc85; + border-radius: 4px; + padding: 5px 14px 11px; +} +.hero-title { font-size: 38px; color: #f3e8d3; } +.card { + background-color: #162b35; + border-color: #33505a; + border-width: 1px; + border-radius: 7px; + padding: 15px 16px; +} +.card-title { font-size: 21px; -unity-font-style: bold; color: #e7ece6; margin-bottom: 8px; } +.forecast-route { color: #b9ccce; font-size: 15px; margin-bottom: 9px; } +.paired { flex-direction: row; padding: 9px 0 10px; margin-bottom: 3px; background-color: #112630; border-radius: 4px; } +.forecast-metric { flex-grow: 1; flex-shrink: 0; padding: 0 10px; } +.forecast-metric .eyebrow { letter-spacing: .75px; } +.forecast-value { font-size: 26px; -unity-font-style: bold; margin-top: 3px; } +.measure { flex-direction: row; justify-content: space-between; align-items: center; min-height: 31px; border-bottom-width: 1px; border-color: #304753; } +.measure-label { color: #b2c4c8; font-size: 13px; } +.measure-value { font-size: 13px; -unity-font-style: bold; margin-left: 8px; } +.control-label { margin: 5px 0 5px; } +.field { margin: 0; min-height: 38px; } +.field .unity-base-field__input { + background-color: #10232d; + border-width: 1px; + border-color: #3d5961; + border-radius: 4px; + min-height: 38px; + padding-left: 10px; + color: #e4ebe5; + font-size: 14px; +} +.field .unity-base-field__input:focus { border-color: #8dd4be; } +.field .unity-popup-field__arrow { -unity-background-image-tint-color: #a5c8c7; } +.field .unity-text-field__input { -unity-selection-color: #35585b; -unity-cursor-color: #e4ebe5; } +.control-row { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 11px; } +.control-copy .muted { margin-top: 3px; } +.stepper { flex-direction: row; align-items: center; } +.step { min-width: 33px; width: 33px; height: 34px; min-height: 34px; padding: 0; font-size: 19px; } +.step-value { min-width: 66px; -unity-text-align: middle-center; font-size: 15px; -unity-font-style: bold; } +.dispatch { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 13px; border-top-width: 1px; border-color: #314a52; padding-top: 11px; } +.readiness { font-size: 13px; white-space: normal; flex-shrink: 1; margin-right: 14px; color: #dcc29c; } +.readiness.gain { color: #98dec8; } +.meter { height: 5px; background-color: #314c55; margin-top: 2px; border-radius: 3px; overflow: hidden; } +.meter-fill { height: 5px; background-color: #72c3ad; } +.deck-stats { flex-direction: row; } +.deck-stats .forecast-metric { flex-basis: 25%; } +.deck-tabs { flex-direction: row; flex-wrap: wrap; margin-top: 3px; } +.deck-tabs .action { margin-right: 7px; margin-bottom: 6px; } +.deck-tabs .add-deck { margin-left: auto; margin-right: 0; } +.blueprint { background-color: #0f2330; border-width: 1px; border-color: #3a5662; border-radius: 5px; padding: 11px 10px; margin-top: 9px; } +.axes { flex-direction: row; justify-content: space-between; align-items: center; padding: 5px 3px 8px; } +.cell-row { flex-direction: row; margin-top: 5px; } +.berth { flex-basis: 0; flex-grow: 1; min-width: 0; min-height: 63px; height: 63px; padding: 3px 0; margin: 0 3px; align-items: center; justify-content: center; border-color: #3a5360; } +.cell-label { color: #b5c4c4; font-size: 10px; } +.cell-mark { color: #eef4e9; font-size: 17px; margin-top: 4px; } +.room-0 { background-color: #1b313e; } +.room-1 { background-color: #25534f; } +.room-2 { background-color: #6a4b32; } +.room-3 { background-color: #57435b; } +.room-4 { background-color: #36506b; } +.deck-hint { margin-top: 12px; } +.facility { flex-direction: row; justify-content: flex-start; align-items: center; min-height: 56px; margin-bottom: 6px; padding: 5px 8px; } +.facility-mark { min-width: 31px; width: 31px; height: 30px; border-radius: 4px; -unity-text-align: middle-center; margin-right: 9px; } +.facility-details { align-items: flex-start; min-width: 0; flex-grow: 1; flex-shrink: 1; } +.facility-title { font-size: 14px; -unity-font-style: bold; } +.facility-price { margin-left: 3px; font-size: 13px; } +.yard-item { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 12px; margin-bottom: 7px; min-height: 64px; } +.yard-copy { align-items: flex-start; flex-shrink: 1; } +.yard-copy .muted { white-space: normal; } +.yard-price { margin-left: 13px; -unity-font-style: bold; } +.maintenance-row { flex-direction: row; align-items: center; justify-content: space-between; } +.maintenance-row .body-copy { margin-top: 0; } +.full-button { margin-top: 9px; } +.chart { height: 245px; margin-top: 3px; background-color: #122d38; border-radius: 4px; } +.chart-legend { margin-top: 8px; flex-direction: row; justify-content: space-between; font-size: 12px; } +.map-port { position: absolute; margin-top: -13px; margin-left: -13px; background-color: #1b3640; border-color: #608081; width: 26px; min-height: 26px; height: 26px; border-radius: 13px; padding: 0; font-size: 12px; } +.map-port.active-option { border-color: #e4bd85; } +.port-grid { flex-direction: row; flex-wrap: wrap; } +.port-row { flex-basis: 22%; flex-grow: 1; height: 52px; min-height: 52px; margin: 0 4px 6px; align-items: flex-start; justify-content: center; } +.ledger-scroll { max-height: 227px; min-height: 67px; } +.breakdown { margin-top: -3px; } +.exterior-preview { height: 172px; margin-top: 11px; border-radius: 5px; overflow: hidden; background-color: #1b323e; } +.unity-scroller--vertical { width: 12px; background-color: #132730; } +.unity-scroller__low-button, .unity-scroller__high-button { display: none; } +.unity-scroller--vertical .unity-base-slider__tracker { background-color: #1b343e; border-width: 0; } +.unity-scroller--vertical .unity-base-slider__dragger { background-color: #41646b; border-color: #527b80; } diff --git a/Assets/Soundings/Resources/Soundings.uss.meta b/Assets/Soundings/Resources/Soundings.uss.meta new file mode 100644 index 0000000..c9a50aa --- /dev/null +++ b/Assets/Soundings/Resources/Soundings.uss.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4adc479b4349792f699ee23305468bfb +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 + unsupportedSelectorAction: 0 diff --git a/Assets/Soundings/Resources/SoundingsTheme.tss b/Assets/Soundings/Resources/SoundingsTheme.tss new file mode 100644 index 0000000..51924cb --- /dev/null +++ b/Assets/Soundings/Resources/SoundingsTheme.tss @@ -0,0 +1 @@ +@import url("unity-theme://default"); diff --git a/Assets/Soundings/Resources/SoundingsTheme.tss.meta b/Assets/Soundings/Resources/SoundingsTheme.tss.meta new file mode 100644 index 0000000..fd313e9 --- /dev/null +++ b/Assets/Soundings/Resources/SoundingsTheme.tss.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ee78eb0a9f196ceeea3b4eaa688d206d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 + unsupportedSelectorAction: 0 diff --git a/Assets/Soundings/Runtime.meta b/Assets/Soundings/Runtime.meta new file mode 100644 index 0000000..85f8ec5 --- /dev/null +++ b/Assets/Soundings/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cf99dd003c61531449d2dcaac2238693 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Runtime/Company.cs b/Assets/Soundings/Runtime/Company.cs new file mode 100644 index 0000000..f75ca65 --- /dev/null +++ b/Assets/Soundings/Runtime/Company.cs @@ -0,0 +1,394 @@ +using System; +using System.Collections.Generic; + +namespace Soundings +{ + [Serializable] + public sealed class Deck + { + public Facility[] Cells; + public Deck(int size) => Cells = new Facility[size]; + } + + [Serializable] + public sealed class Ship + { + public string Name; + public int HullIndex, Port, Condition, Fare, Fuel; + public double FuelValue; + public List Decks = new List(); + + public HullSpec Hull => Market.Hulls[HullIndex]; + public int Beds => Count(Facility.Cabin) * Market.Facilities[(int)Facility.Cabin].Capacity; + public int Meals => Count(Facility.Dining) * Market.Facilities[(int)Facility.Dining].Capacity * 3; + public int Entertainment => Count(Facility.Entertainment) * Market.Facilities[(int)Facility.Entertainment].Capacity; + public int Capacity => Math.Min(Beds, Meals); + public int Tank => Hull.Tank + Count(Facility.Tank) * Market.Facilities[(int)Facility.Tank].Capacity; + public double BurnPerMile => Hull.TonsPerMile * (1 + (100 - Condition) * .003); + public int SafeRange => Math.Max(0, (int)Math.Floor(Math.Min(Fuel - 6, Fuel * 100 / 112) / BurnPerMile)); + + public int Count(Facility facility) + { + int count = 0; + foreach (Deck deck in Decks) + foreach (Facility cell in deck.Cells) + if (cell == facility) + count++; + return count; + } + } + + [Serializable] + public sealed class Voyage + { + public int Origin, Destination, Miles, Days, Day, Fare, Guests, Capacity, FuelBurn, Reserve, + TicketSales, OnboardSales, Crew, Catering, PortFees, FuelExpense, LoanInterest, Principal, ReputationChange; + public string ShipName; + public int OperatingCash => Crew + Catering + PortFees; + public int NetIncome => TicketSales + OnboardSales - OperatingCash - FuelExpense - LoanInterest; + public int CashChange => TicketSales + OnboardSales - OperatingCash - LoanInterest - Principal; + public int RequiredFuel => FuelBurn + Reserve; + } + + [Serializable] + public sealed class Company + { + public const int SaveVersion = 1; + public const int MaxHistory = 30; + public int Version = SaveVersion; + public int Day = 1, Cash, Debt, Reputation, Voyages; + public long LifetimeProfit; + public bool Flagship, Bridge; + public int SelectedShip; + public bool[] Permits = new bool[Market.Ports.Count]; + public List Fleet = new List(); + public List History = new List(); + + public Ship ActiveShip => SelectedShip >= 0 && SelectedShip < Fleet.Count ? Fleet[SelectedShip] : null; + + public static Company Start(bool financed) + { + var company = new Company + { + Cash = financed ? 580000 : 135000, + Debt = financed ? 500000 : 0, + Reputation = financed ? 12 : 15, + Bridge = financed, + SelectedShip = financed ? -1 : 0 + }; + company.Permits[0] = company.Permits[1] = true; + if (!financed) + company.Fleet.Add(CreateShip(0, "MV Meridian", true, true)); + return company; + } + + public bool CanLoad() + { + if (Version != SaveVersion || Day < 1 || Cash < 0 || Debt < 0 || Reputation < 0 || Reputation > 100 + || Voyages < 0 || Permits == null || Permits.Length != Market.Ports.Count || !Permits[0] || !Permits[1] + || Fleet == null || Fleet.Count > Market.MaxFleet || History == null || History.Count > MaxHistory + || (Fleet.Count == 0 ? SelectedShip != -1 : SelectedShip < 0 || SelectedShip >= Fleet.Count)) + return false; + + foreach (Ship ship in Fleet) + { + if (ship == null || string.IsNullOrWhiteSpace(ship.Name) || ship.HullIndex < 0 || ship.HullIndex >= Market.Hulls.Count + || ship.Port < 0 || ship.Port >= Permits.Length || !Permits[ship.Port] || ship.Condition < 24 + || ship.Condition > 100 || ship.Fare < Market.MinFare || ship.Fare > Market.MaxFare + || ship.Decks == null || ship.Decks.Count < Market.FirstDecks || ship.Decks.Count > ship.Hull.MaxDecks + || ship.Fuel < 0 || double.IsNaN(ship.FuelValue) || double.IsInfinity(ship.FuelValue) || ship.FuelValue < 0) + return false; + + foreach (Deck deck in ship.Decks) + { + if (deck?.Cells == null || deck.Cells.Length != ship.Hull.Columns * ship.Hull.Rows) + return false; + foreach (Facility cell in deck.Cells) + if ((int)cell < 0 || (int)cell >= Market.Facilities.Count) + return false; + } + + if (ship.Fuel > ship.Tank) + return false; + } + + foreach (Voyage voyage in History) + if (voyage == null || voyage.Origin < 0 || voyage.Origin >= Permits.Length + || voyage.Destination < 0 || voyage.Destination >= Permits.Length) + return false; + return true; + } + + public string ShipyardBlock(int hullIndex, bool used) + { + HullSpec hull = Market.Hulls[hullIndex]; + if (used && hullIndex == Market.Ocean) + return "Ocean Class hulls are available as new commissions."; + if (Fleet.Count >= Market.MaxFleet) + return "The fleet has reached its eight-ship limit."; + if (Voyages < hull.Voyages || Reputation < hull.Reputation) + return $"Requires {hull.Voyages} voyages and {hull.Reputation} reputation."; + if (Cash < (used ? Market.UsedPrice(hullIndex) : hull.Price)) + return "The company needs more cash."; + return null; + } + + public string Acquire(int hullIndex, bool used, string name) + { + string block = ShipyardBlock(hullIndex, used); + if (block != null) + return block; + if (!used) + { + name = name?.Trim(); + if (string.IsNullOrWhiteSpace(name) || name.Length > 24) + return "Enter a ship name of up to 24 characters."; + if (!name.StartsWith("MV ", StringComparison.OrdinalIgnoreCase)) + name = "MV " + name; + } + else + name = $"MV Wayfarer {Fleet.Count + 1}"; + + foreach (Ship ship in Fleet) + if (string.Equals(ship.Name, name, StringComparison.OrdinalIgnoreCase)) + return "A vessel already uses that name."; + + Cash -= used ? Market.UsedPrice(hullIndex) : Market.Hulls[hullIndex].Price; + Fleet.Add(CreateShip(hullIndex, name, used, false)); + SelectedShip = Fleet.Count - 1; + return null; + } + + private static Ship CreateShip(int hullIndex, string name, bool used, bool original) + { + var ship = new Ship + { + Name = name, + HullIndex = hullIndex, + Condition = original ? 78 : used ? 72 : 100, + Fare = hullIndex == 0 ? 550 : hullIndex == 1 ? 850 : 1250, + Fuel = original ? 48 : used ? 25 : 0 + }; + ship.FuelValue = ship.Fuel * Market.FuelPrice(0, 1); + for (int i = 0; i < Market.FirstDecks; i++) + ship.Decks.Add(new Deck(ship.Hull.Columns * ship.Hull.Rows)); + if (used) + { + for (int i = 0; i < 8; i++) + ship.Decks[0].Cells[i] = Facility.Cabin; + ship.Decks[1].Cells[1] = Facility.Dining; + ship.Decks[1].Cells[2] = Facility.Entertainment; + ship.Decks[1].Cells[4] = Facility.Dining; + } + return ship; + } + + public int DeckPrice(Ship ship) => 29000 + ship.Decks.Count * 8500 + ship.HullIndex * 13000; + + public string AddDeck(Ship ship) + { + int price = DeckPrice(ship); + if (ship.Decks.Count >= ship.Hull.MaxDecks) + return "The hull has reached its deck limit."; + if (Cash < price) + return "The company needs more cash."; + Cash -= price; + ship.Decks.Add(new Deck(ship.Hull.Columns * ship.Hull.Rows)); + return null; + } + + public string Build(Ship ship, int deckIndex, int cell, Facility plan) + { + Deck deck = ship.Decks[deckIndex]; + Facility previous = deck.Cells[cell]; + if (previous == plan) + return null; + if (previous != Facility.Empty && plan != Facility.Empty) + return "Clear this berth before building another facility."; + if (previous == Facility.Tank && ship.Fuel > ship.Tank - Market.Facilities[(int)Facility.Tank].Capacity) + return "Burn more fuel before removing this tank."; + int price = Market.Facilities[(int)plan].Price; + if (Cash < price) + return "The company needs more cash."; + Cash += Market.Facilities[(int)previous].Price / 4 - price; + deck.Cells[cell] = plan; + return null; + } + + public string PermitBlock(int destination) + { + PortSpec port = Market.Ports[destination]; + if (Permits[destination]) + return "Permit held."; + if (Reputation < port.Reputation) + return $"Requires {port.Reputation} reputation."; + if (Cash < port.Permit) + return "The company needs more cash."; + return null; + } + + public string Permit(int destination) + { + string block = PermitBlock(destination); + if (block != null) + return block; + Cash -= Market.Ports[destination].Permit; + Permits[destination] = true; + return null; + } + + public int BunkerCost(Ship ship, int tons) => tons * Market.FuelPrice(ship.Port, Day); + + public string Refuel(Ship ship, int tons) + { + if (tons <= 0 || tons > ship.Tank - ship.Fuel) + return "Select a fuel quantity that fits in the tank."; + int cost = BunkerCost(ship, tons); + if (Cash < cost) + return "The company needs more cash."; + Cash -= cost; + ship.Fuel += tons; + ship.FuelValue += cost; + return null; + } + + public int ServiceCost(Ship ship) => (100 - ship.Condition) * ship.Hull.HullWearCost; + + public string Service(Ship ship) + { + int cost = ServiceCost(ship); + if (Cash < cost) + return "The company needs more cash."; + Cash -= cost; + ship.Condition = 100; + return null; + } + + public string PayDownDebt() + { + int payment = Math.Min(25000, Debt); + if (payment <= 0) + return "The company has no outstanding loan."; + if (Cash < payment) + return "The company needs more cash."; + Cash -= payment; + Debt -= payment; + return null; + } + + public bool CanDrawBridge => Bridge && Cash < 100000; + + public string DrawBridge() + { + if (!CanDrawBridge) + return "Bridge credit is available once when cash falls below $100,000."; + Cash += 125000; + Debt += 125000; + Bridge = false; + return null; + } + + public Voyage Forecast(Ship ship, int destination) + { + if (!Market.TryDistance(ship.Port, destination, out int miles)) + return null; + + PortSpec from = Market.Ports[ship.Port]; + PortSpec to = Market.Ports[destination]; + int days = 1 + (int)Math.Ceiling(miles / 415.0); + int fuel = (int)Math.Ceiling(ship.BurnPerMile * miles); + int reserve = Math.Max(6, (int)Math.Ceiling(fuel * .12)); + double referenceFare = 330 + days * 88 + to.Appeal * 125; + double fareFactor = Math.Pow(referenceFare / ship.Fare, 1.55); + double season = 1 + .13 * Math.Cos((Day + destination * 13) * 2 * Math.PI / 112); + int recentSailings = 0; + foreach (Voyage voyage in History) + { + if (Day - voyage.Day > 12 || Math.Min(voyage.Origin, voyage.Destination) != Math.Min(ship.Port, destination) + || Math.Max(voyage.Origin, voyage.Destination) != Math.Max(ship.Port, destination)) + continue; + recentSailings++; + } + + double saturation = Math.Max(.66, 1 - recentSailings * .085); + double entertainment = Math.Min(1, (double)ship.Entertainment / Math.Max(1, ship.Capacity)); + double marketDemand = (150 + ship.Capacity * .50) * from.MarketSize * to.Appeal * season * saturation; + double product = (.66 + Reputation * .006 + entertainment * .20) * (.8 + ship.Condition * .002); + int guests = Market.Clamp((int)Math.Round(marketDemand * fareFactor * product), 0, ship.Capacity); + double unitCost = ship.Fuel > 0 ? ship.FuelValue / ship.Fuel : Market.FuelPrice(ship.Port, Day); + + return new Voyage + { + Origin = ship.Port, + Destination = destination, + ShipName = ship.Name, + Day = Day + days, + Days = days, + Miles = miles, + Fare = ship.Fare, + Guests = guests, + Capacity = ship.Capacity, + FuelBurn = fuel, + Reserve = reserve, + TicketSales = guests * ship.Fare, + OnboardSales = (int)Math.Round(guests * days * (13 + entertainment * 18)), + Crew = ship.Hull.CrewPerDay * days + ship.Decks.Count * 500 * days, + Catering = guests * days * 27, + PortFees = from.Fee / 2 + to.Fee, + FuelExpense = (int)Math.Round(Math.Min(fuel, ship.Fuel) * unitCost + + Math.Max(0, fuel - ship.Fuel) * Market.FuelPrice(ship.Port, Day)), + LoanInterest = (int)Math.Ceiling(Debt * .13 * days / 365), + Principal = Math.Min(Debt, 850 * days), + ReputationChange = guests == 0 ? -3 : Math.Max(1, (int)Math.Round(2 + 2 * to.Appeal + entertainment * 3)) + }; + } + + public string DepartureBlock(Ship ship, Voyage quote) + { + if (quote == null || quote.Destination == ship.Port) + return "Select a connected port from your itinerary."; + if (!Permits[quote.Destination]) + return "Obtain a destination permit in Ports."; + if (ship.HullIndex < Market.Ports[quote.Destination].MinimumHull) + return "This destination requires a larger hull class."; + if (ship.Beds == 0 || ship.Meals == 0) + return "Build cabins and dining before carrying guests."; + if (ship.Condition < 25) + return "An overhaul is required before the ship can sail."; + if (quote.RequiredFuel > ship.Tank) + return $"This route needs {quote.RequiredFuel} t. Add a bunker tank or use a larger hull."; + if (ship.Fuel < quote.RequiredFuel) + return $"Buy {quote.RequiredFuel - ship.Fuel} t more fuel to cover the crossing and reserve."; + if (quote.Guests <= 0) + return "Raise demand or lower the fare to attract passengers."; + if (Cash < quote.OperatingCash + quote.LoanInterest + quote.Principal) + return "Cash must cover the voyage expenses and loan payment."; + return null; + } + + public string Sail(Ship ship, int destination) + { + Voyage quote = Forecast(ship, destination); + string block = DepartureBlock(ship, quote); + if (block != null) + return block; + + ship.FuelValue *= (double)(ship.Fuel - quote.FuelBurn) / ship.Fuel; + ship.Fuel -= quote.FuelBurn; + ship.Condition = Math.Max(24, ship.Condition - Math.Max(1, quote.Days / 2)); + ship.Port = quote.Destination; + Day = quote.Day; + Cash += quote.CashChange; + Debt -= quote.Principal; + Reputation = Market.Clamp(Reputation + quote.ReputationChange, 0, 100); + Voyages++; + LifetimeProfit += quote.NetIncome; + Flagship |= ship.HullIndex == Market.Ocean && ship.Capacity >= 320 && ship.Entertainment >= 160 + && quote.Origin == Market.Bermuda && quote.Destination == Market.Lisbon; + History.Insert(0, quote); + if (History.Count > MaxHistory) + History.RemoveAt(MaxHistory); + return null; + } + } +} diff --git a/Assets/Soundings/Runtime/Company.cs.meta b/Assets/Soundings/Runtime/Company.cs.meta new file mode 100644 index 0000000..d69ee4d --- /dev/null +++ b/Assets/Soundings/Runtime/Company.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 48e5695dbf9ccfc3db6ea9ff0725b178 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/CompanyPages.cs b/Assets/Soundings/Runtime/CompanyPages.cs new file mode 100644 index 0000000..a802f2b --- /dev/null +++ b/Assets/Soundings/Runtime/CompanyPages.cs @@ -0,0 +1,270 @@ +using UnityEngine; +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp + { + private int inspectedPort = 1; + private int selectedVoyage; + private bool worldChart; + + private void DrawPorts(VisualElement pageRoot) + { + var columns = Add(pageRoot, "columns"); + var chartCard = Card(columns, "Shipping lanes", "wide"); + var scope = Add(chartCard, "deck-tabs"); + scope.Add(Action("Atlantic", () => ChangeChart(false), worldChart ? "" : "active-option", "chart-atlantic")); + scope.Add(Action("World", () => ChangeChart(true), worldChart ? "active-option" : "", "chart-world")); + var chart = Add(chartCard, "chart"); + var labels = Add(chartCard, "chart-legend"); + AddText(labels, "● Permit held", "gain"); + AddText(labels, "● Permit required", "gold"); + chart.generateVisualContent += DrawChart; + + for (int i = 0; i < ChartPortCount; i++) + { + int portId = i; + PortSpec port = Market.Ports[i]; + var marker = Action("●", () => { inspectedPort = portId; Notify(null); Render(); }, + company.Permits[i] ? "map-port gain" : "map-port gold", "map-" + i); + Vector2 point = ChartPoint(port); + marker.style.left = Length.Percent(point.x * 100); + marker.style.top = Length.Percent(point.y * 100); + marker.EnableInClassList("active-option", i == inspectedPort); + marker.tooltip = port.Name; + chart.Add(marker); + } + + PortSpec current = Market.Ports[inspectedPort]; + var portInfo = Card(columns, current.Name, "narrow"); + AddText(portInfo, $"{current.Country} / {current.Region}", "muted"); + AddLine(portInfo, "Bunker price", $"{Money(Market.FuelPrice(inspectedPort, company.Day))} / t"); + AddLine(portInfo, "Arrival dues", Money(current.Fee)); + AddLine(portInfo, "Destination appeal", $"{current.Appeal:P0}"); + AddLine(portInfo, "Minimum hull", Market.Hulls[current.MinimumHull].Name); + bool licensed = company.Permits[inspectedPort]; + AddLine(portInfo, "Port access", licensed ? "Permit held" : "Permit required", licensed ? "gain" : "gold"); + if (!licensed) + { + int portId = inspectedPort; + string blocker = company.PermitBlock(portId); + Button license = Action($"Acquire permit · {Money(current.Permit)}", () => + { + string failure = company.Permit(portId); + if (failure == null && destination < 0) + ResetItinerary(); + Apply(failure, $"{current.Name} is now licensed."); + }, "primary full-button", "permit"); + license.SetEnabled(blocker == null); + portInfo.Add(license); + if (blocker != null) + AddText(portInfo, blocker, "body-copy"); + } + if (Ship != null && Market.TryDistance(Ship.Port, inspectedPort, out int miles)) + { + AddLine(portInfo, $"From {Market.Ports[Ship.Port].Name}", $"{miles:N0} nm"); + Button plan = Action("Plan this sailing →", () => + { + destination = inspectedPort; + SetRecommendedFuel(); + ChangePage(0); + }, "full-button", "plan-port"); + portInfo.Add(plan); + } + + var index = Card(pageRoot, "Port directory", "second-row"); + var grid = Add(index, "port-grid"); + for (int i = 0; i < ChartPortCount; i++) + { + int portId = i; + PortSpec port = Market.Ports[i]; + Button option = Action("", () => { inspectedPort = portId; Notify(null); Render(); }, + inspectedPort == i ? "port-row active-option" : "port-row", "port-" + i); + AddText(option, port.Name, "option-title"); + AddText(option, $"{port.Country} · {Money(Market.FuelPrice(i, company.Day))}/t", + company.Permits[i] ? "muted" : "gold"); + grid.Add(option); + } + } + + private int ChartPortCount => worldChart ? Market.Ports.Count : Market.StarterPortCount; + + private void ChangeChart(bool global) + { + worldChart = global; + if (inspectedPort >= ChartPortCount) + inspectedPort = Market.Lisbon; + Notify(null); + Render(); + } + + private Vector2 ChartPoint(PortSpec port) => worldChart + ? new Vector2((port.Longitude + 180) / 360, (76 - port.Latitude) / 137) + : new Vector2(port.MapX, port.MapY); + + private void DrawChart(MeshGenerationContext context) + { + VisualElement chart = context.visualElement; + float width = chart.contentRect.width; + float height = chart.contentRect.height; + Vector2 Point(float x, float y) => new Vector2(width * x, height * y); + Painter2D painter = context.painter2D; + + painter.strokeColor = new Color(.18f, .32f, .36f); + painter.lineWidth = 1; + painter.BeginPath(); + for (int i = 1; i < 12; i++) + { + painter.MoveTo(Point(i / 12f, 0)); + painter.LineTo(Point(i / 12f, 1)); + } + for (int i = 1; i < 7; i++) + { + painter.MoveTo(Point(0, i / 7f)); + painter.LineTo(Point(1, i / 7f)); + } + painter.Stroke(); + + void Polygon(Vector2[] points) + { + painter.BeginPath(); + painter.MoveTo(Point(points[0].x, points[0].y)); + for (int i = 1; i < points.Length; i++) + painter.LineTo(Point(points[i].x, points[i].y)); + painter.ClosePath(); + painter.Fill(); + painter.Stroke(); + } + + painter.fillColor = new Color(.15f, .28f, .29f); + painter.strokeColor = new Color(.30f, .43f, .42f); + if (worldChart) + { + foreach (Vector2[] continent in WorldCoastlines.Shapes) + Polygon(continent); + } + else + { + Polygon(new[] + { + new Vector2(0,0), new Vector2(.30f,0), new Vector2(.27f,.12f), new Vector2(.26f,.26f), + new Vector2(.23f,.33f), new Vector2(.20f,.46f), new Vector2(.15f,.52f), new Vector2(.13f,.60f), + new Vector2(.15f,.68f), new Vector2(.12f,.74f), new Vector2(.10f,.64f), new Vector2(.08f,.57f), + new Vector2(.02f,.54f), new Vector2(0,.60f) + }); + Polygon(new[] + { + new Vector2(1,0), new Vector2(.84f,0), new Vector2(.86f,.08f), new Vector2(.88f,.13f), + new Vector2(.86f,.24f), new Vector2(.90f,.30f), new Vector2(.94f,.28f), new Vector2(.95f,.33f), + new Vector2(.90f,.39f), new Vector2(.86f,.52f), new Vector2(.87f,.68f), new Vector2(.95f,.83f), new Vector2(1,.83f) + }); + Polygon(new[] + { + new Vector2(0,.84f), new Vector2(.08f,.88f), new Vector2(.15f,.92f), + new Vector2(.21f,.84f), new Vector2(.34f,.97f), new Vector2(.41f,1), new Vector2(0,1) + }); + } + + foreach (Lane lane in Market.Lanes) + { + if (lane.A >= ChartPortCount || lane.B >= ChartPortCount) + continue; + Vector2 a = ChartPoint(Market.Ports[lane.A]); + Vector2 b = ChartPoint(Market.Ports[lane.B]); + bool active = company.Permits[lane.A] && company.Permits[lane.B]; + painter.strokeColor = active ? new Color(.41f, .75f, .68f, .8f) : new Color(.69f, .62f, .44f, .59f); + painter.lineWidth = active ? 1.65f : 1; + if (worldChart && Mathf.Abs(a.x - b.x) > .5f) + { + if (a.x > b.x) + (a, b) = (b, a); + float y = Mathf.Lerp(a.y, b.y, a.x / (a.x + 1 - b.x)); + RouteSegment(a, new Vector2(0, y)); + RouteSegment(new Vector2(1, y), b); + } + else + RouteSegment(a, b); + } + + void RouteSegment(Vector2 a, Vector2 b) + { + painter.BeginPath(); + painter.MoveTo(Point(a.x, a.y)); + float rise = worldChart ? .018f : .055f; + painter.QuadraticCurveTo(Point((a.x + b.x) / 2, (a.y + b.y) / 2 - rise), Point(b.x, b.y)); + painter.Stroke(); + } + } + + private void DrawFinance(VisualElement pageRoot) + { + var summary = Add(pageRoot, "card deck-stats"); + ForecastMetric(summary, "CASH RESERVES", Money(company.Cash), "gold"); + ForecastMetric(summary, "OUTSTANDING DEBT", Money(company.Debt)); + ForecastMetric(summary, "LIFETIME VOYAGE PROFIT", Money(company.LifetimeProfit), company.LifetimeProfit >= 0 ? "gain" : "loss"); + ForecastMetric(summary, "COMPLETED VOYAGES", company.Voyages.ToString()); + var columns = Add(pageRoot, "columns second-row"); + var ledger = Card(columns, "Voyage ledger", "wide"); + if (company.History.Count == 0) + AddText(ledger, "Completed voyages will be posted here.", "body-copy"); + else + { + selectedVoyage = Mathf.Clamp(selectedVoyage, 0, company.History.Count - 1); + var list = new ScrollView(ScrollViewMode.Vertical); + list.AddToClassList("ledger-scroll"); + ledger.Add(list); + for (int i = 0; i < company.History.Count; i++) + { + int record = i; + Voyage trip = company.History[i]; + Button entry = Action("", () => { selectedVoyage = record; Render(); }, + selectedVoyage == i ? "yard-item active-option" : "yard-item", "voyage-" + i); + var detail = Add(entry, "yard-copy"); + AddText(detail, $"{Market.Ports[trip.Origin].Name} → {Market.Ports[trip.Destination].Name}", "option-title"); + AddText(detail, $"Day {trip.Day} · {trip.ShipName} · {trip.Guests} guests", "muted"); + AddText(entry, Money(trip.NetIncome), trip.NetIncome >= 0 ? "gain" : "loss"); + list.Add(entry); + } + } + + var account = Card(columns, "Financing", "narrow"); + AddLine(account, "Interest", company.Debt > 0 ? "13% APR" : "No outstanding loan"); + AddLine(account, "Principal per sailing day", company.Debt > 0 ? Money(850) : "—"); + if (company.Debt > 0) + { + Button pay = Action($"Pay down · {Money(Mathf.Min(company.Debt, 25000))}", + () => Apply(company.PayDownDebt(), "Principal payment posted."), "full-button", "pay-debt"); + pay.SetEnabled(company.Cash >= Mathf.Min(company.Debt, 25000)); + account.Add(pay); + } + if (company.Bridge) + { + Button draw = Action("Draw $125,000 bridge loan", () => Apply(company.DrawBridge(), "Bridge loan posted."), + "full-button", "draw-bridge"); + draw.SetEnabled(company.CanDrawBridge); + account.Add(draw); + if (!company.CanDrawBridge) + AddText(account, "Bridge credit opens below $100,000 cash.", "body-copy"); + } + if (company.Flagship) + AddText(account, "Flagship milestone completed.", "body-copy gain"); + if (company.History.Count == 0) + return; + + Voyage selected = company.History[selectedVoyage]; + var statement = Card(pageRoot, $"Sailing statement · Day {selected.Day}", "second-row"); + var breakdown = Add(statement, "columns breakdown"); + var earnings = Add(breakdown, "half"); + AddLine(earnings, "Ticket revenue", Money(selected.TicketSales)); + AddLine(earnings, "Onboard revenue", Money(selected.OnboardSales)); + AddLine(earnings, "Crew & catering", Money(-selected.Crew - selected.Catering)); + AddLine(earnings, "Port dues", Money(-selected.PortFees)); + var costs = Add(breakdown, "half"); + AddLine(costs, "Fuel consumed from inventory", Money(-selected.FuelExpense)); + AddLine(costs, "Interest", Money(-selected.LoanInterest)); + AddLine(costs, "Loan principal paid", Money(-selected.Principal)); + AddLine(costs, "Cash change on arrival", Money(selected.CashChange), selected.CashChange >= 0 ? "gain" : "loss"); + } + } +} diff --git a/Assets/Soundings/Runtime/CompanyPages.cs.meta b/Assets/Soundings/Runtime/CompanyPages.cs.meta new file mode 100644 index 0000000..c63db57 --- /dev/null +++ b/Assets/Soundings/Runtime/CompanyPages.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f54b7d285a4b448508304b7d89732b71 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/ConstructionPages.cs b/Assets/Soundings/Runtime/ConstructionPages.cs new file mode 100644 index 0000000..3c2138a --- /dev/null +++ b/Assets/Soundings/Runtime/ConstructionPages.cs @@ -0,0 +1,156 @@ +using UnityEngine; +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp + { + private static readonly (int HullIndex, bool Used)[] Offers = + { (0, true), (0, false), (1, true), (1, false), (2, false) }; + private void DrawDecks(VisualElement pageRoot) + { + Ship ship = Ship; + if (ship == null) + { + var empty = Card(pageRoot, "Choose a vessel first"); + empty.Add(Action("Open shipyard →", () => ChangePage(2), "primary")); + return; + } + + var stats = Add(pageRoot, "deck-stats card"); + ForecastMetric(stats, "CABIN BERTHS", ship.Beds.ToString("N0")); + ForecastMetric(stats, "DAILY MEAL CAPACITY", ship.Meals.ToString("N0")); + ForecastMetric(stats, "SHOW SEATS", ship.Entertainment.ToString("N0")); + ForecastMetric(stats, "BUNKER CAPACITY", $"{ship.Tank} t"); + + var workbench = Add(pageRoot, "columns second-row"); + var plan = Card(workbench, ship.Name, "wide deck-card"); + var tabs = Add(plan, "deck-tabs"); + for (int i = 0; i < ship.Decks.Count; i++) + { + int floor = i; + tabs.Add(Action($"Deck {i + 1}", () => { deckIndex = floor; Notify(null); Render(); }, + deckIndex == i ? "active-option" : "", $"deck-{i}")); + } + int price = company.DeckPrice(ship); + Button add = Action($"+ Deck · {Money(price)}", () => Apply(company.AddDeck(ship), "Added a new deck."), "add-deck", "add-deck"); + add.SetEnabled(ship.Decks.Count < ship.Hull.MaxDecks && company.Cash >= price); + tabs.Add(add); + var diagram = Add(plan, "blueprint"); + var axes = Add(diagram, "axes"); + AddText(axes, "STERN", "eyebrow"); + AddText(axes, $"DECK {deckIndex + 1:00} / {ship.Hull.Columns * ship.Hull.Rows} MODULE BERTHS", "eyebrow deck-axis"); + AddText(axes, "BOW →", "eyebrow"); + for (int row = 0; row < ship.Hull.Rows; row++) + { + var strip = Add(diagram, "cell-row"); + for (int column = 0; column < ship.Hull.Columns; column++) + { + int cell = row * ship.Hull.Columns + column; + Facility room = ship.Decks[deckIndex].Cells[cell]; + string label = $"{(char)('A' + row)}{column + 1}"; + Button berth = Action("", () => + { + Facility previous = ship.Decks[deckIndex].Cells[cell]; + string success = tool == Facility.Empty ? $"Cleared berth {label}." : $"Built {Market.Facilities[(int)tool].Name.ToLowerInvariant()} at {label}."; + Apply(company.Build(ship, deckIndex, cell, tool), previous == tool ? null : success); + }, "berth room-" + (int)room, "berth-" + cell); + bool occupied = room != Facility.Empty; + FacilitySpec spec = Market.Facilities[(int)room]; + berth.tooltip = $"{label} · {(occupied ? spec.Name : "Empty berth")}"; + AddText(berth, label, "cell-label"); + AddText(berth, occupied ? spec.Mark : "+", "cell-mark"); + strip.Add(berth); + } + } + AddText(plan, $"The current plan serves up to {ship.Capacity:N0} guests per voyage.", "body-copy deck-hint"); + var exterior = Add(plan, "exterior-preview"); + AddHarbor(exterior); + + var catalog = Card(workbench, "Facilities", "narrow"); + for (int i = 1; i <= Market.Facilities.Count; i++) + { + int type = i % Market.Facilities.Count; + FacilitySpec spec = Market.Facilities[type]; + Button option = Action("", () => { tool = (Facility)type; Notify(null); Render(); }, + tool == (Facility)type ? "facility active-option" : "facility", "facility-" + type); + AddText(option, spec.Mark, "facility-mark room-" + type); + var details = Add(option, "facility-details"); + AddText(details, spec.Name, "facility-title"); + AddText(details, spec.Details, "muted"); + AddText(option, type > 0 ? Money(spec.Price) : "", "facility-price gold"); + catalog.Add(option); + } + } + + private void DrawShipyard(VisualElement pageRoot) + { + var columns = Add(pageRoot, "columns"); + var inventory = Card(columns, "Available hulls", "wide"); + for (int item = 0; item < Offers.Length; item++) + { + int selection = item; + var offer = Offers[item]; + HullSpec hull = Market.Hulls[offer.HullIndex]; + Button option = Action("", () => { yardSelection = selection; Notify(null); Render(); }, + selection == yardSelection ? "yard-item active-option" : "yard-item", "yard-" + item); + var itemCopy = Add(option, "yard-copy"); + AddText(itemCopy, offer.Used ? $"Pre-owned {hull.Name}" : $"New {hull.Name}", "option-title"); + AddText(itemCopy, offer.Used ? "Fitted with cabins, dining and entertainment. Condition 72%." : hull.Description, "muted"); + AddText(option, Money(offer.Used ? Market.UsedPrice(offer.HullIndex) : hull.Price), "yard-price gold"); + inventory.Add(option); + } + + (int hullIndex, bool secondhand) = Offers[yardSelection]; + HullSpec chosen = Market.Hulls[hullIndex]; + var purchase = Card(columns, secondhand ? "Take delivery" : "Commission a hull", "narrow"); + AddLine(purchase, "Hull class", chosen.Name); + AddLine(purchase, "Decks at delivery", Market.FirstDecks.ToString()); + AddLine(purchase, "Maximum decks", chosen.MaxDecks.ToString()); + AddLine(purchase, "Module berths / deck", (chosen.Columns * chosen.Rows).ToString()); + AddLine(purchase, "Base fuel capacity", $"{chosen.Tank} t"); + AddLine(purchase, "Delivery port", "Miami"); + if (!secondhand) + { + AddText(purchase, "VESSEL NAME", "eyebrow control-label"); + var field = new TextField { value = shipName, maxLength = 24, name = "vessel-name" }; + field.AddToClassList("field"); + field.RegisterValueChangedCallback(evt => shipName = evt.newValue); + purchase.Add(field); + } + string block = company.ShipyardBlock(hullIndex, secondhand); + Button buy = Action(secondhand ? "Purchase vessel →" : "Commission hull →", () => + { + string failure = company.Acquire(hullIndex, secondhand, shipName); + if (failure == null) + { + deckIndex = 0; + ResetItinerary(); + page = secondhand ? 0 : 1; + } + Apply(failure, secondhand ? "The vessel is ready in Miami." : "The hull is ready. Fit cabins and dining before sailing."); + }, "primary full-button", "buy-ship"); + buy.SetEnabled(block == null); + if (block != null) + AddText(purchase, block, "body-copy"); + purchase.Add(buy); + + if (Ship == null) + return; + Ship ship = Ship; + var service = Card(pageRoot, "Maintenance", "second-row"); + var condition = Add(service, "maintenance-row"); + AddText(condition, $"{ship.Name} · {ship.Condition}% condition", "body-copy"); + int price = company.ServiceCost(ship); + Button overhaul = Action($"Overhaul · {Money(price)}", () => + { + string failure = company.Service(ship); + if (failure == null) + SetRecommendedFuel(); + Apply(failure, "The ship has been restored to 100% condition."); + }, "", "overhaul"); + overhaul.SetEnabled(price > 0 && company.Cash >= price); + condition.Add(overhaul); + } + } +} diff --git a/Assets/Soundings/Runtime/ConstructionPages.cs.meta b/Assets/Soundings/Runtime/ConstructionPages.cs.meta new file mode 100644 index 0000000..b080aa8 --- /dev/null +++ b/Assets/Soundings/Runtime/ConstructionPages.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d7c08f82b54746554b1dfb22ccc2734a \ No newline at end of file diff --git a/Assets/Soundings/Runtime/Harbor.cs b/Assets/Soundings/Runtime/Harbor.cs new file mode 100644 index 0000000..9ca190c --- /dev/null +++ b/Assets/Soundings/Runtime/Harbor.cs @@ -0,0 +1,215 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Soundings +{ + public sealed class Harbor : MonoBehaviour + { + private readonly Dictionary materials = new Dictionary(); + private readonly Dictionary reflections = new Dictionary(); + private readonly Dictionary backplates = new Dictionary(); + private readonly List shipMeshes = new List(); + private Camera viewCamera; + private Transform vessel; + private Material water; + private Mesh waterMesh; + private Shader surface, reflection; + private float backplateRatio, vesselLength = 71; + private int lastHull = -2, lastDecks; + private string currentBackplate; + private ulong lastLayout; + + public RenderTexture Frame { get; private set; } + + public void Initialize() + { + surface = Resources.Load("HarborSurface"); + reflection = Resources.Load("HarborReflection"); + water = new Material(Resources.Load("HarborWater")); + + var cameraObject = new GameObject("Harbor camera", typeof(Camera)); + cameraObject.transform.SetParent(transform, false); + viewCamera = cameraObject.GetComponent(); + viewCamera.orthographic = true; + viewCamera.clearFlags = CameraClearFlags.SolidColor; + viewCamera.backgroundColor = new Color(.09f, .17f, .23f); + viewCamera.nearClipPlane = .25f; + viewCamera.farClipPlane = 1050; + viewCamera.cullingMask = 1 << 8; + viewCamera.enabled = false; + + var center = new Vector3(3.2f, 3.5f, 0); + viewCamera.transform.position = center + new Vector3(61, 24, -104) * 2.3f; + viewCamera.transform.LookAt(center); + + var waterObject = new GameObject("Harbor backdrop and water", typeof(MeshFilter), typeof(MeshRenderer)); + waterObject.layer = 8; + waterObject.transform.SetParent(transform, false); + var ocean = new HarborMesh(); + ocean.Quad(new Vector3(-2000, 0, -2000), new Vector3(-2000, 0, 2000), + new Vector3(2000, 0, 2000), new Vector3(2000, 0, -2000)); + waterMesh = ocean.Bake(); + waterObject.GetComponent().sharedMesh = waterMesh; + waterObject.GetComponent().sharedMaterial = water; + } + + public void SetVisible(bool visible) => viewCamera.enabled = visible; + + private void SetHarbor(string region) + { + string backdrop = region switch + { + "Caribbean" or "South Pacific" => "IslandHarbor", + "Europe" or "Azores" or "Mediterranean" => "IberianHarbor", + _ => "HarborPlate" + }; + if (backdrop == currentBackplate) + return; + if (!backplates.TryGetValue(backdrop, out Texture2D plate)) + { + plate = Resources.Load("Art/" + backdrop); + plate.wrapMode = TextureWrapMode.Clamp; + backplates.Add(backdrop, plate); + } + currentBackplate = backdrop; + backplateRatio = (float)plate.width / plate.height; + water.SetTexture("_Backdrop", plate); + FitViewport(); + } + + public void Resize(int width, int height) + { + if (Frame != null && Frame.width == width && Frame.height == height) + return; + ReleaseFrame(); + var descriptor = new RenderTextureDescriptor(width, height, RenderTextureFormat.ARGB32, 24) { msaaSamples = 4 }; + descriptor.msaaSamples = Mathf.Max(1, SystemInfo.GetRenderTextureSupportedMSAASampleCount(descriptor)); + Frame = new RenderTexture(descriptor) { name = "Harbor viewport" }; + viewCamera.targetTexture = Frame; + FitViewport(); + } + + private void FitViewport() + { + if (Frame == null) + return; + float aspect = (float)Frame.width / Frame.height; + viewCamera.orthographicSize = Mathf.Max(15.4f, vesselLength * .59f / aspect); + water.SetVector("_BackdropCrop", new Vector4(Mathf.Min(1, aspect / backplateRatio), + Mathf.Min(1, backplateRatio / aspect), 0, 0)); + } + + public void Show(Ship ship) + { + SetHarbor(Market.Ports[ship.Port].Region); + int hullIndex = ship.HullIndex; + int deckCount = ship.Decks.Count; + ulong layout = 0; + foreach (Deck deck in ship.Decks) + foreach (Facility cell in deck.Cells) + layout = unchecked(layout * 31 + (uint)cell + 1); + + if (hullIndex == lastHull && deckCount == lastDecks && layout == lastLayout) + return; + + lastHull = hullIndex; + lastDecks = deckCount; + lastLayout = layout; + ReleaseShip(); + var root = new GameObject("Cruise vessel"); + vessel = root.transform; + vessel.SetParent(transform, false); + + vesselLength = 71 + hullIndex * 12; + float beam = 6.65f + hullIndex * .87f; + water.SetVector("_HullSpan", new Vector4(vesselLength, beam, 0, 0)); + FitViewport(); + + var exterior = new VesselExterior(ship, vesselLength, beam); + foreach (var (paint, batch) in exterior.Meshes()) + { + Mesh mesh = batch.Bake(); + shipMeshes.Add(mesh); + (Material finish, Material reflected) = Materials(paint); + Batch(mesh, finish); + Batch(mesh, reflected); + } + } + + private void Batch(Mesh mesh, Material material) + { + var draw = new GameObject(material.name, typeof(MeshFilter), typeof(MeshRenderer)); + draw.layer = 8; + draw.transform.SetParent(vessel, false); + draw.GetComponent().sharedMesh = mesh; + draw.GetComponent().sharedMaterial = material; + } + + private (Material Surface, Material Reflection) Materials(VesselExterior.Paint paint) + { + if (materials.TryGetValue(paint, out Material material)) + return (material, reflections[paint]); + + var (hex, roughness, metal, emissive, weather) = paint switch + { + VesselExterior.Paint.Navy => ("162737", .29f, .26f, 0f, .38f), + VesselExterior.Paint.Ivory => ("DBD9CE", .43f, .08f, 0f, .15f), + VesselExterior.Paint.Pearl => ("EDF0E9", .32f, .26f, 0f, .08f), + VesselExterior.Paint.Gold => ("BB8250", .27f, .66f, .05f, .13f), + VesselExterior.Paint.Teak => ("AE8766", .78f, 0f, 0f, .58f), + VesselExterior.Paint.TeakSeam => ("675145", .91f, 0f, 0f, .25f), + VesselExterior.Paint.Steel => ("8A9DA6", .27f, .76f, 0f, .20f), + VesselExterior.Paint.Black => ("172029", .43f, .25f, 0f, .28f), + VesselExterior.Paint.Glass => ("273E49", .18f, .47f, 0f, .08f), + VesselExterior.Paint.BlueGlass => ("4B6474", .20f, .53f, 0f, .06f), + VesselExterior.Paint.LitGlass => ("BB7643", .23f, .25f, .78f, .04f), + VesselExterior.Paint.Lounge => ("CC9570", .25f, .20f, .62f, .04f), + VesselExterior.Paint.Lifeboat => ("BD542D", .41f, .15f, 0f, .15f), + _ => ("318994", .16f, .40f, .05f, .13f) + }; + ColorUtility.TryParseHtmlString("#" + hex, out Color color); + material = new Material(surface) { color = color, name = paint.ToString() }; + material.SetFloat("_Roughness", roughness); + material.SetFloat("_Metal", metal); + material.SetFloat("_Emissive", emissive); + material.SetFloat("_Weather", weather); + var reflected = new Material(reflection) { color = color, name = paint + " reflection" }; + materials.Add(paint, material); + reflections.Add(paint, reflected); + return (material, reflected); + } + + private void ReleaseFrame() + { + if (Frame == null) + return; + viewCamera.targetTexture = null; + Frame.Release(); + Destroy(Frame); + } + + private void ReleaseShip() + { + if (vessel != null) + { + vessel.gameObject.SetActive(false); + Destroy(vessel.gameObject); + } + foreach (Mesh mesh in shipMeshes) + Destroy(mesh); + shipMeshes.Clear(); + } + + private void OnDestroy() + { + ReleaseFrame(); + ReleaseShip(); + foreach (Material material in materials.Values) + Destroy(material); + foreach (Material material in reflections.Values) + Destroy(material); + Destroy(water); + Destroy(waterMesh); + } + } +} diff --git a/Assets/Soundings/Runtime/Harbor.cs.meta b/Assets/Soundings/Runtime/Harbor.cs.meta new file mode 100644 index 0000000..adecfcc --- /dev/null +++ b/Assets/Soundings/Runtime/Harbor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 3d7444c4ca424fa37b26816e433645bf \ No newline at end of file diff --git a/Assets/Soundings/Runtime/HarborMesh.cs b/Assets/Soundings/Runtime/HarborMesh.cs new file mode 100644 index 0000000..a165eba --- /dev/null +++ b/Assets/Soundings/Runtime/HarborMesh.cs @@ -0,0 +1,147 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Soundings +{ + internal sealed class HarborMesh + { + private readonly List vertices = new List(); + private readonly List triangles = new List(); + + public Mesh Bake() + { + var mesh = new Mesh(); + if (vertices.Count > ushort.MaxValue) + mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; + mesh.SetVertices(vertices); + mesh.SetTriangles(triangles, 0); + mesh.RecalculateNormals(); + return mesh; + } + + public void Quad(Vector3 a, Vector3 b, Vector3 c, Vector3 d) + { + int start = vertices.Count; + vertices.Add(a); + vertices.Add(b); + vertices.Add(c); + vertices.Add(d); + Face(start, start + 1, start + 2, start + 3); + } + + public void Box(Vector3 center, Vector3 size) + { + Vector3 a = center - size * .5f; + Vector3 b = center + size * .5f; + var shape = new[] + { + new Vector2(a.x, a.z), new Vector2(b.x, a.z), new Vector2(b.x, b.z), new Vector2(a.x, b.z) + }; + + for (int i = 0; i < shape.Length; i++) + { + Vector2 p = shape[i]; + Vector2 q = shape[(i + 1) % shape.Length]; + Quad(Point(q, a.y), Point(p, a.y), Point(p, b.y), Point(q, b.y)); + } + Quad(Point(shape[0], b.y), Point(shape[3], b.y), Point(shape[2], b.y), Point(shape[1], b.y)); + Quad(Point(shape[0], a.y), Point(shape[1], a.y), Point(shape[2], a.y), Point(shape[3], a.y)); + } + + public void Loft(Vector2[] outline, Vector2 center, bool lid, params Vector3[] sections) + { + int start = vertices.Count; + int points = outline.Length; + foreach (Vector3 section in sections) + { + foreach (Vector2 p in outline) + { + Vector2 offset = p - center; + vertices.Add(new Vector3(center.x + offset.x * section.x, section.y, center.y + offset.y * section.z)); + } + } + + for (int height = 0; height < sections.Length - 1; height++) + for (int point = 0; point < points; point++) + { + int a = start + height * points + point; + int b = start + height * points + (point + 1) % points; + Face(b, a, a + points, b + points); + } + + if (!lid) + return; + int cap = vertices.Count; + Vector3 top = sections[sections.Length - 1]; + for (int i = 0; i < points; i++) + vertices.Add(vertices[start + (sections.Length - 1) * points + i]); + vertices.Add(new Vector3(center.x, top.y, center.y)); + for (int i = 0; i < points; i++) + AddTriangle(cap + i, cap + points, cap + (i + 1) % points); + } + + public void Rod(Vector3 from, Vector3 to, float radius, int sides = 6) + { + Vector3 axis = (to - from).normalized; + Vector3 cross = Vector3.Cross(axis, Vector3.up); + if (cross.sqrMagnitude < .001f) + cross = Vector3.Cross(axis, Vector3.forward); + Vector3 u = cross.normalized * radius; + Vector3 v = Vector3.Cross(axis, u); + int start = vertices.Count; + for (int i = 0; i < sides; i++) + { + float angle = i * Mathf.PI * 2 / sides; + Vector3 offset = u * Mathf.Cos(angle) + v * Mathf.Sin(angle); + vertices.Add(from + offset); + vertices.Add(to + offset); + } + for (int i = 0; i < sides; i++) + { + int a = start + i * 2; + int b = start + ((i + 1) % sides) * 2; + Face(a, b, b + 1, a + 1); + } + } + + public void Radome(Vector3 center, float radius) + { + int start = vertices.Count; + const int bands = 8; + const int slices = 12; + for (int j = 0; j <= bands; j++) + { + float elevation = Mathf.Lerp(-Mathf.PI * .5f, Mathf.PI * .5f, j / (float)bands); + for (int i = 0; i < slices; i++) + { + float rotation = i * Mathf.PI * 2 / slices; + Vector3 normal = new Vector3(Mathf.Cos(rotation) * Mathf.Cos(elevation), Mathf.Sin(elevation), + Mathf.Sin(rotation) * Mathf.Cos(elevation)); + vertices.Add(center + normal * radius); + } + } + for (int j = 0; j < bands; j++) + for (int i = 0; i < slices; i++) + { + int a = start + j * slices + i; + int b = start + j * slices + (i + 1) % slices; + Face(b, a, a + slices, b + slices); + } + } + + public static Vector3 Point(Vector2 position, float height) => new Vector3(position.x, height, position.y); + + private void Face(int a, int b, int c, int d) + { + AddTriangle(a, b, c); + AddTriangle(a, c, d); + } + + private void AddTriangle(int a, int b, int c) + { + triangles.Add(a); + triangles.Add(b); + triangles.Add(c); + } + } +} diff --git a/Assets/Soundings/Runtime/HarborMesh.cs.meta b/Assets/Soundings/Runtime/HarborMesh.cs.meta new file mode 100644 index 0000000..926b0f5 --- /dev/null +++ b/Assets/Soundings/Runtime/HarborMesh.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c3d33bcabb0ffe3028179c7c5ab0b018 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/Market.cs b/Assets/Soundings/Runtime/Market.cs new file mode 100644 index 0000000..2461144 --- /dev/null +++ b/Assets/Soundings/Runtime/Market.cs @@ -0,0 +1,175 @@ +using System; +using System.Collections.Generic; + +namespace Soundings +{ + public enum Facility { Empty, Cabin, Dining, Entertainment, Tank } + + public sealed class FacilitySpec + { + public readonly string Name, Mark, Details; + public readonly int Price, Capacity; + + public FacilitySpec(string name, string mark, string details, int price, int capacity) + { + Name = name; + Mark = mark; + Details = details; + Price = price; + Capacity = capacity; + } + } + + public sealed class HullSpec + { + public readonly string Name, Description; + public readonly int Columns, Rows, MaxDecks, Price, Voyages, Reputation, Tank, CrewPerDay, HullWearCost; + public readonly double TonsPerMile; + + public HullSpec(string name, string description, int columns, int rows, int maxDecks, int price, + int voyages, int reputation, int tank, double tonsPerMile, int crewPerDay, int hullWearCost) + { + Name = name; + Description = description; + Columns = columns; + Rows = rows; + MaxDecks = maxDecks; + Price = price; + Voyages = voyages; + Reputation = reputation; + Tank = tank; + TonsPerMile = tonsPerMile; + CrewPerDay = crewPerDay; + HullWearCost = hullWearCost; + } + } + + public sealed class PortSpec + { + public readonly string Name, Country, Region; + public readonly int FuelPrice, Fee, Permit, Reputation, MinimumHull; + public readonly double Appeal, MarketSize; + public readonly float MapX, MapY, Longitude, Latitude; + + public PortSpec(string name, string country, string region, int fuelPrice, int fee, int permit, + int reputation, int minimumHull, double appeal, double marketSize, float mapX, float mapY, float longitude, float latitude) + { + Name = name; + Country = country; + Region = region; + FuelPrice = fuelPrice; + Fee = fee; + Permit = permit; + Reputation = reputation; + MinimumHull = minimumHull; + Appeal = appeal; + MarketSize = marketSize; + MapX = mapX; + MapY = mapY; + Longitude = longitude; + Latitude = latitude; + } + } + + public readonly struct Lane + { + public readonly int A, B, Miles; + + public Lane(int a, int b, int miles) + { + A = a; + B = b; + Miles = miles; + } + + public int Other(int port) => port == A ? B : port == B ? A : -1; + } + + public static class Market + { + public const int StarterPortCount = 8; + public static int UsedPrice(int hull) => hull == 0 ? 105000 : 245000; + public const int FirstDecks = 2; + public const int MaxFleet = 8; + public const int Ocean = 2; + public const int Bermuda = 5; + public const int Lisbon = 7; + public const int MinFare = 150; + public const int MaxFare = 4000; + + public static readonly IReadOnlyList Facilities = new[] + { + new FacilitySpec("Clear berth", "–", "Recover 25% of the build cost", 0, 0), + new FacilitySpec("Cabins", "CB", "32 guest berths", 8400, 32), + new FacilitySpec("Dining hall", "DH", "48 seats · 3 services", 11800, 48), + new FacilitySpec("Show lounge", "SL", "80 seats · improves demand", 15400, 80), + new FacilitySpec("Bunker tank", "BT", "+65 t of fuel capacity", 14200, 65) + }; + + public static readonly IReadOnlyList Hulls = new[] + { + new HullSpec("Coastal", "A compact hull for short Caribbean crossings.", 6, 2, 3, 210000, 0, 0, 74, .092, 7200, 1200), + new HullSpec("Regional", "More deck space and range for island chains.", 8, 3, 4, 355000, 3, 24, 185, .121, 12800, 2300), + new HullSpec("Ocean Class", "A transatlantic hull for a world-class flagship.", 10, 3, 6, 690000, 9, 42, 440, .152, 21800, 4700) + }; + + public static readonly IReadOnlyList Ports = new[] + { + new PortSpec("Miami", "United States", "Florida", 685, 9200, 0, 0, 0, .94, 1.12, .14f, .63f, -80.2f, 25.8f), + new PortSpec("Nassau", "The Bahamas", "Caribbean", 825, 7600, 0, 0, 0, 1.14, .87, .24f, .67f, -77.4f, 25.1f), + new PortSpec("Key West", "United States", "Florida", 725, 5600, 14500, 15, 0, .91, .77, .11f, .78f, -81.8f, 24.6f), + new PortSpec("Cozumel", "Mexico", "Caribbean", 590, 8700, 21000, 21, 0, 1.10, .90, .06f, .94f, -87, 20.5f), + new PortSpec("San Juan", "Puerto Rico, U.S.", "Caribbean", 650, 10500, 34000, 25, 1, 1.17, 1.00, .39f, .86f, -66.1f, 18.5f), + new PortSpec("Bermuda", "United Kingdom", "North Atlantic", 910, 12100, 48000, 32, 1, 1.22, .83, .46f, .45f, -64.8f, 32.3f), + new PortSpec("Ponta Delgada", "Portugal", "Azores", 625, 9500, 57000, 42, 2, 1.20, .73, .69f, .42f, -25.7f, 37.7f), + new PortSpec("Lisbon", "Portugal", "Europe", 670, 14200, 71000, 45, 2, 1.37, 1.15, .87f, .26f, -9.1f, 38.7f), + new PortSpec("Barcelona", "Spain", "Mediterranean", 688, 16200, 37000, 46, 2, 1.33, 1.18, 0, 0, 2.2f, 41.4f), + new PortSpec("Port Said", "Egypt", "Mediterranean", 604, 19200, 33000, 48, 2, 1.20, .99, 0, 0, 32.3f, 31.3f), + new PortSpec("Salalah", "Oman", "Indian Ocean", 559, 11900, 31000, 48, 2, 1.25, .94, 0, 0, 54.1f, 17.0f), + new PortSpec("Mumbai", "India", "Indian Ocean", 588, 15100, 45000, 50, 2, 1.32, 1.19, 0, 0, 72.8f, 19.1f), + new PortSpec("Singapore", "Singapore", "Southeast Asia", 570, 16800, 52000, 52, 2, 1.37, 1.27, 0, 0, 103.8f, 1.3f), + new PortSpec("Benoa", "Indonesia", "Southeast Asia", 634, 12800, 42000, 52, 2, 1.35, 1.02, 0, 0, 115.2f, -8.7f), + new PortSpec("Sydney", "Australia", "Oceania", 740, 16700, 51000, 55, 2, 1.42, 1.20, 0, 0, 151.2f, -33.9f), + new PortSpec("Auckland", "New Zealand", "Oceania", 721, 13400, 46000, 55, 2, 1.36, 1.11, 0, 0, 174.8f, -36.8f), + new PortSpec("Papeete", "French Polynesia", "South Pacific", 771, 13800, 42000, 55, 2, 1.44, 1.12, 0, 0, -149.6f, -17.5f), + new PortSpec("Honolulu", "United States", "North Pacific", 757, 16200, 52000, 58, 2, 1.41, 1.16, 0, 0, -157.9f, 21.3f), + new PortSpec("San Diego", "United States", "Pacific Coast", 718, 15300, 51000, 58, 2, 1.35, 1.21, 0, 0, -117.2f, 32.7f), + new PortSpec("Puerto Vallarta", "Mexico", "Pacific Coast", 606, 11900, 36000, 58, 2, 1.29, 1.03, 0, 0, -105.2f, 20.7f), + new PortSpec("Balboa", "Panama", "Central America", 635, 22700, 43000, 58, 2, 1.26, 1.07, 0, 0, -79.6f, 8.9f), + new PortSpec("Cartagena", "Colombia", "South America", 599, 14600, 45000, 58, 2, 1.35, 1.12, 0, 0, -75.5f, 10.4f) + }; + + public static readonly IReadOnlyList Lanes = new[] + { + new Lane(0, 1, 185), new Lane(0, 2, 150), new Lane(1, 2, 270), new Lane(2, 3, 455), + new Lane(0, 3, 590), new Lane(0, 4, 985), new Lane(1, 4, 735), new Lane(1, 5, 840), + new Lane(0, 5, 913), new Lane(4, 5, 865), new Lane(5, 6, 1920), new Lane(5, 7, 2790), + new Lane(6, 7, 815), new Lane(7, 8, 605), new Lane(8, 9, 1630), new Lane(9, 10, 1645), + new Lane(10, 11, 1160), new Lane(11, 12, 2510), new Lane(12, 13, 920), new Lane(13, 14, 2540), + new Lane(14, 15, 1165), new Lane(15, 16, 2250), new Lane(16, 17, 2380), new Lane(17, 18, 2270), + new Lane(18, 19, 1110), new Lane(19, 20, 1585), new Lane(20, 21, 265), new Lane(21, 0, 1080) + }; + + public static int FuelPrice(int port, int day) + { + int weeklyMove = ((day / 7 * 13 + port * 9) % 31) - 15; + return Ports[port].FuelPrice + weeklyMove; + } + + public static bool TryDistance(int origin, int destination, out int miles) + { + foreach (Lane lane in Lanes) + { + if (lane.Other(origin) == destination && destination >= 0) + { + miles = lane.Miles; + return true; + } + } + miles = 0; + return false; + } + + public static int Clamp(int value, int min, int max) => Math.Max(min, Math.Min(max, value)); + } +} diff --git a/Assets/Soundings/Runtime/Market.cs.meta b/Assets/Soundings/Runtime/Market.cs.meta new file mode 100644 index 0000000..d53d516 --- /dev/null +++ b/Assets/Soundings/Runtime/Market.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 96e5e10e080e77a3db442f211cc172f4 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/OperationsPage.cs b/Assets/Soundings/Runtime/OperationsPage.cs new file mode 100644 index 0000000..53f4938 --- /dev/null +++ b/Assets/Soundings/Runtime/OperationsPage.cs @@ -0,0 +1,167 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp + { + private void DrawOperations(VisualElement pageRoot) + { + if (Ship == null) + { + var empty = Card(pageRoot, "No vessel in service"); + AddText(empty, "Buy a pre-owned vessel or commission a hull from the shipyard.", "body-copy"); + empty.Add(Action("Open shipyard →", () => ChangePage(2), "primary")); + return; + } + + Ship ship = Ship; + Voyage quote = company.Forecast(ship, destination); + PortSpec port = Market.Ports[ship.Port]; + var upper = Add(pageRoot, "columns"); + var hero = Add(upper, "wide hero"); + AddHarbor(hero); + var portTag = Add(hero, "hero-port"); + AddText(portTag, $"● BERTHED IN {port.Name.ToUpperInvariant()}", "tag on-image"); + var shipLabel = Add(hero, "hero-label"); + AddDisplay(shipLabel, ship.Name, "hero-title"); + AddText(shipLabel, $"{ship.Hull.Name.ToUpperInvariant()} / {ship.Decks.Count} DECKS", "eyebrow on-image"); + + var forecast = Card(upper, "Voyage forecast", "narrow forecast"); + AddText(forecast, quote != null ? $"{port.Name} → {Market.Ports[destination].Name}" : "No itinerary selected", "forecast-route"); + var paired = Add(forecast, "paired"); + ForecastMetric(paired, "PROJECTED PROFIT", quote == null ? "—" : Money(quote.NetIncome), + quote == null ? "" : quote.NetIncome >= 0 ? "gain" : "loss"); + ForecastMetric(paired, "EXPECTED GUESTS", quote == null ? "—" : $"{quote.Guests} / {quote.Capacity}"); + AddLine(forecast, "Duration", quote == null ? "—" : $"{quote.Days} days"); + AddLine(forecast, "Sailing distance", quote == null ? "—" : $"{quote.Miles:N0} nm"); + AddLine(forecast, "Fuel burn + reserve", quote == null ? "—" : $"{quote.FuelBurn} + {quote.Reserve} t"); + + var lower = Add(pageRoot, "columns second-row"); + var itinerary = Card(lower, "Itinerary & fares", "wide"); + AddText(itinerary, "DESTINATION", "eyebrow control-label"); + var choices = new List(); + var destinations = new List(); + foreach (Lane lane in Market.Lanes) + { + int other = lane.Other(ship.Port); + if (other < 0) + continue; + PortSpec candidate = Market.Ports[other]; + string status = !company.Permits[other] ? " · Permit required" : ship.HullIndex < candidate.MinimumHull ? " · Larger hull" : ""; + choices.Add($"{candidate.Name} · {lane.Miles:N0} nm{status}"); + destinations.Add(other); + } + if (destinations.Count > 0) + { + int selected = destinations.IndexOf(destination); + var dropdown = new DropdownField(choices, selected) { name = "destination" }; + dropdown.AddToClassList("field"); + dropdown.RegisterValueChangedCallback(evt => + { + destination = destinations[choices.IndexOf(evt.newValue)]; + SetRecommendedFuel(); + Notify(null); + Render(); + }); + itinerary.Add(dropdown); + } + + var fare = Add(itinerary, "control-row"); + var fareDescription = Add(fare, "control-copy"); + AddText(fareDescription, "PASSENGER FARE", "eyebrow"); + AddText(fareDescription, "Per guest, all sailing days", "muted"); + Stepper(fare, Money(ship.Fare), "fare", () => ChangeFare(ship, -50), () => ChangeFare(ship, 50), + ship.Fare > Market.MinFare, ship.Fare < Market.MaxFare); + string reason = company.DepartureBlock(ship, quote); + var dispatch = Add(itinerary, "dispatch"); + string readiness = reason ?? "Ready to depart. Settlement posts on arrival."; + AddText(dispatch, readiness, reason == null ? "readiness gain" : "readiness"); + Button launch = Action("Dispatch voyage →", () => + { + string failure = company.Sail(ship, destination); + if (failure == null) + { + ResetItinerary(); + selectedVoyage = 0; + page = 4; + } + Apply(failure, $"Arrived in {Market.Ports[ship.Port].Name}. Voyage posted to the ledger."); + }, "primary", "dispatch"); + launch.SetEnabled(reason == null); + dispatch.Add(launch); + + var bunker = Card(lower, "Bunkering", "narrow bunker"); + AddText(bunker, $"{port.Name} / {port.Country}", "muted"); + AddLine(bunker, "Fuel aboard", $"{ship.Fuel} / {ship.Tank} t"); + var meter = Add(bunker, "meter"); + var fill = Add(meter, "meter-fill"); + fill.style.width = Length.Percent(100f * ship.Fuel / ship.Tank); + AddLine(bunker, "Indicative safe range", $"{ship.SafeRange:N0} nm"); + AddLine(bunker, "Local bunker price", $"{Money(Market.FuelPrice(ship.Port, company.Day))} / t"); + var fuelControls = Add(bunker, "control-row fuel-controls"); + Stepper(fuelControls, $"{bunkerTons} t", "tons", () => ChangeQuantity(ship, -10), () => ChangeQuantity(ship, 10), + bunkerTons > 0, bunkerTons < ship.Tank - ship.Fuel); + Button purchase = Action($"Buy · {Money(company.BunkerCost(ship, bunkerTons))}", () => + { + int quantity = bunkerTons; + string failure = company.Refuel(ship, quantity); + if (failure == null) + SetRecommendedFuel(); + Apply(failure, $"Loaded {quantity} t of fuel in {port.Name}."); + }, "", "buy-fuel"); + purchase.SetEnabled(bunkerTons > 0 && company.Cash >= company.BunkerCost(ship, bunkerTons)); + fuelControls.Add(purchase); + } + + private void ChangeFare(Ship ship, int amount) + { + ship.Fare = Market.Clamp(ship.Fare + amount, Market.MinFare, Market.MaxFare); + Apply(null, null); + } + + private void ChangeQuantity(Ship ship, int amount) + { + bunkerTons = Mathf.Clamp(bunkerTons + amount, 0, ship.Tank - ship.Fuel); + Notify(null); + Render(); + } + + private static void Stepper(VisualElement parent, string value, string id, Action minus, Action plus, bool canMinus, bool canPlus) + { + var stepper = Add(parent, "stepper"); + Button down = Action("−", minus, "step", id + "-minus"); + down.tooltip = id == "fare" ? "Lower passenger fare by $50" : "Buy 10 fewer tons"; + down.SetEnabled(canMinus); + stepper.Add(down); + AddText(stepper, value, "step-value"); + Button up = Action("+", plus, "step", id + "-plus"); + up.tooltip = id == "fare" ? "Raise passenger fare by $50" : "Buy 10 more tons"; + up.SetEnabled(canPlus); + stepper.Add(up); + } + + private static VisualElement Card(VisualElement parent, string titleText, string classes = "") + { + var card = Add(parent, "card " + classes); + AddText(card, titleText, "card-title"); + return card; + } + + private static void ForecastMetric(VisualElement parent, string caption, string value, string modifier = "") + { + var field = Add(parent, "forecast-metric"); + AddText(field, caption, "eyebrow"); + AddText(field, value, "forecast-value " + modifier); + } + + private static void AddLine(VisualElement parent, string description, string value, string modifier = "") + { + var measure = Add(parent, "measure"); + AddText(measure, description, "measure-label"); + AddText(measure, value, "measure-value " + modifier); + } + } +} diff --git a/Assets/Soundings/Runtime/OperationsPage.cs.meta b/Assets/Soundings/Runtime/OperationsPage.cs.meta new file mode 100644 index 0000000..1986cee --- /dev/null +++ b/Assets/Soundings/Runtime/OperationsPage.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 259d045921e5a0e0ebe842b2de501337 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/SoundingsApp.cs b/Assets/Soundings/Runtime/SoundingsApp.cs new file mode 100644 index 0000000..e10ee7d --- /dev/null +++ b/Assets/Soundings/Runtime/SoundingsApp.cs @@ -0,0 +1,442 @@ +using System; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp : MonoBehaviour + { + private const string SaveKey = "soundings.company.v1"; + private static readonly string[] Pages = { "Operations", "Deck plans", "Shipyard", "Ports", "Finance" }; + private Company company; + private Harbor harbor; + private PanelSettings panel; + private VisualElement root; + private Font displayFont; + private ScrollView pageScroll; + private bool title = true; + private bool? pendingStart; + private int page, renderedPage = -1, deckIndex, destination = -1, bunkerTons, yardSelection; + private Facility tool = Facility.Cabin; + private string shipName = "Peregrine"; + private string notice; + private bool warning; + private bool autoSmoke; + private Ship Ship => company?.ActiveShip; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] + private static void Boot() + { + var game = new GameObject("Soundings"); + game.AddComponent().Initialize(); + } + + private void Initialize() + { + Culture(); + autoSmoke = Array.IndexOf(Environment.GetCommandLineArgs(), "-soundings-smoke") >= 0; + Application.targetFrameRate = 60; + harbor = gameObject.AddComponent(); + harbor.Initialize(); + displayFont = Resources.Load("Display"); + panel = ScriptableObject.CreateInstance(); + panel.scaleMode = PanelScaleMode.ScaleWithScreenSize; + panel.referenceResolution = new Vector2Int(1440, 810); + panel.screenMatchMode = PanelScreenMatchMode.MatchWidthOrHeight; + panel.match = 0; + panel.themeStyleSheet = Resources.Load("SoundingsTheme"); + var document = gameObject.AddComponent(); + document.panelSettings = panel; + root = document.rootVisualElement; + root.style.flexGrow = 1; + root.styleSheets.Add(Resources.Load("Soundings")); + company = autoSmoke ? null : Load(); + Render(); + if (autoSmoke) + StartCoroutine(VisualSmoke()); + } + + private static void Culture() + { + System.Globalization.CultureInfo.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("en-US"); + } + + private Company Load() + { + if (!PlayerPrefs.HasKey(SaveKey)) + return null; + try + { + Company loaded = JsonUtility.FromJson(PlayerPrefs.GetString(SaveKey)); + if (loaded != null && loaded.CanLoad()) + return loaded; + } + catch (ArgumentException exception) + { + Debug.LogWarning("Could not read the company save. " + exception.Message); + } + notice = "The company save could not be read."; + warning = true; + return null; + } + + private void Save() + { + if (autoSmoke) + return; + PlayerPrefs.SetString(SaveKey, JsonUtility.ToJson(company)); + PlayerPrefs.Save(); + } + + private void StartCompany(bool financed) + { + company = Company.Start(financed); + title = false; + page = financed ? 2 : 0; + yardSelection = 1; + deckIndex = 0; + inspectedPort = 1; + selectedVoyage = 0; + worldChart = false; + tool = Facility.Cabin; + shipName = "Peregrine"; + pendingStart = null; + ResetItinerary(); + Notify(financed ? "Choose a hull in the shipyard to begin." : "Meridian is fueled for its first sailing to Nassau."); + Save(); + Render(); + } + + private void ResetItinerary() + { + destination = -1; + bunkerTons = 0; + if (Ship == null) + return; + foreach (Lane lane in Market.Lanes) + { + int other = lane.Other(Ship.Port); + if (other >= 0 && company.Permits[other] && Ship.HullIndex >= Market.Ports[other].MinimumHull) + { + destination = other; + break; + } + } + SetRecommendedFuel(); + } + + private void SetRecommendedFuel() + { + if (Ship == null) + return; + Voyage quote = company.Forecast(Ship, destination); + int preferred = Mathf.Max(10, (quote?.RequiredFuel ?? 10) - Ship.Fuel); + bunkerTons = Mathf.Clamp(preferred, 0, Ship.Tank - Ship.Fuel); + } + + private void ChangePage(int next) + { + page = next; + if (destination < 0) + ResetItinerary(); + Notify(null); + Render(); + } + + private void Notify(string message, bool failed = false) + { + notice = message; + warning = failed; + } + + private void Apply(string failure, string success) + { + Notify(failure ?? success, failure != null); + if (failure == null) + Save(); + Render(); + } + + private void Render() + { + string focus = (root.focusController?.focusedElement as VisualElement)?.name; + float scrollOffset = page == renderedPage ? pageScroll?.verticalScroller.value ?? 0 : 0; + root.Clear(); + bool showingVessel = !title && Ship != null && (page == 0 || page == 1); + harbor.SetVisible(showingVessel); + if (showingVessel) + harbor.Show(Ship); + if (title || company == null) + { + pageScroll = null; + renderedPage = -1; + DrawTitle(); + } + else + { + renderedPage = page; + DrawShell(); + } + + if (pageScroll != null && scrollOffset > 0) + { + ScrollView scroll = pageScroll; + scroll.schedule.Execute(() => scroll.verticalScroller.value = scrollOffset); + } + if (!string.IsNullOrEmpty(focus)) + root.schedule.Execute(() => root.Q(focus)?.Focus()); + } + + private void DrawTitle() + { + var screen = Add(root, "title-screen"); + var intro = Add(screen, "title-intro"); + var crest = Add(intro, "brand crest"); + AddMark(crest); + AddText(intro, "CRUISE LINE SIMULATOR", "eyebrow"); + AddDisplay(intro, "Soundings", "title-display"); + AddText(intro, "From a single ship to a world-spanning cruise line.", "title-copy"); + + if (pendingStart.HasValue) + { + AddText(intro, "Replace your saved company?", "card-title"); + AddText(intro, "Starting a new company overwrites your current fleet and voyage history.", "body-copy"); + intro.Add(Action("Replace and start", () => StartCompany(pendingStart.Value), "primary title-action", "replace")); + intro.Add(Action("Keep current company", () => { pendingStart = null; Render(); }, "title-action", "keep")); + } + else + { + if (company != null) + intro.Add(Action("Resume company →", () => + { + title = false; + ResetItinerary(); + Notify(null); + Render(); + }, "primary title-action", "resume")); + StartOption(intro, "Take over a regional ship", "Used coastal ship · $135,000 cash · No debt", false); + StartOption(intro, "Finance a new fleet", "$580,000 cash · $500,000 loan · Empty fleet", true); + } + + AddNotice(intro); + var picture = Add(screen, "title-visual"); + var artwork = new Image + { + image = Resources.Load("Art/FlagshipTitle"), + scaleMode = ScaleMode.ScaleAndCrop, + pickingMode = PickingMode.Ignore + }; + artwork.AddToClassList("harbor-image"); + picture.Add(artwork); + var location = Add(picture, "splash-location"); + AddText(location, "OCEAN CLASS", "eyebrow on-image"); + AddText(location, "FLAGSHIP CONCEPT", "tag on-image"); + } + + private void StartOption(VisualElement parent, string titleText, string description, bool financed) + { + Button option = Action("", () => + { + if (company == null) + StartCompany(financed); + else + { + pendingStart = financed; + Render(); + } + }, "start-option", financed ? "start-financed" : "start-used"); + AddText(option, titleText, "option-title"); + AddText(option, description, "muted"); + parent.Add(option); + } + + private void DrawShell() + { + var shell = Add(root, "shell"); + var mast = Add(shell, "mast"); + var brand = Add(mast, "brand mast-brand"); + AddMark(brand); + AddText(brand, "Soundings", "brand-type"); + AddText(brand, "CRUISE LINE SIMULATOR", "mast-sub"); + var metrics = Add(mast, "mast-metrics"); + HeadMetric(metrics, "CASH", Money(company.Cash), "gold"); + HeadMetric(metrics, "REPUTATION", $"{company.Reputation} / 100"); + HeadMetric(metrics, "DAY", company.Day.ToString("00")); + mast.Add(Action("Company menu", () => { title = true; Notify(null); Render(); }, "menu-button", "company-menu")); + + var body = Add(shell, "body"); + var rail = Add(body, "rail"); + AddText(rail, "MANAGEMENT", "rail-heading eyebrow"); + for (int i = 0; i < Pages.Length; i++) + { + int target = i; + Button nav = Action("", () => ChangePage(target), page == i ? "nav current" : "nav", "nav-" + i); + AddText(nav, Pages[i], "nav-name"); + rail.Add(nav); + } + + AddText(rail, $"FLEET / {company.Fleet.Count:00}", "rail-heading fleet-heading eyebrow"); + var fleet = new ScrollView(ScrollViewMode.Vertical) { verticalScrollerVisibility = ScrollerVisibility.Auto }; + fleet.AddToClassList("fleet-scroll"); + rail.Add(fleet); + for (int i = 0; i < company.Fleet.Count; i++) + { + int selected = i; + Ship ship = company.Fleet[i]; + Button entry = Action("", () => + { + company.SelectedShip = selected; + deckIndex = 0; + ResetItinerary(); + Apply(null, null); + }, i == company.SelectedShip ? "ship-item selected" : "ship-item", "fleet-" + i); + AddText(entry, ship.Name, "ship-name"); + AddText(entry, Market.Ports[ship.Port].Name + " · " + ship.Hull.Name, "ship-location"); + fleet.Add(entry); + } + if (company.Fleet.Count == 0) + AddText(fleet, "No ships yet", "fleet-empty"); + + var goal = Add(rail, "rail-goal"); + AddText(goal, company.Flagship ? "MILESTONE REACHED" : "FLAGSHIP MILESTONE", "eyebrow"); + AddText(goal, company.Flagship ? "Atlantic crossing complete" : "Bermuda → Lisbon", "goal-name"); + AddText(goal, company.Flagship ? "Continue running your fleet." : "Ocean Class · 320 berths · 160 show seats", "goal-detail"); + + pageScroll = new ScrollView(ScrollViewMode.Vertical); + pageScroll.AddToClassList("page-scroll"); + body.Add(pageScroll); + var canvas = Add(pageScroll, "page"); + var head = Add(canvas, "page-head"); + var heading = Add(head, "heading"); + AddDisplay(heading, Pages[page], "page-title"); + AddText(head, page == 0 && Ship != null ? Market.Ports[Ship.Port].Region.ToUpperInvariant() + : $"{company.Voyages:00} VOYAGES / GLOBAL NETWORK", "page-meta eyebrow"); + AddNotice(canvas); + switch (page) + { + case 0: DrawOperations(canvas); break; + case 1: DrawDecks(canvas); break; + case 2: DrawShipyard(canvas); break; + case 3: DrawPorts(canvas); break; + case 4: DrawFinance(canvas); break; + } + } + + private void AddHarbor(VisualElement holder) + { + var view = new Image { scaleMode = ScaleMode.StretchToFill, pickingMode = PickingMode.Ignore }; + view.AddToClassList("harbor-image"); + holder.Add(view); + holder.RegisterCallback(evt => + { + if (evt.newRect.width < 32 || evt.newRect.height < 32) + return; + float panelWidth = root.resolvedStyle.width; + float scale = panelWidth > 0 ? Screen.width / panelWidth : 1; + if (Application.platform != RuntimePlatform.WebGLPlayer) + scale *= Mathf.Clamp(1250 / (evt.newRect.width * scale), 1, 2); + int width = Mathf.Clamp(Mathf.RoundToInt(evt.newRect.width * scale), 32, SystemInfo.maxTextureSize); + int height = Mathf.Clamp(Mathf.RoundToInt(evt.newRect.height * scale), 32, SystemInfo.maxTextureSize); + harbor.Resize(width, height); + view.image = harbor.Frame; + }); + if (harbor.Frame != null) + view.image = harbor.Frame; + } + + private void AddNotice(VisualElement parent) + { + if (string.IsNullOrEmpty(notice)) + return; + Label banner = AddText(parent, notice, warning ? "notice warning" : "notice"); + banner.SetEnabled(true); + } + + private static void AddMark(VisualElement parent) + { + var mark = Add(parent, "brand-mark"); + mark.generateVisualContent += context => + { + Painter2D painter = context.painter2D; + painter.lineWidth = 1.35f; + painter.strokeColor = new Color(.91f, .74f, .48f); + painter.BeginPath(); + painter.MoveTo(new Vector2(16, 2)); + painter.LineTo(new Vector2(29, 10)); + painter.LineTo(new Vector2(29, 24)); + painter.LineTo(new Vector2(16, 32)); + painter.LineTo(new Vector2(3, 24)); + painter.LineTo(new Vector2(3, 10)); + painter.ClosePath(); + painter.Stroke(); + painter.BeginPath(); + painter.MoveTo(new Vector2(8, 20)); + painter.LineTo(new Vector2(13, 15)); + painter.LineTo(new Vector2(16, 19)); + painter.LineTo(new Vector2(21, 13)); + painter.LineTo(new Vector2(24, 17)); + painter.MoveTo(new Vector2(8, 24)); + painter.LineTo(new Vector2(24, 24)); + painter.Stroke(); + }; + } + + private static void HeadMetric(VisualElement parent, string label, string value, string modifier = "") + { + var metric = Add(parent, "head-metric"); + AddText(metric, label, "eyebrow"); + AddText(metric, value, "head-value " + modifier); + } + + private static void Classes(VisualElement element, string classes) + { + foreach (string item in classes.Split(' ')) + if (item.Length != 0) + element.AddToClassList(item); + } + + private static VisualElement Add(VisualElement parent, string classes) + { + var element = new VisualElement(); + Classes(element, classes); + parent.Add(element); + return element; + } + + private static Label Text(string value, string classes) + { + var label = new Label(value) { pickingMode = PickingMode.Ignore }; + Classes(label, classes); + return label; + } + + private static Label AddText(VisualElement parent, string value, string classes) + { + var label = Text(value, classes); + parent.Add(label); + return label; + } + + private Label AddDisplay(VisualElement parent, string value, string classes) + { + Label label = AddText(parent, value, classes); + label.style.unityFontDefinition = FontDefinition.FromFont(displayFont); + return label; + } + + private static Button Action(string text, Action clicked, string classes = "", string id = null) + { + var button = new Button(clicked) { text = text, name = id ?? text }; + Classes(button, "action " + classes); + return button; + } + + private static string Money(long amount) => amount < 0 ? "−" + (-amount).ToString("C0") : amount.ToString("C0"); + + private void OnDestroy() + { + if (panel != null) + Destroy(panel); + } + } +} diff --git a/Assets/Soundings/Runtime/SoundingsApp.cs.meta b/Assets/Soundings/Runtime/SoundingsApp.cs.meta new file mode 100644 index 0000000..08d3123 --- /dev/null +++ b/Assets/Soundings/Runtime/SoundingsApp.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 098c820e940ee8cb89ed6d3b22bb3384 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/VesselExterior.cs b/Assets/Soundings/Runtime/VesselExterior.cs new file mode 100644 index 0000000..8e99740 --- /dev/null +++ b/Assets/Soundings/Runtime/VesselExterior.cs @@ -0,0 +1,269 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Soundings +{ + internal sealed class VesselExterior + { + internal enum Paint { Navy, Ivory, Pearl, Gold, Teak, TeakSeam, Steel, Black, Glass, BlueGlass, LitGlass, Lounge, Lifeboat, Pool } + + private readonly Dictionary batches = new Dictionary(); + private readonly Ship ship; + private readonly float length, beam; + private readonly int balconies; + + public VesselExterior(Ship ship, float length, float beam) + { + this.ship = ship; + this.length = length; + this.beam = beam; + balconies = 21 + ship.HullIndex * 6; + } + + public IReadOnlyDictionary Meshes() + { + BuildHull(); + for (int deck = 0; deck < ship.Decks.Count; deck++) + BuildPassengerDeck(deck); + BuildBridgeAndRoof(); + BuildLifeboats(); + return batches; + } + + private HarborMesh Coat(Paint paint) + { + if (!batches.TryGetValue(paint, out HarborMesh batch)) + batches.Add(paint, batch = new HarborMesh()); + return batch; + } + + private void BuildHull() + { + Vector2[] outline = Outline(length, beam, 0); + Vector2 center = Vector2.zero; + Coat(Paint.Navy).Loft(outline, center, false, new Vector3(.88f, -2.65f, .55f), + new Vector3(.967f, -.83f, .87f), new Vector3(.99f, .28f, .97f), + new Vector3(1, 2.34f, 1), new Vector3(1.01f, 4.65f, 1.03f)); + Coat(Paint.Gold).Loft(outline, center, false, new Vector3(1.013f, 3.54f, 1.025f), + new Vector3(1.013f, 3.69f, 1.026f)); + Coat(Paint.Ivory).Loft(outline, center, true, new Vector3(.998f, 4.47f, 1.015f), + new Vector3(1.013f, 5.14f, 1.027f), new Vector3(1.003f, 5.32f, 1.015f)); + Vector2[] promenade = Outline(length * .971f, beam * .979f, 0); + Coat(Paint.Teak).Loft(promenade, center, true, new Vector3(.997f, 5.32f, 1), + new Vector3(1, 5.38f, 1)); + Rails(promenade, 5.39f, 5.99f, 2.7f); + + for (int side = -1; side <= 1; side += 2) + { + for (int i = 0; i < 24; i++) + { + float x = -length * .40f + i * length * .0285f; + float z = side * beam * 1.024f * SideWidth(x / length + .50f); + Coat(Paint.Black).Box(new Vector3(x, 2.7f, z), new Vector3(.46f, .56f, .18f)); + Paint pane = (i + 3 * side) % 5 == 0 ? Paint.LitGlass : Paint.BlueGlass; + Coat(pane).Box(new Vector3(x, 2.72f, z + side * .09f), new Vector3(.31f, .38f, .09f)); + } + } + + float fore = length * .397f; + Coat(Paint.Steel).Rod(new Vector3(fore, 5.35f, 0), new Vector3(fore, 7.24f, 0), .13f); + Coat(Paint.Gold).Rod(new Vector3(fore, 6.48f, -.82f), new Vector3(fore, 6.48f, .82f), .048f); + for (int side = -1; side <= 1; side += 2) + for (int i = 0; i < 3; i++) + { + float x = length * (.32f + i * .032f); + float z = side * beam * (.52f - i * .135f); + Coat(Paint.Black).Rod(new Vector3(x, 5.37f, z), new Vector3(x, 5.74f, z), .15f); + Coat(Paint.Steel).Box(new Vector3(x, 5.73f, z), new Vector3(.50f, .085f, .32f)); + } + } + + private void BuildPassengerDeck(int deck) + { + float y = 5.38f + deck * 1.88f; + var (deckLength, deckBeam, offset) = DeckFootprint(deck); + Vector2 center = new Vector2(offset, 0); + Vector2[] outline = Outline(deckLength, deckBeam, offset); + Coat(Paint.Ivory).Loft(outline, center, false, new Vector3(.97f, y, .77f), + new Vector3(.99f, y + .25f, .83f), new Vector3(.99f, y + 1.49f, .83f)); + Coat(Paint.Pearl).Loft(outline, center, true, new Vector3(.993f, y + 1.49f, .96f), + new Vector3(1.017f, y + 1.57f, 1.01f), new Vector3(1.017f, y + 1.73f, 1.015f), + new Vector3(1, y + 1.82f, 1)); + Coat(Paint.Teak).Loft(outline, center, true, new Vector3(.992f, y + 1.82f, .989f), + new Vector3(.994f, y + 1.88f, .992f)); + Rails(outline, y + 1.88f, y + 2.38f, 2.4f); + + float width = .70f * deckLength / balconies; + for (int i = 0; i < balconies; i++) + { + float x = offset + Mathf.Lerp(-.39f, .31f, (float)i / (balconies - 1)) * deckLength; + float cross = SideWidth((x - offset) / deckLength + .5f); + int column = i * ship.Hull.Columns / balconies; + + for (int side = -1; side <= 1; side += 2) + { + int row = side < 0 ? 0 : ship.Hull.Rows - 1; + Facility facility = ship.Decks[deck].Cells[row * ship.Hull.Columns + column]; + float z = side * deckBeam * cross; + Vector3 glass = new Vector3(x, y + .91f, z * .846f); + Coat(Paint.Black).Box(glass, new Vector3(width * 1.01f, 1.21f, .17f)); + float divider = width * .21f; + Paint illumination = facility switch + { + Facility.Dining => Paint.LitGlass, + Facility.Entertainment => Paint.Lounge, + Facility.Cabin when (i + deck * 5 + row * 3) % 7 < 4 => Paint.LitGlass, + Facility.Tank => Paint.Black, + _ => Paint.Glass + }; + for (int pane = -1; pane <= 1; pane += 2) + Coat(pane < 0 ? illumination : Paint.BlueGlass).Box(glass + new Vector3(pane * divider, .025f, side * .09f), + new Vector3(width * .38f, .98f, .09f)); + + if (facility == Facility.Tank) + continue; + Coat(Paint.Teak).Box(new Vector3(x, y + .28f, z * .935f), new Vector3(width * 1.10f, .12f, Mathf.Abs(z) * .19f)); + Coat(Paint.BlueGlass).Box(new Vector3(x, y + .48f, z * 1.016f), new Vector3(width * .96f, .32f, .05f)); + Coat(Paint.Pearl).Box(new Vector3(x, y + .67f, z * 1.02f), new Vector3(width * 1.045f, .047f, .055f)); + Coat(Paint.Pearl).Box(new Vector3(x + width * .52f, y + .52f, z * 1.02f), new Vector3(.055f, .32f, .075f)); + } + } + } + + private void BuildBridgeAndRoof() + { + int deck = ship.Decks.Count - 1; + var (deckLength, deckBeam, offset) = DeckFootprint(deck); + float top = 5.38f + ship.Decks.Count * 1.88f; + float bridge = offset + deckLength * .30f; + Vector2 center = new Vector2(bridge, 0); + Vector2[] capsule = Outline(deckLength * .27f, deckBeam * .83f, bridge); + Coat(Paint.Ivory).Loft(capsule, center, false, new Vector3(.91f, top, .91f), + new Vector3(1, top + .32f, 1)); + Coat(Paint.Glass).Loft(capsule, center, false, new Vector3(1, top + .32f, 1), + new Vector3(.90f, top + 1.09f, .95f)); + Coat(Paint.Pearl).Loft(capsule, center, true, new Vector3(.905f, top + 1.07f, .955f), + new Vector3(.975f, top + 1.22f, 1.025f), new Vector3(.82f, top + 1.40f, .90f)); + foreach (Vector2 point in capsule) + if (point.x > bridge - .5f) + Coat(Paint.Steel).Rod(HarborMesh.Point(center + (point - center), top + .34f), + HarborMesh.Point(center + (point - center) * .937f, top + 1.08f), .026f); + + float mast = bridge + 1.15f; + Coat(Paint.Ivory).Rod(new Vector3(mast, top + 1.38f, 0), new Vector3(mast - .48f, top + 4.22f, 0), .135f, 8); + for (int i = 0; i < 3; i++) + { + float y = top + 1.85f + i * .66f; + float span = 1.98f - i * .36f; + Coat(Paint.Pearl).Rod(new Vector3(mast - .27f, y, -span), new Vector3(mast - .27f, y, span), .055f); + Coat(Paint.Black).Rod(new Vector3(mast - .24f, y, span * .84f), new Vector3(mast - .24f, y + .40f, span * .84f), .022f); + } + Coat(Paint.LitGlass).Radome(new Vector3(mast - .48f, top + 4.27f, 0), .13f); + + float stack = offset - deckLength * .24f; + for (int side = -1; side <= 1; side += 2) + { + float z = side * deckBeam * .26f; + Vector2 foot = new Vector2(stack, z); + Vector2[] funnel = Outline(3.85f, .94f, stack, z); + Coat(Paint.Ivory).Loft(funnel, foot, false, new Vector3(1.13f, top, 1.12f), + new Vector3(.99f, top + .82f, .985f)); + Coat(Paint.Navy).Loft(funnel, foot, false, new Vector3(.99f, top + .82f, .985f), + new Vector3(.95f, top + 2.37f, .86f)); + Coat(Paint.Gold).Loft(funnel, foot, false, new Vector3(.95f, top + 2.37f, .86f), + new Vector3(.90f, top + 2.91f, .80f)); + Coat(Paint.Black).Loft(funnel, foot, true, new Vector3(.90f, top + 2.91f, .80f), + new Vector3(.87f, top + 3.23f, .77f)); + + Coat(Paint.Steel).Rod(new Vector3(stack + 7.8f, top, z * 2), new Vector3(stack + 7.8f, top + .59f, z * 2), .16f); + Coat(Paint.Pearl).Radome(new Vector3(stack + 7.8f, top + .93f, z * 2), .49f); + } + + float pool = offset + deckLength * .01f; + Coat(Paint.Pearl).Box(new Vector3(pool, top + .075f, 0), new Vector3(5.67f, .17f, 3.32f)); + Coat(Paint.Pool).Box(new Vector3(pool, top + .17f, 0), new Vector3(5.21f, .073f, 2.89f)); + for (int i = 0; i < 8; i++) + { + Coat(Paint.TeakSeam).Box(new Vector3(pool, top + .032f, (i - 3.5f) * .69f), new Vector3(10, .014f, .032f)); + float x = pool - 3.4f + i * .94f; + Coat(Paint.Pearl).Box(new Vector3(x, top + .19f, deckBeam * .67f), new Vector3(.56f, .13f, .92f)); + Coat(Paint.Steel).Box(new Vector3(x, top + .34f, deckBeam * .67f + .31f), new Vector3(.52f, .17f, .26f)); + } + } + + private void BuildLifeboats() + { + for (int i = 0; i < 5 + ship.HullIndex * 2; i++) + for (int side = -1; side <= 1; side += 2) + { + float x = -length * .31f + i * (ship.HullIndex == 0 ? 5.52f : 4.7f); + float z = side * beam * .974f; + Vector2 center = new Vector2(x, z); + Vector2[] capsule = Outline(4.31f, .60f, x, z); + Coat(Paint.Lifeboat).Loft(capsule, center, false, new Vector3(.86f, 6.27f, .59f), + new Vector3(1, 6.49f, .99f), new Vector3(1, 6.65f, 1)); + Coat(Paint.Pearl).Loft(capsule, center, true, new Vector3(1, 6.65f, 1), + new Vector3(.875f, 6.94f, .82f), new Vector3(.78f, 7.04f, .65f)); + Coat(Paint.Glass).Box(new Vector3(x + .96f, 6.94f, z + side * .44f), new Vector3(.50f, .15f, .13f)); + for (int arm = -1; arm <= 1; arm += 2) + { + float mount = x + arm * 1.73f; + Vector3 from = new Vector3(mount, 6.15f, z - side * .67f); + Vector3 elbow = new Vector3(mount, 7.47f, z - side * .52f); + Vector3 tip = new Vector3(mount, 7.53f, z + side * .20f); + Coat(Paint.Ivory).Rod(from, elbow, .07f); + Coat(Paint.Ivory).Rod(elbow, tip, .065f); + Coat(Paint.Steel).Rod(tip, new Vector3(mount, 6.94f, tip.z), .021f); + } + } + } + + private void Rails(Vector2[] contour, float low, float high, float stride) + { + HarborMesh metal = Coat(Paint.Pearl); + for (int i = 0; i < contour.Length; i++) + { + Vector2 a = contour[i]; + Vector2 b = contour[(i + 1) % contour.Length]; + metal.Rod(HarborMesh.Point(a, high), HarborMesh.Point(b, high), .031f); + metal.Rod(HarborMesh.Point(a, (high + low) * .5f), HarborMesh.Point(b, (high + low) * .5f), .021f); + int studs = Mathf.Max(1, Mathf.CeilToInt(Vector2.Distance(a, b) / stride)); + for (int stud = 0; stud < studs; stud++) + { + Vector2 foot = Vector2.Lerp(a, b, stud / (float)studs); + metal.Rod(HarborMesh.Point(foot, low), HarborMesh.Point(foot, high), .035f); + } + } + } + + private (float Length, float Beam, float Offset) DeckFootprint(int deck) + { + return (length * (.79f - .038f * deck), beam * (.84f - .030f * deck), -length * .034f - deck * .51f); + } + + private static float SideWidth(float t) + { + if (t < .16f) + return Mathf.Lerp(.52f, 1, Mathf.Sin(Mathf.Clamp01(t / .16f) * Mathf.PI * .5f)); + if (t < .69f) + return 1; + return Mathf.Cos(Mathf.Clamp01((t - .69f) / .31f) * Mathf.PI * .5f); + } + + private static Vector2[] Outline(float length, float beam, float x, float z = 0) + { + const int intervals = 20; + var outline = new Vector2[intervals * 2 + 1]; + for (int i = 0; i < intervals; i++) + { + float position = i / (float)intervals; + float width = beam * SideWidth(position); + float station = (position - .5f) * length + x; + outline[i] = new Vector2(station, z - width); + outline[outline.Length - 1 - i] = new Vector2(station, z + width); + } + outline[intervals] = new Vector2(length * .5f + x, z); + return outline; + } + } +} diff --git a/Assets/Soundings/Runtime/VesselExterior.cs.meta b/Assets/Soundings/Runtime/VesselExterior.cs.meta new file mode 100644 index 0000000..ae0b2ec --- /dev/null +++ b/Assets/Soundings/Runtime/VesselExterior.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 56c9464ba78c278c797f9b446ca863d9 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/VisualSmoke.cs b/Assets/Soundings/Runtime/VisualSmoke.cs new file mode 100644 index 0000000..49e82f3 --- /dev/null +++ b/Assets/Soundings/Runtime/VisualSmoke.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections; +using System.IO; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp + { + private IEnumerator VisualSmoke() + { + string[] args = Environment.GetCommandLineArgs(); + int index = Array.IndexOf(args, "-soundings-smoke"); + if (index + 1 >= args.Length) + { + Application.Quit(1); + yield break; + } + + string directory = args[index + 1]; + Directory.CreateDirectory(directory); + yield return CaptureSmoke(directory, "01-title"); + + if (!SubmitSmoke("start-used") || !CheckSmoke(Ship?.Name == "MV Meridian", "Used start")) + yield break; + yield return CaptureSmoke(directory, "02-operations"); + int fare = Ship.Fare; + if (!SubmitSmoke("fare-plus") || !CheckSmoke(Ship.Fare == fare + 50, "Fare control")) + yield break; + if (!SubmitSmoke("dispatch") || !CheckSmoke(Ship.Port == 1 && company.Voyages == 1, "Dispatch control")) + yield break; + yield return CaptureSmoke(directory, "03-finance"); + + if (!SubmitSmoke("nav-1")) + yield break; + yield return CaptureSmoke(directory, "04-deck-plans"); + if (!SubmitSmoke("deck-1") || !SubmitSmoke("facility-4") || !SubmitSmoke("berth-0") + || !CheckSmoke(Ship.Decks[1].Cells[0] == Facility.Tank, "Deck placement")) + yield break; + + if (!SubmitSmoke("nav-3") || !SubmitSmoke("port-2") || !SubmitSmoke("permit") + || !CheckSmoke(company.Permits[2], "Ports control")) + yield break; + yield return CaptureSmoke(directory, "05-ports"); + + if (!SubmitSmoke("chart-world") || !SubmitSmoke("port-12") || !CheckSmoke(inspectedPort == 12, "Global port chart")) + yield break; + yield return CaptureSmoke(directory, "06-world"); + + if (!SubmitSmoke("company-menu") || !SubmitSmoke("start-financed") || !SubmitSmoke("replace") + || !CheckSmoke(company.Debt == 500000 && company.Fleet.Count == 0, "Financed start")) + yield break; + yield return CaptureSmoke(directory, "07-shipyard"); + if (!SubmitSmoke("buy-ship") || !CheckSmoke(Ship != null && Ship.Beds == 0 && page == 1, "Ship commissioning")) + yield break; + yield return CaptureSmoke(directory, "08-new-hull"); + Debug.Log($"Soundings player smoke passed at {Screen.width} × {Screen.height}."); + Application.Quit(0); + } + + private bool SubmitSmoke(string element) + { + Button button = root.Q + + + + diff --git a/Assets/WebGLTemplates/Soundings/index.html.meta b/Assets/WebGLTemplates/Soundings/index.html.meta new file mode 100644 index 0000000..ac3e12f --- /dev/null +++ b/Assets/WebGLTemplates/Soundings/index.html.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f2a4214cdde77b4efb2d98877d963480 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Docs/Design.md b/Docs/Design.md new file mode 100644 index 0000000..91e282b --- /dev/null +++ b/Docs/Design.md @@ -0,0 +1,68 @@ +# Soundings design and platform notes + +## The operating loop + +1. Choose the opening balance sheet. The used ship can start earning immediately, with more wear and a higher fuel burn than a new hull. The financed start can customize its first hull and carries interest and principal payments on each sailing day. +2. Buy a pre-owned Coastal or Regional vessel or commission a Coastal, Regional, or Ocean Class hull. Build cabins to add berths, dining to increase guest service capacity, show lounges to lift appeal and onboard spend, and bunker tanks to extend range. Hull classes set deck limits, layout size, operating costs and base fuel capacity. +3. License a port when your reputation and cash qualify. Pick from the shipping lanes connected to the active vessel’s current port. Set one total fare per guest and buy the necessary fuel locally. +4. Review projected bookings, duration, fuel and profit, then dispatch. The ship arrives immediately, the calendar advances, and the company receives the voyage statement. Each vessel keeps its own position, fuel, condition, fare and deck plan. +5. Unlock Regional hulls at three voyages and 24 reputation, then Ocean Class at nine voyages and 42 reputation. The final campaign milestone also requires enough capital to build the flagship and acquire the Atlantic permits. Continue in sandbox after completing it. + +The prototype covers 22 ports. A global loop continues from Lisbon through the Mediterranean, Suez, the Indian Ocean and the Pacific, and returns through Panama to the Caribbean. It uses an eight-ship limit, a 30-voyage rolling ledger, one save slot, and player-initiated sailings. A cash shortfall can leave a company unable to dispatch. The financed start has a one-time bridge loan for liquidity. The company menu allows a new start. + +## Economy model + +| Decision | Simulation effect | +| --- | --- | +| Set the ticket fare | Demand responds to the ratio of the route’s reference fare to the player’s fare. The reference grows with voyage duration and destination appeal. Origin market size, reputation, season, recent sailings, ship condition and entertainment affect demand. | +| Lay out a ship | Guests are capped by the lower of berth count and dining capacity. Demand can fall short of that limit. Empty new hulls cannot carry guests. | +| Buy fuel | The current port supplies its own price in dollars per ton, with weekly variation. The game tracks the weighted-average inventory cost so where you fueled affects voyage profit. | +| Choose a voyage | The hull, distance and condition determine fuel burn. Sailing requires the greater of six tons or a 12% reserve beyond that burn. Permits, hull class and working capital can also block departure. | +| Settle a voyage | Ticket and onboard income fund crew, catering, port dues and interest. Fuel purchases use cash up front and fuel consumption is recognized as a voyage expense. Principal repayment changes cash and debt. Construction, maintenance and permits are separate capital or company outlays. | + +The model uses authored prices, lane lengths and costs for gameplay. The ledger reports voyage profit and arrival cash movement separately. Lifetime voyage profit aggregates operating results and interest and excludes purchases such as hulls and permits. + +## Platform targets + +| Target | Plan | +| --- | --- | +| Windows and Linux | Lead platforms for the full game. Aim for sharp 3840 × 2160 output on a defined hardware tier, with graphics settings for lighter hardware. Verify UI scaling, GPU frame time, memory and the heaviest ship before setting performance claims. | +| WebGL | The current turn-based slice is a reasonable fit. Keep a browser quality tier with lower render resolution, smaller textures, and a reduced loaded asset set as the project grows. Profile actual browsers before offering a larger campaign on Web. | +| Xbox Series X and Series S | Plan for controller-first navigation, TV-safe UI, saves and suspend/resume. Console builds require a Windows Unity editor, approved Microsoft/GDK console access and an eligible Unity license. | + +Unity Web uses WebGL 2-capable browsers and WebAssembly. Plan around browser memory and managed-thread restrictions. The prototype uses Unity’s built-in pipeline with lightweight harbor shaders. URP is a production candidate for a shared desktop, console and browser renderer. [Unity browser support](https://docs.unity.com/en-us/engine/6000.6/manual/platform-specific/webgl/intro/browsercompatibility) · [Unity Web limitations](https://docs.unity.com/en-us/engine/6000.6/manual/platform-specific/webgl/intro/technical-overview) · [Unity Web memory](https://docs.unity.com/en-us/engine/6000.6/manual/platform-specific/webgl/develop/memory) · [Unity render pipeline comparison](https://docs.unity.com/en-us/engine/6000.0/manual/render-pipelines/choose-a-render-pipeline/feature-comparison) + +Console development and publishing have separate tooling and platform requirements. [Unity system requirements](https://docs.unity.com/en-us/engine/6000.6/manual/get-started/install-and-upgrade/getting-started-installing-unity/system-requirements) · [Unity console development](https://unity.com/solutions/console) · [Microsoft Xbox onboarding](https://learn.microsoft.com/en-us/gaming/game-publishing/publishing-processes/managed-creators/overview) + +## Production scope + +- Expand the port roster and add scheduled departures, port capacity and competing operators. Tune fares, route profits and progression using playtest data from both starts. +- Build original ship and port asset kits with detailed deck interiors, authored materials, lighting and sound. Make the layout visible in an interactive cutaway. Keep the camera and motion restrained so the ship and management UI read clearly. +- Benchmark the largest planned ship and fleet at 1080p and 4K on reference hardware. Budget textures, draw calls, geometry and render targets per platform. Test controller navigation early on Xbox hardware once access is available. + +## Visual assets + +The title image is a flagship concept. Operations and Deck Plans display a live Unity vessel, with the hull and exterior changing by class, deck count and facilities. The ship is rendered over an authored harbor image with animated water distortion and a real-time reflection. Three harbor backplates cover modern, island and Iberian waterfronts. They represent groups of destinations. + +The original raster assets were generated with the built-in image generation tool. [Flagship title artwork](../Assets/Soundings/Resources/Art/FlagshipTitle.png) · [Modern terminal](../Assets/Soundings/Resources/Art/HarborPlate.png) · [Island harbor](../Assets/Soundings/Resources/Art/IslandHarbor.png) · [Iberian harbor](../Assets/Soundings/Resources/Art/IberianHarbor.png) + +
+Image prompts + +**Flagship title artwork** + +> Use case: photorealistic-natural. Asset type: original key art for a premium desktop cruise line simulation game, displayed as a near-square full-height right side title illustration, artwork only with no typography. A remarkably believable unbranded modern 12-deck cruise liner, deep midnight-blue hull edged with just a narrow gold stripe, warm ivory aerodynamic superstructure, stacked tinted balcony decks, amber-lit cabin windows, recessed teak decks, dark navy and warm copper funnels, sailing out past the mouth of an Atlantic harbor just after sunset. Composition is a professional aerial ship-spotting photograph from a low helicopter three-quarter bow angle, bow angled towards lower right, stern towards upper left, strong silhouette visible entirely within frame, ship fills about 78% of the width, no clipping. Calm dark teal water with a fine realistic wake, tiny pilot boat and distant harbor breakwaters for scale, restrained warm light in the harbor, slate blue sky. Soft warm sunset light from upper left on the white superstructure, cool atmospheric haze and controlled exposure. Physically believable surfaces, balanced cinematic Grade, fine photographic texture, premium simulator cover art. Leave the bottom 12% mostly water for an interface overlay. No text, branding, labels, visible cabin numbering, watermarks, real cruise-line trademarks, UI, cartoon styling or overly orange skies. + +**Harbor backplate** + +> Use case: photorealistic-natural. Asset type: clean environment backplate for a real-time 3D cruise simulator harbor viewport, wide horizontal panoramic composition about 3:1. Seaside cruise terminal and port approach at blue hour with soft amber harbor lights, seen from above the water from an elevated low-drone camera looking gently downward, camera pitched down approximately 14 degrees. The lower 70% of the full picture is completely open flat navy-teal salt water, naturally textured with fine ripples and sparse soft gold reflections beneath lamps. The upper 30% is a distant modern Atlantic waterfront with a low concrete seawall, neatly spaced warm low-profile lanterns, one small modern passenger terminal and subtle silhouettes of distant city buildings and dock equipment in atmospheric haze. Far harbor shore and horizon confined to the very top quarter. The frame will have a realistic large ship rendered onto the open water foreground afterwards, so no ships, boats, pontoons, buoys, people, wake, or objects in the water. Cinematic warm late sunlight brushes the far shore from upper left while the foreground remains cool blue, restrained color, real photographic detail and natural maritime atmosphere. Avoid visual clutter, lettering, logos and typography. Keep lighting and reflections plausible and gentle. + +**Island harbor** + +> Use case: photorealistic-natural. Asset type: Caribbean harbor environment backplate for a real-time 3D cruise ship management viewport. Wide 3:1 panoramic photograph, low elevated drone looking gently downward around 14 degrees. Keep the lower 70 percent entirely clear of any objects, only open saltwater in balanced deep navy-teal and sapphire with gentle fine ripples. In the top 30 percent, a low Nassau-inspired island waterfront with a straight seawall, small cream and terracotta-roof buildings, a few lush tropical palms, and a distant breakwater, quiet, realistic small port. Blue hour with the last warm light from upper left to match softly illuminated ivory ship surfaces and little amber waterfront lamps. Low or invisible distant horizon. This background will receive an in-engine cruise ship model in the foreground afterwards. Absolutely no vessels, boats, wake, foreground obstruction, lettering, brands, flags, text, watermarks, graphic overlays or people. Real-world photographic quality, restrained tone and good exposure, warm copper accents against cool dark blue water. + +**Iberian harbor** + +> Use case: photorealistic-natural. Asset type: old European port backplate for a real-time 3D cruise management simulator. Very wide panoramic photograph 3:1, gently downward camera from low drone at fourteen degrees, warm cinematic blue hour scene with nearly all detail in the upper 28 percent. Distant Atlantic Iberian port waterfront and long quiet seawall with low cream stone buildings, weathered tile roofs and subtle amber electric lamps. A glimpse of steep old town architecture and limestone, maritime haze, sunset glow from upper left and cool westward open harbor. Lower 72 percent is completely unobstructed open navy-teal seawater with small natural ripples and gentle reflected lamp glints. The foreground will contain an engine-rendered cruise ship in the game, so do not depict any boats or vessels, wake, humans, buoys, piers extending into foreground, logos, writing, or overlay. Photo-real restrained grading with dark blue water and credible scale and distance. + +
diff --git a/Packages/manifest.json b/Packages/manifest.json new file mode 100644 index 0000000..97f8217 --- /dev/null +++ b/Packages/manifest.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0" + } +} diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json new file mode 100644 index 0000000..9f18fc1 --- /dev/null +++ b/Packages/packages-lock.json @@ -0,0 +1,67 @@ +{ + "dependencies": { + "com.unity.modules.animation": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.hierarchycore": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imageconversion": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.screencapture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.ui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.uielements": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.hierarchycore": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.animation": "1.0.0" + } + } + } +} diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..28add94 --- /dev/null +++ b/ProjectSettings/AudioManager.asset @@ -0,0 +1,23 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_EnableOutputSuspension: 1 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 + m_RequestedDSPBufferSize: 0 + m_AudioFoundation: 0 + m_OutputChannelLayout: 2 + m_OutputSamplingRate: 48000 diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..e7886b2 --- /dev/null +++ b/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..39290c5 --- /dev/null +++ b/ProjectSettings/DynamicsManager.asset @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 24 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_DefaultMaxDepenetrationVelocity: 10 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0.1 + m_ClothInterCollisionStiffness: 0.2 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffu + m_SimulationMode: 0 + m_ThreadingMode: 0 + m_AutoSyncTransforms: 0 + m_ReuseCollisionCallbacks: 1 + m_InvokeCollisionCallbacks: 1 + m_ClothInterCollisionSettingsToggle: 0 + m_ClothGravity: {x: 0, y: -9.81, z: 0} + m_ContactPairsMode: 0 + m_BroadphaseType: 2 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 256, y: 256, z: 256} + m_WorldSubdivisions: 8 + m_FrictionType: 0 + m_EnableEnhancedDeterminism: 0 + m_ImprovedPatchFriction: 0 + m_GenerateOnTriggerStayEvents: 1 + m_SolverType: 0 + m_DefaultMaxAngularSpeed: 50 + m_ScratchBufferChunkCount: 4 + m_CurrentBackendId: 4072204805 + m_FastMotionThreshold: 3.4028235e+38 + m_SceneBuffersReleaseInterval: 0 + m_ReleaseSceneBuffers: 0 + m_LogVerbosity: 3 + m_IncrementalStaticBroadphase: 1 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..7fa8cac --- /dev/null +++ b/ProjectSettings/EditorBuildSettings.asset @@ -0,0 +1,11 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1045 &1 +EditorBuildSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Scenes: + - enabled: 1 + path: Assets/Soundings/Scenes/Soundings.unity + guid: 3cb26359ff0bfc5b6be4d669c8a5698a + m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..b1bb475 --- /dev/null +++ b/ProjectSettings/EditorSettings.asset @@ -0,0 +1,53 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 16 + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 1 + m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} + m_SpritePackerMode: 0 + m_SpritePackerCacheSize: 10 + m_SpritePackerPaddingPower: 1 + m_Bc7TextureCompressor: 0 + m_EtcTextureCompressorBehavior: 1 + m_EtcTextureFastCompressor: 1 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 4 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp;java;cpp;c;mm;m;h + m_ProjectGenerationRootNamespace: + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_EnableEditorAsyncCPUTextureLoading: 0 + m_AsyncShaderCompilation: 1 + m_BlockShaders: 0 + m_UnlockBlockShaders: 0 + m_PrefabModeAllowAutoSave: 1 + m_EnterPlayModeOptionsEnabled: 1 + m_EnterPlayModeOptions: 0 + m_GameObjectNamingDigits: 1 + m_GameObjectNamingScheme: 0 + m_AssetNamingUsesSpace: 1 + m_InspectorUseIMGUIDefaultInspector: 0 + m_UseLegacyProbeSampleCount: 0 + m_DisableCookiesInLightmapper: 0 + m_ShadowmaskStitching: 1 + m_AssetPipelineMode: 1 + m_RefreshImportMode: 0 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 + m_CacheServerEnableTls: 0 + m_CacheServerImportResultCachingEnabled: 0 + m_CacheServerValidationMode: 2 + m_CacheServerDownloadBatchSize: 128 + m_EnableEnlightenBakedGI: 0 + m_ReferencedClipsExactNaming: 1 + m_ForceAssetUnloadAndGCOnSceneLoad: 1 + m_HideBuildProfileClassicPlatforms: 0 + m_UseLegacyHierarchy: 0 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..61c884d --- /dev/null +++ b/ProjectSettings/GraphicsSettings.asset @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!30 &1 +GraphicsSettings: + m_ObjectHideFlags: 0 + serializedVersion: 16 + m_Deferred: + m_Mode: 1 + m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} + m_DeferredReflections: + m_Mode: 1 + m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_VideoShadersIncludeMode: 2 + m_AlwaysIncludedShaders: + - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} + m_PreloadedShaders: [] + m_PreloadShadersBatchTimeLimit: -1 + m_GraphicsStateCollection: {fileID: 0} + m_CollectionStartupAction: 0 + m_TraceSavePath: TracedCollection + m_TraceSendToEditor: 1 + m_AdditionalWarmupCollections: [] + m_WarmupAsync: 1 + m_EnableCacheMissTracing: 0 + m_WarmupProgressivelyLimit: -1 + m_CacheMissCollectionPath: CacheMissCollection + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_CustomRenderPipeline: {fileID: 0} + m_TransparencySortMode: 0 + m_TransparencySortAxis: {x: 0, y: 0, z: 1} + m_DefaultRenderingPath: 1 + m_DefaultMobileRenderingPath: 1 + m_TierSettings: [] + m_LightmapStripping: 0 + m_FogStripping: 0 + m_InstancingStripping: 0 + m_BrgStripping: 0 + m_DefaultLightBaker: 0 + m_LightmapKeepPlain: 1 + m_LightmapKeepDirCombined: 1 + m_LightmapKeepDynamicPlain: 1 + m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepShadowMask: 1 + m_LightmapKeepSubtractive: 1 + m_FogKeepLinear: 1 + m_FogKeepExp: 1 + m_FogKeepExp2: 1 + m_AlbedoSwatchInfos: [] + m_RenderPipelineGlobalSettingsMap: {} + m_ShaderBuildSettings: + keywordDeclarationOverrides: [] + numInternalDefines: 0 + defines: [] + compilerSettings: [] + m_LightsUseLinearIntensity: 0 + m_LightsUseColorTemperature: 0 + m_LogWhenShaderIsCompiled: 0 + m_LightProbeOutsideHullStrategy: 1 + m_CameraRelativeLightCulling: 0 + m_CameraRelativeShadowCulling: 0 diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..3c7e969 --- /dev/null +++ b/ProjectSettings/InputManager.asset @@ -0,0 +1,296 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + m_UsePhysicalKeys: 1 diff --git a/ProjectSettings/MemorySettings.asset b/ProjectSettings/MemorySettings.asset new file mode 100644 index 0000000..e1bbfb1 --- /dev/null +++ b/ProjectSettings/MemorySettings.asset @@ -0,0 +1,37 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!387306366 &1 +MemorySettings: + m_ObjectHideFlags: 0 + m_EditorMemorySettings: + m_MainAllocatorBlockSize: -1 + m_ThreadAllocatorBlockSize: -1 + m_MainAllocatorMimallocEnabled: -1 + m_MainGfxBlockSize: -1 + m_ThreadGfxBlockSize: -1 + m_CacheBlockSize: -1 + m_TypetreeBlockSize: -1 + m_RemapperInitialCapacity: -1 + m_ProfilerBlockSize: -1 + m_ProfilerEditorBlockSize: -1 + m_BucketAllocatorGranularity: -1 + m_BucketAllocatorBucketsCount: -1 + m_BucketAllocatorBlockSize: -1 + m_BucketAllocatorBlockCount: -1 + m_ProfilerBucketAllocatorGranularity: -1 + m_ProfilerBucketAllocatorBucketsCount: -1 + m_ProfilerBucketAllocatorBlockSize: -1 + m_ProfilerBucketAllocatorBlockCount: -1 + m_TempAllocatorSizeMain: -1 + m_JobTempAllocatorBlockSize: -1 + m_BackgroundJobTempAllocatorBlockSize: -1 + m_JobTempAllocatorReducedBlockSize: -1 + m_TempAllocatorSizeGIBakingWorker: -1 + m_TempAllocatorSizeNavMeshWorker: -1 + m_TempAllocatorSizeAudioWorker: -1 + m_TempAllocatorSizeCloudWorker: -1 + m_TempAllocatorSizeGfx: -1 + m_TempAllocatorSizeJobWorker: -1 + m_TempAllocatorSizeBackgroundWorker: -1 + m_TempAllocatorSizePreloadManager: -1 + m_PlatformMemorySettings: [] diff --git a/ProjectSettings/MultiplayerManager.asset b/ProjectSettings/MultiplayerManager.asset new file mode 100644 index 0000000..2a93664 --- /dev/null +++ b/ProjectSettings/MultiplayerManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!655991488 &1 +MultiplayerManager: + m_ObjectHideFlags: 0 + m_EnableMultiplayerRoles: 0 + m_StrippingTypes: {} diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..6beb541 --- /dev/null +++ b/ProjectSettings/NavMeshAreas.asset @@ -0,0 +1,93 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_SettingNames: + - Humanoid diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..67aaf1c --- /dev/null +++ b/ProjectSettings/Physics2DSettings.asset @@ -0,0 +1,57 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_BounceThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_ContactThreshold: 0 + m_JobOptions: + serializedVersion: 2 + useMultithreading: 0 + useConsistencySorting: 0 + m_InterpolationPosesPerJob: 100 + m_NewContactsPerJob: 30 + m_CollideContactsPerJob: 100 + m_ClearFlagsPerJob: 200 + m_ClearBodyForcesPerJob: 200 + m_SyncDiscreteFixturesPerJob: 50 + m_SyncContinuousFixturesPerJob: 50 + m_FindNearestContactsPerJob: 100 + m_UpdateTriggerContactsPerJob: 100 + m_IslandSolverCostThreshold: 100 + m_IslandSolverBodyCostScale: 1 + m_IslandSolverContactCostScale: 10 + m_IslandSolverJointCostScale: 10 + m_IslandSolverBodiesPerJob: 50 + m_IslandSolverContactsPerJob: 50 + m_SimulationMode: 0 + m_SimulationLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_MaxSubStepCount: 4 + m_MinSubStepFPS: 30 + m_UseSubStepping: 0 + m_UseSubStepContacts: 0 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_CallbacksOnDisable: 1 + m_ReuseCollisionCallbacks: 1 + m_AutoSyncTransforms: 0 + m_GizmoOptions: 10 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffu + m_PhysicsLowLevelSettings: {fileID: 0} diff --git a/ProjectSettings/PhysicsCoreProjectSettings2D.asset b/ProjectSettings/PhysicsCoreProjectSettings2D.asset new file mode 100644 index 0000000..049c745 --- /dev/null +++ b/ProjectSettings/PhysicsCoreProjectSettings2D.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!176606843 &1 +PhysicsCoreProjectSettings2D: + m_ObjectHideFlags: 0 + m_PhysicsCoreSettings: {fileID: 0} diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..67a94da --- /dev/null +++ b/ProjectSettings/PresetManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_DefaultPresets: {} diff --git a/ProjectSettings/ProjectAuditorSettings.asset b/ProjectSettings/ProjectAuditorSettings.asset new file mode 100644 index 0000000..af627f5 --- /dev/null +++ b/ProjectSettings/ProjectAuditorSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 0} + m_Name: + m_EditorClassIdentifier: UnityEditor.ProjectAuditorModule:Unity.ProjectAuditor.Editor:ProjectAuditorSettings + Rules: + rules: [] + DiagnosticParams: + paramsStack: + - PlatformGroup: + m_String: Unknown + m_SerializedParams: + - Key: TextureStreamingMipmapsSizeLimit + Value: 4000 + - Key: SpriteAtlasEmptySpaceLimit + Value: 50 + - Key: StreamingClipThresholdBytes + Value: 218294 + - Key: LongDecompressedClipThresholdBytes + Value: 204800 + - Key: LongCompressedMobileClipThresholdBytes + Value: 204800 + - Key: LoadInBackGroundClipSizeThresholdBytes + Value: 204800 + - Key: StreamingAssetsFolderSizeLimit + Value: 50 + CurrentParamsIndex: 0 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..ebd83da --- /dev/null +++ b/ProjectSettings/ProjectSettings.asset @@ -0,0 +1,710 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 30 + productGUID: 781443e439d5bde2c9ddb28e53bf813e + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: Soundings + productName: Soundings + defaultCursor: {fileID: 0} + cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1} + m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + defaultScreenWidth: 1600 + defaultScreenHeight: 900 + defaultScreenWidthWeb: 960 + defaultScreenHeightWeb: 600 + m_StereoRenderingPath: 0 + m_ActiveColorSpace: 0 + unsupportedMSAAFallback: 0 + m_SpriteBatchMaxVertexCount: 65535 + m_SpriteBatchVertexThreshold: 300 + m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 + numberOfMipsStrippedPerMipmapLimitGroup: {} + m_StackTraceTypes: 010000000100000001000000010000000100000001000000i + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + iosUseCustomAppBackgroundBehavior: 0 + allowedAutorotateToPortrait: 1 + allowedAutorotateToPortraitUpsideDown: 1 + allowedAutorotateToLandscapeRight: 1 + allowedAutorotateToLandscapeLeft: 1 + useOSAutorotation: 1 + use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 + adjustIOSFPSUsingThermalState: 1 + thermalStateSeriousIOSFPS: 30 + thermalStateCriticalIOSFPS: 15 + disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 1 + androidUseSwappy: 1 + androidRequestedVisibleInsets: 0 + androidSystemBarsBehavior: 2 + androidDisplayOptions: 1 + androidBlitType: 0 + androidResizeableActivity: 1 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 + androidAutoRotationBehavior: 1 + androidPredictiveBackSupport: 1 + androidApplicationEntry: 2 + defaultIsNativeResolution: 1 + macRetinaSupport: 1 + runInBackground: 1 + callOnDisableOnAssetBundleUnload: 1 + muteOtherAudioSources: 0 + Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + audioSpatialExperience: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 + submitAnalytics: 1 + usePlayerLog: 1 + dedicatedServerOptimizations: 1 + bakeCollisionMeshes: 0 + forceSingleInstance: 0 + useFlipModelSwapchain: 1 + resizableWindow: 1 + useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games + gpuSkinning: 0 + meshDeformation: 0 + xboxPIXTextureCapture: 0 + xboxEnableAvatar: 0 + xboxEnableKinect: 0 + xboxEnableKinectAutoTracking: 0 + xboxEnableFitness: 0 + visibleInBackground: 1 + allowFullscreenSwitch: 1 + fullscreenMode: 3 + xboxSpeechDB: 0 + xboxEnableHeadOrientation: 0 + xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 + metalUseMetalDisplayLink: 0 + xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOneEnableTypeOptimization: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 1048576 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 + switchNVNMaxPublicTextureIDCount: 0 + switchNVNMaxPublicSamplerIDCount: 0 + switchMaxWorkerMultiple: 8 + switchNVNGraphicsFirmwareMemory: 32 + switchGraphicsJobsSyncAfterKick: 1 + vulkanNumSwapchainBuffers: 3 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 + loadStoreDebugModeEnabled: 0 + visionOSBundleVersion: 1.0 + tvOSBundleVersion: 1.0 + bundleVersion: 0.1.0 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + vrSettings: + enable360StereoCapture: 0 + enableFrameTimingStats: 0 + enableOpenGLProfilerGPURecorders: 1 + allowHDRDisplaySupport: 0 + useHDRDisplay: 0 + hdrBitDepth: 0 + m_ColorGamuts: 00000000i + targetPixelDensity: 30 + resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.4 + androidMinAspectRatio: 1 + applicationIdentifier: + Standalone: game.soundings.simulator + buildNumber: + Standalone: 0 + VisionOS: 0 + iPhone: 0 + tvOS: 0 + overrideDefaultApplicationIdentifier: 1 + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 26 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + AndroidPreferredDataLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + androidSplitApplicationBinary: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 0 + strictShaderVariantMatching: 0 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSSimulatorArchitecture: 0 + iOSTargetOSVersionString: 15.0 + tvOSSdkVersion: 0 + tvOSSimulatorArchitecture: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 15.0 + VisionOSSdkVersion: 0 + VisionOSTargetOSVersionString: 1.0 + xcodeProjectType: 0 + uIPrerenderedIcon: 0 + uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 + uIStatusBarHidden: 1 + uIExitOnSuspend: 0 + uIStatusBarStyle: 0 + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] + iOSLaunchScreenType: 0 + iOSLaunchScreenPortrait: {fileID: 0} + iOSLaunchScreenLandscape: {fileID: 0} + iOSLaunchScreenBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreenFillPct: 100 + iOSLaunchScreenSize: 100 + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + macOSURLSchemes: [] + iOSBackgroundModes: 0 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + metalCompileShaderBinary: 0 + iOSRenderExtraFrameOnPause: 0 + iosCopyPluginsCodeInsteadOfSymlink: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + VisionOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + VisionOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + shaderPrecisionModel: 0 + clonedFromGUID: 00000000000000000000000000000000 + templatePackageId: + templateDefaultScene: + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomGradleSettingsTemplate: 0 + useCustomProguardFile: 0 + AndroidTargetArchitectures: 2 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 + AndroidEnableArm64MTE: 0 + AndroidBuildApkPerCpuArchitecture: 0 + AndroidTVCompatibility: 0 + AndroidIsGame: 1 + androidAppCategory: 3 + useAndroidAppCategory: 1 + androidAppCategoryOther: + AndroidEnableTango: 0 + androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 + m_AndroidBanners: + - width: 320 + height: 180 + banner: {fileID: 0} + androidGamepadSupportLevel: 0 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 200 + AndroidReportGooglePlayAppDependencies: 1 + androidSymbolsSizeThreshold: 800 + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] + m_BuildTargetBatching: [] + m_BuildTargetShaderSettings: [] + m_BuildTargetGraphicsJobs: [] + m_BuildTargetGraphicsJobMode: [] + m_BuildTargetGraphicsAPIs: [] + m_DefaultShaderChunkSizeInMB: 16 + m_DefaultShaderChunkCount: 0 + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + openGLRequireES32: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + VisionOS: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupHDRCubemapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] + m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + editorGfxJobOverride: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + bluetoothUsageDescription: + macOSTargetOSVersion: 12.0 + switchNMETAOverride: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchEnableFileSystemTrace: 0 + switchLTOSetting: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchCompilerFlags: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchTitleNames_15: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchPublisherNames_15: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchIcons_15: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchSmallIcons_15: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 22 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 1 + switchSupportedNpadCount: 8 + switchEnableTouchScreen: 1 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchDisableHTCSPlayerConnection: 0 + switchUseNewStyleFilepaths: 1 + switchUseLegacyFmodPriorities: 0 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 + switchUpgradedPlayerSettingsToNMETA: 0 + switchCaStoreSource: 0 + switchCaStoreFilePath: + ps4NPAgeRating: 12 + ps4NPTitleSecret: + ps4NPTrophyPackPath: + ps4ParentalLevel: 11 + ps4ContentID: ED1633-NPXX51362_00-0000000000000000 + ps4Category: 0 + ps4MasterVersion: 01.00 + ps4AppVersion: 01.00 + ps4AppType: 0 + ps4ParamSfxPath: + ps4VideoOutPixelFormat: 0 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4ExtraSceSysFile: + ps4NPtitleDatPath: + ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 + ps4EnterButtonAssignment: 2 + ps4ApplicationParam1: 0 + ps4ApplicationParam2: 0 + ps4ApplicationParam3: 0 + ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 + ps4Passcode: Emc9s8nKyrdbU8Uz9W4kBfvZVEojkOlw + ps4pnSessions: 1 + ps4pnPresence: 1 + ps4pnFriends: 1 + ps4pnGameCustomData: 1 + playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4UseLowGarlicFragmentationMode: 1 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 2 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 + ps4GPU800MHz: 1 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 + monoEnv: + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 + spritePackerPolicy: + webGLMemorySize: 32 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: PROJECT:Soundings + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 2 + webGLWasmArithmeticExceptions: 0 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 + webGLPowerPreference: 2 + webGLWebAssemblyTable: 0 + webGLWebAssemblyBigInt: 0 + webGLCloseOnQuit: 0 + webWasm2023: 1 + webEnableSubmoduleStrippingCompatibility: 0 + webProgressiveAssetLoading: 0 + scriptingDefineSymbols: {} + additionalCompilerArguments: {} + platformArchitecture: {} + scriptingBackend: + Standalone: 0 + il2cppCompilerConfiguration: {} + il2cppCodeGeneration: {} + il2cppLTOMode: {} + il2cppStacktraceInformation: {} + managedStrippingLevel: {} + incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 + allowUnsafeCode: 0 + useDeterministicCompilation: 1 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + gcIncremental: 1 + gcWBarrierValidation: 0 + managedCodeVariant: {} + apiCompatibilityLevelPerPlatform: {} + editorAssembliesCompatibilityLevel: 1 + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: cruiseSimulator + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: cruiseSimulator + wsaImages: {} + metroTileShortName: + metroTileShowName: 0 + metroMediumTileShowName: 0 + metroLargeTileShowName: 0 + metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 + metroDefaultTileSize: 1 + metroTileForegroundText: 2 + metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} + metroSplashScreenUseBackgroundColor: 0 + syncCapabilities: 0 + platformCapabilities: {} + metroTargetDeviceFamilies: {} + metroFTAName: + metroFTAFileTypes: [] + metroProtocolName: + vcxProjDefaultLanguage: + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 + XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 + XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} + XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 + XboxOneEnableGPUVariability: 1 + XboxOneSockets: {} + XboxOneSplashScreen: {fileID: 0} + XboxOneAllowedProductIds: [] + XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 + XboxOneOverrideIdentityName: + XboxOneOverrideIdentityPublisher: + cloudServicesEnabled: {} + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_SignPackage: 1 + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + hmiPlayerDataPath: + hmiForceSRGBBlit: 0 + embeddedLinuxEnableGamepadInput: 0 + hmiCpuConfiguration: + hmiLogStartupTiming: 0 + qnxGraphicConfPath: + apiCompatibilityLevel: 6 + captureStartupLogs: {} + activeInputHandler: 0 + windowsGamepadBackendHint: 0 + enableDirectStorage: 0 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] + projectName: + organizationId: + cloudEnabled: 0 + legacyClampBlendShapeWeights: 0 + hmiLoadingImage: {fileID: 0} + platformRequiresReadableAssets: 0 + virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0 + androidVulkanDenyFilterList: [] + androidVulkanAllowFilterList: [] + androidVulkanDeviceFilterListAsset: {fileID: 0} + d3d12DeviceFilterListAsset: {fileID: 0} + webGPUDeviceFilterListAsset: {fileID: 0} + allowedHttpConnections: 3 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..eafb275 --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 6000.6.8f1 +m_EditorVersionWithRevision: 6000.6.8f1 (237b6593792b) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..64f8aba --- /dev/null +++ b/ProjectSettings/QualitySettings.asset @@ -0,0 +1,347 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 5 + m_QualitySettings: + - serializedVersion: 5 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + skinWeights: 1 + globalTextureMipmapLimit: 1 + textureMipmapLimitSettings: [] + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 0 + adaptiveVsync: 0 + vSyncCount: 0 + realtimeGICPUUsage: 25 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 + lodBias: 0.3 + meshLodThreshold: 1 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] + - serializedVersion: 5 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + skinWeights: 2 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 0 + adaptiveVsync: 0 + vSyncCount: 0 + realtimeGICPUUsage: 25 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 + lodBias: 0.4 + meshLodThreshold: 1 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] + - serializedVersion: 5 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + skinWeights: 2 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 0 + adaptiveVsync: 0 + vSyncCount: 1 + realtimeGICPUUsage: 25 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 + lodBias: 0.7 + meshLodThreshold: 1 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] + - serializedVersion: 5 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 2 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 0 + adaptiveVsync: 0 + vSyncCount: 1 + realtimeGICPUUsage: 50 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 + lodBias: 1 + meshLodThreshold: 1 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] + - serializedVersion: 5 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 70 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 4 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 0 + adaptiveVsync: 0 + vSyncCount: 1 + realtimeGICPUUsage: 50 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 + lodBias: 1.5 + meshLodThreshold: 1 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] + - serializedVersion: 5 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 255 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 0 + adaptiveVsync: 0 + vSyncCount: 1 + realtimeGICPUUsage: 100 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 + lodBias: 2 + meshLodThreshold: 1 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] + m_TextureMipmapLimitGroupNames: [] + m_PerPlatformDefaultQuality: + Android: 2 + EmbeddedLinux: 5 + GameCoreScarlett: 5 + GameCoreXboxOne: 5 + Kepler: 5 + LinuxHeadlessSimulation: 5 + Nintendo Switch: 5 + Nintendo Switch 2: 5 + PS4: 5 + PS5: 5 + QNX: 5 + Server: 5 + Standalone: 5 + VisionOS: 5 + WebGL: 3 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json new file mode 100644 index 0000000..ede5887 --- /dev/null +++ b/ProjectSettings/SceneTemplateSettings.json @@ -0,0 +1,121 @@ +{ + "templatePinStates": [], + "dependencyTypeInfos": [ + { + "userAdded": false, + "type": "UnityEngine.AnimationClip", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.Animations.AnimatorController", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.AnimatorOverrideController", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.Audio.AudioMixerController", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.ComputeShader", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.Cubemap", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.GameObject", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.LightingDataAsset", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.LightingSettings", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Material", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.MonoScript", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial2D", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.VolumeProfile", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.SceneAsset", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.Shader", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.ShaderVariantCollection", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.Texture", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Texture2D", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Timeline.TimelineAsset", + "defaultInstantiationMode": 0 + } + ], + "defaultDependencyTypeInfo": { + "userAdded": false, + "type": "", + "defaultInstantiationMode": 1 + }, + "newSceneOverride": 0 +} \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..324a658 --- /dev/null +++ b/ProjectSettings/TagManager.asset @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 3 + tags: [] + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 + m_RenderingLayers: + - Default + m_MigratedRenderPipelines: [] diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..2e23a1f --- /dev/null +++ b/ProjectSettings/TimeManager.asset @@ -0,0 +1,14 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + Fixed Timestep: + m_Count: 2822399 + m_Rate: + m_Denominator: 1 + m_Numerator: 141120000 + Maximum Allowed Timestep: 0.33333334 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..cdcc02b --- /dev/null +++ b/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + InsightsSettings: + m_EventUrl: https://engine-data.unity3d.com + m_StackTraceUrl: https://engine-data.services.api.unity.com/v1/stack-traces + m_EngineDiagnosticsEnabled: 0 + m_Enabled: 0 + CrashReportingSettings: + serializedVersion: 2 + m_EventUrl: https://perf-events.cloud.unity3d.com + m_EnableCloudDiagnosticsReporting: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + m_PackageRequiringCoreStatsPresent: 0 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..d189704 --- /dev/null +++ b/ProjectSettings/VFXManager.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_PrefixSumShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} + m_EmptyShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 + m_MaxScrubTime: 30 + m_MaxCapacity: 100000000 + m_CompiledVersion: 0 + m_RuntimeVersion: 0 + m_RuntimeResources: {fileID: 0} + m_EditorResources: {fileID: 0} + m_BatchEmptyLifetime: 300 diff --git a/ProjectSettings/VersionControlSettings.asset b/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..979fd8e --- /dev/null +++ b/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_TrackPackagesOutsideProject: 0 diff --git a/README.md b/README.md index e69de29..a015a2c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,31 @@ +# Soundings + +Soundings is a Unity cruise-line management prototype. Start with a used ship and $135,000, or borrow $500,000 and commission your first hull. Lay out cabins, dining, entertainment and bunker tanks deck by deck. Set fares, buy fuel where the ship is docked, and run profitable routes to fund a larger fleet. + +The campaign has 22 ports. Start in Florida and the Caribbean, then extend your network across the Atlantic, Indian Ocean, and Pacific. Unlock Regional and Ocean Class hulls as your company grows. The flagship milestone is a Bermuda–Lisbon crossing in an Ocean Class ship with at least 320 guest berths and 160 show seats. You can keep operating after reaching it. + +## Play in Unity + +1. Open this folder in Unity Hub with **Unity 6000.6.8f1**. +2. Open `Assets/Soundings/Scenes/Soundings.unity` and press Play. +3. For the quickest start, choose **Take over a regional ship**. MV Meridian starts in Miami with cabins, dining, entertainment and enough fuel for Nassau. +4. Change the fare or destination in **Operations**, review the forecast, then dispatch. **Finance** opens the arrival statement. Use the fleet list to switch vessels, **Deck plans** to build, **Shipyard** to buy or overhaul, and **Ports** to license more destinations. + +Use the mouse or Tab and Enter. A voyage advances the calendar and settles immediately. Company progress autosaves locally after successful actions. Use **Company menu** to resume later or start a new company. + +## Build and verify + +Install the matching Unity build modules through Hub. The repository includes one scene and the browser shell. It uses Unity’s built-in modules and ships without a third-party package dependency. + +```bash +UNITY="/path/to/Unity" +SOUNDINGS_BUILD_PATH="$PWD/Builds/Linux/Soundings.x86_64" "$UNITY" \ + -batchmode -nographics -quit -projectPath "$PWD" -buildTarget Linux64 \ + -executeMethod Soundings.Editor.SoundingsBuild.VerifyAndBuild -logFile - +``` + +Use `Win64` with an output such as `Builds/Windows/Soundings.exe` for Windows, or `WebGL` with a directory such as `Builds/Web` for a browser build. Run `Soundings.Editor.EconomyVerification.Run` as an editor execute method to verify the economy without building a player. + +Serve the Web build over HTTP. For a local preview, use `python3 -m http.server 8080 --bind 127.0.0.1 --directory Builds/Web` and open localhost on port 8080 in a WebGL 2 browser. Native players use a resizable window. For a native 4K layout check on a display that supports it, pass `-screen-width 3840 -screen-height 2160`. + +See [Design and platform notes](Docs/Design.md) for the simulation model, campaign scope and what remains for production.