diff --git a/AGRARIAN_DEVELOPMENT_ROADMAP.md b/AGRARIAN_DEVELOPMENT_ROADMAP.md index 0e6c3d2..eb960bf 100644 --- a/AGRARIAN_DEVELOPMENT_ROADMAP.md +++ b/AGRARIAN_DEVELOPMENT_ROADMAP.md @@ -829,7 +829,7 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe - [ ] Define default, recommended, and cinematic investor rendering presets, with ray tracing available only as an optional high-end/cinematic mode and never required for baseline visual credibility. - [ ] Verify the non-ray-traced compatibility/default path still looks credible on common investor, tester, and remote-session hardware. - [ ] Add packaged-demo visual QA screenshots or short clips for startup credits, character selection, first spawn, terrain, vegetation, water, campfire, shelter, pause menu, and save/quit before each investor build is called ready. -- [ ] Add an investor-demo acceptance gate: no current build should be described as investor visual MVP if menus are confusing, character art is mannequin-only, terrain is flat/tan, foliage is absent or unreadable, or core objects still read as primitive debug shapes. +- [x] Add an investor-demo acceptance gate: no current build should be described as investor visual MVP if menus are confusing, character art is mannequin-only, terrain is flat/tan, foliage is absent or unreadable, or core objects still read as primitive debug shapes. ## 0.1.P MVP Audio And Atmosphere diff --git a/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap b/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap index 926edfa..2dac23d 100644 --- a/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap +++ b/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65389490b1d4461ddea72d2b65b136d3de404b471a286d148ea7b3233cc489b6 -size 7599069 +oid sha256:6996ce7793c8d18a0b1f876ea25a91a55d3e269818a22ac1f1a9b4aa4572bc16 +size 7603168 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset b/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset index 1d5fc93..c5c4713 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28006641db81f6ef4d8f507c38b76da85e914051c67054127f5d093df2d73e8c +oid sha256:8cefaf55c19b2c0c6955d3d6ff9fd242bfcd768d1bc01d174d8217e4ad693f6a size 5489 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset index 291c7bf..dd4c903 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b976718b020df0851743392c76855670336644bb2dab337e99d8c5d764b14041 +oid sha256:a357a87996af05d2ab5f3a8d2cdb97415485c471aa2dbb814c0e36adf2038301 size 5453 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset b/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset index 3ce4856..c879f38 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea4675d9b82a3a79256d1ab68cd0e07cccf0f94fe4f5069ebbe08caf2c165e97 +oid sha256:b5a12043bd12eb677401ce0d88a2bb61edbd3161264ad94dce0ec44fda220db2 size 5429 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset index 01aadde..5944c30 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9b9e6aa6e4e0e2fc1000814d517fa41935a838495459c087b2c00cd50197baf +oid sha256:20973d47e7b27d57eb46b42d73ef4fac650b17b98eb8a1dd0ef166ef4ea9c6d5 size 5529 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset index 5765781..20a3c02 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b35c68ba9583e152a68855afe61bfc4306c18dd38877ce9831a20151d96ef005 +oid sha256:b5f0ee318060330cc143ef4d92e951af147eb0585eefd166a0a0d2a3e19c2c36 size 5535 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset index e492ebb..f62b60d 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53025de49292334da46b46146c836ef30df2f08149afde687dd6dd04552c1bcc +oid sha256:ca064f560aef1d806fd05988a49377fa0020be5c5d34b1ffdd73819922097c73 size 5459 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset index ad96c67..1799005 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:afa93e2eb85f2b2e69da0a72aa0aff75c626539bac72d15e4f9418ebf19bdc65 +oid sha256:de713486a9ead46fb496ab9779be5e39835b6165beb929da2e5368a062fc59d5 size 5489 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset index 6d31394..191648a 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a32f70be8d479887d17948efa560cd290fd17e843d092ff9457b7d8cb998f4e5 +oid sha256:cc248f27ed4477cd977ace9e3dc40ca3beeb5c3d86d9fbd2999bac70253699d8 size 5523 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset index 00a2682..f94ff50 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a1964bca35649776ba24a0e226897c9db6d03ad5460134028667c89b8937b0e +oid sha256:a1bf69532edacd20ad1780284eb35ea32a14bf0c0fb413339957a76cc1ce8a51 size 5447 diff --git a/Scripts/RunPackagedInvestorSmoke.cmd b/Scripts/RunPackagedInvestorSmoke.cmd new file mode 100644 index 0000000..550de68 --- /dev/null +++ b/Scripts/RunPackagedInvestorSmoke.cmd @@ -0,0 +1,8 @@ +@echo off +setlocal + +set "PACKAGE_DIR=%~dp0..\Builds\WindowsDevelopment" +set "GAME_EXE=%PACKAGE_DIR%\AgrarianGame\Binaries\Win64\AgrarianGame.exe" + +cd /d "%PACKAGE_DIR%" +"%GAME_EXE%" -windowed -ResX=1280 -ResY=720 -ExecCmds=AgrarianInvestorSmokeTest -nosound diff --git a/Scripts/setup_ground_zero_demo_map.py b/Scripts/setup_ground_zero_demo_map.py index ac3a7a2..7956d39 100644 --- a/Scripts/setup_ground_zero_demo_map.py +++ b/Scripts/setup_ground_zero_demo_map.py @@ -30,9 +30,9 @@ PLACEHOLDER_MESHES = { for name in PLACEHOLDER_MESH_SOURCES } FOLIAGE_MESHES = { - "tree": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cylinder"], - "shrub": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cube"], - "grass": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cylinder"], + "tree": "/Engine/BasicShapes/Cone", + "shrub": "/Engine/BasicShapes/Sphere", + "grass": "/Engine/BasicShapes/Plane", } VARIATION_MESHES = { "cube": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cube"], @@ -40,29 +40,31 @@ VARIATION_MESHES = { "cylinder": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cylinder"], "quarter_cylinder": PLACEHOLDER_MESHES["SM_AGR_Placeholder_QuarterCylinder"], "plane": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Plane"], + "sphere": "/Engine/BasicShapes/Sphere", + "cone": "/Engine/BasicShapes/Cone", } MATERIAL_FOLDER = "/Game/Agrarian/Materials" ENVIRONMENT_MATERIALS = { "terrain": { "path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Terrain_CoastalScrub", - "color": unreal.LinearColor(0.28, 0.24, 0.16, 1.0), + "color": unreal.LinearColor(0.16, 0.23, 0.12, 1.0), "roughness": 0.92, }, "tree": { "path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Tree_CoastalOak", - "color": unreal.LinearColor(0.18, 0.31, 0.16, 1.0), + "color": unreal.LinearColor(0.07, 0.18, 0.06, 1.0), "roughness": 0.88, "used_with_instanced_static_meshes": True, }, "shrub": { "path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Shrub_CoyoteBrush", - "color": unreal.LinearColor(0.31, 0.39, 0.20, 1.0), + "color": unreal.LinearColor(0.15, 0.28, 0.10, 1.0), "roughness": 0.9, "used_with_instanced_static_meshes": True, }, "grass": { "path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Grass_DryCoastal", - "color": unreal.LinearColor(0.47, 0.42, 0.23, 1.0), + "color": unreal.LinearColor(0.32, 0.34, 0.13, 1.0), "roughness": 0.95, "used_with_instanced_static_meshes": True, }, @@ -88,7 +90,7 @@ ENVIRONMENT_MATERIALS = { }, "fresh_water": { "path": f"{MATERIAL_FOLDER}/M_AGR_GZ_FreshWater", - "color": unreal.LinearColor(0.08, 0.28, 0.38, 1.0), + "color": unreal.LinearColor(0.02, 0.16, 0.30, 1.0), "roughness": 0.35, }, } @@ -349,7 +351,7 @@ WEATHER_EXPOSURE_ZONES = [ ENVIRONMENT_VARIATION_ACTORS = [ { "label": "AGR_GZ_EnvVar_Tree_Canopy_01", - "mesh_key": "chamfer_cube", + "mesh_key": "sphere", "material_key": "tree", "location_xy": unreal.Vector(-27500.0, 6900.0, 0.0), "z_offset": 390.0, @@ -367,7 +369,7 @@ ENVIRONMENT_VARIATION_ACTORS = [ }, { "label": "AGR_GZ_EnvVar_Tree_Canopy_02", - "mesh_key": "chamfer_cube", + "mesh_key": "sphere", "material_key": "tree", "location_xy": unreal.Vector(17600.0, 31800.0, 0.0), "z_offset": 430.0, @@ -385,7 +387,7 @@ ENVIRONMENT_VARIATION_ACTORS = [ }, { "label": "AGR_GZ_EnvVar_Bush_Rounded_01", - "mesh_key": "chamfer_cube", + "mesh_key": "sphere", "material_key": "shrub", "location_xy": unreal.Vector(-33400.0, -15200.0, 0.0), "z_offset": 70.0, @@ -394,7 +396,7 @@ ENVIRONMENT_VARIATION_ACTORS = [ }, { "label": "AGR_GZ_EnvVar_Bush_Rounded_02", - "mesh_key": "chamfer_cube", + "mesh_key": "sphere", "material_key": "shrub", "location_xy": unreal.Vector(30400.0, -3900.0, 0.0), "z_offset": 75.0, @@ -810,6 +812,27 @@ def ensure_environment_materials(): unreal.MaterialEditingLibrary.recompile_material(material) unreal.EditorAssetLibrary.save_asset(spec["path"]) unreal.log(f"Created Ground Zero environment material: {spec['path']}") + else: + base_color = unreal.MaterialEditingLibrary.get_material_property_input_node( + material, unreal.MaterialProperty.MP_BASE_COLOR + ) + if base_color and hasattr(base_color, "set_editor_property"): + try: + base_color.set_editor_property("constant", spec["color"]) + except Exception: + pass + + roughness = unreal.MaterialEditingLibrary.get_material_property_input_node( + material, unreal.MaterialProperty.MP_ROUGHNESS + ) + if roughness and hasattr(roughness, "set_editor_property"): + try: + roughness.set_editor_property("r", spec["roughness"]) + except Exception: + pass + + unreal.MaterialEditingLibrary.recompile_material(material) + unreal.EditorAssetLibrary.save_asset(spec["path"], only_if_is_dirty=False) if spec.get("used_with_instanced_static_meshes"): material.set_editor_property("used_with_instanced_static_meshes", True) unreal.MaterialEditingLibrary.recompile_material(material) diff --git a/Scripts/verify_ground_zero_foliage.py b/Scripts/verify_ground_zero_foliage.py index 872fc01..48f988b 100644 --- a/Scripts/verify_ground_zero_foliage.py +++ b/Scripts/verify_ground_zero_foliage.py @@ -4,9 +4,9 @@ import unreal MAP_PATH = "/Game/Agrarian/Maps/L_GroundZeroTerrain_Test" FOLIAGE_LABEL = "AGR_GroundZeroFoliage_FirstPass" EXPECTED_COUNTS = { - "trees": 42, - "shrubs": 96, - "grass": 180, + "trees": 96, + "shrubs": 220, + "grass": 420, } diff --git a/Source/AgrarianGame/AgrarianGamePlayerController.cpp b/Source/AgrarianGame/AgrarianGamePlayerController.cpp index 00a8697..2e0c850 100644 --- a/Source/AgrarianGame/AgrarianGamePlayerController.cpp +++ b/Source/AgrarianGame/AgrarianGamePlayerController.cpp @@ -14,11 +14,9 @@ #include "AgrarianSurvivalComponent.h" #include "Camera/CameraActor.h" #include "Components/SkeletalMeshComponent.h" -#include "Components/StaticMeshComponent.h" #include "EnhancedInputSubsystems.h" #include "Engine/LocalPlayer.h" #include "Engine/SkeletalMesh.h" -#include "Engine/StaticMesh.h" #include "GameFramework/Character.h" #include "GameFramework/CharacterMovementComponent.h" #include "InputCoreTypes.h" @@ -96,57 +94,6 @@ namespace : TEXT("/Game/Agrarian/Characters/Materials/M_AGR_CharacterProxy_Workwear_Male.M_AGR_CharacterProxy_Workwear_Male"); } - UStaticMeshComponent* EnsureMvpPresentationComponent( - AAgrarianGameCharacter* Character, - const FName ComponentName, - UStaticMesh* Mesh, - UMaterialInterface* Material, - const FVector& RelativeLocation, - const FRotator& RelativeRotation, - const FVector& RelativeScale) - { - if (!Character || !Mesh) - { - return nullptr; - } - - UStaticMeshComponent* Component = nullptr; - TArray ExistingComponents; - Character->GetComponents(ExistingComponents); - for (UStaticMeshComponent* ExistingComponent : ExistingComponents) - { - if (ExistingComponent && ExistingComponent->GetFName() == ComponentName) - { - Component = ExistingComponent; - break; - } - } - - if (!Component) - { - Component = NewObject(Character, ComponentName); - if (!Component) - { - return nullptr; - } - Component->SetupAttachment(Character->GetRootComponent()); - Component->RegisterComponent(); - Character->AddInstanceComponent(Component); - } - - Component->SetStaticMesh(Mesh); - if (Material) - { - Component->SetMaterial(0, Material); - } - Component->SetCollisionEnabled(ECollisionEnabled::NoCollision); - Component->SetGenerateOverlapEvents(false); - Component->SetRelativeLocation(RelativeLocation); - Component->SetRelativeRotation(RelativeRotation); - Component->SetRelativeScale3D(RelativeScale); - Component->SetHiddenInGame(false); - return Component; - } } void AAgrarianGamePlayerController::BeginPlay() @@ -496,60 +443,7 @@ void AAgrarianGamePlayerController::ApplyMvpCharacterProxyToPawn() } } - UStaticMesh* ChamferMesh = LoadObject( - nullptr, - TEXT("/Game/Agrarian/Environment/PlaceholderMeshes/SM_AGR_Placeholder_ChamferCube.SM_AGR_Placeholder_ChamferCube")); - UStaticMesh* CubeMesh = LoadObject( - nullptr, - TEXT("/Game/Agrarian/Environment/PlaceholderMeshes/SM_AGR_Placeholder_Cube.SM_AGR_Placeholder_Cube")); - UStaticMesh* CylinderMesh = LoadObject( - nullptr, - TEXT("/Game/Agrarian/Environment/PlaceholderMeshes/SM_AGR_Placeholder_Cylinder.SM_AGR_Placeholder_Cylinder")); - UMaterialInterface* WorkwearMaterial = LoadObject(nullptr, GetMvpCharacterProxyMaterialPath(SelectedMvpCharacterProxyId)); - UMaterialInterface* PackMaterial = LoadObject( - nullptr, - TEXT("/Game/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.M_AGR_GZ_Fiber_Resource")); - UMaterialInterface* BootMaterial = LoadObject( - nullptr, - TEXT("/Game/Agrarian/Materials/M_AGR_GZ_Wood_Resource.M_AGR_GZ_Wood_Resource")); - - const bool bFemaleProxy = SelectedMvpCharacterProxyId == TEXT("female"); - const float TorsoWidth = bFemaleProxy ? 0.33f : 0.38f; - const float TorsoDepth = bFemaleProxy ? 0.18f : 0.22f; - const float PackWidth = bFemaleProxy ? 0.24f : 0.28f; - - EnsureMvpPresentationComponent( - AgrarianCharacter, - TEXT("MvpWorkwearTorsoProxy"), - ChamferMesh, - WorkwearMaterial, - FVector(2.0f, 0.0f, 102.0f), - FRotator(0.0f, 0.0f, 0.0f), - FVector(TorsoWidth, TorsoDepth, 0.62f)); - EnsureMvpPresentationComponent( - AgrarianCharacter, - TEXT("MvpWorkwearBackpackProxy"), - ChamferMesh, - PackMaterial, - FVector(-24.0f, 0.0f, 106.0f), - FRotator(0.0f, 0.0f, 0.0f), - FVector(PackWidth, 0.16f, 0.48f)); - EnsureMvpPresentationComponent( - AgrarianCharacter, - TEXT("MvpWorkwearBedrollProxy"), - CylinderMesh, - PackMaterial, - FVector(-30.0f, 0.0f, 134.0f), - FRotator(0.0f, 90.0f, 0.0f), - FVector(0.12f, 0.12f, 0.58f)); - EnsureMvpPresentationComponent( - AgrarianCharacter, - TEXT("MvpWorkwearBootsProxy"), - ChamferMesh, - BootMaterial, - FVector(0.0f, 0.0f, 26.0f), - FRotator(0.0f, 0.0f, 0.0f), - FVector(0.34f, 0.20f, 0.18f)); + // Blockout clothing and pack geometry was removed because it read as broken placeholder art in the investor build. } void AAgrarianGamePlayerController::AgrarianGrantItem(FName ItemId, int32 Quantity) @@ -817,6 +711,11 @@ void AAgrarianGamePlayerController::AgrarianCompleteFrontend() SetMvpFrontendPresentationActive(false); SetInputMode(FInputModeGameOnly()); bShowMouseCursor = false; + + if (const APawn* ControlledPawn = GetPawn()) + { + SetControlRotation(FRotator(-8.0f, ControlledPawn->GetActorRotation().Yaw, 0.0f)); + } } void AAgrarianGamePlayerController::AgrarianShowMvpScreen(FName ScreenName) @@ -865,6 +764,78 @@ void AAgrarianGamePlayerController::AgrarianShowMvpScreen(FName ScreenName) ClientMessage(TEXT("Usage: AgrarianShowMvpScreen main|character|join|loading|saving")); } +void AAgrarianGamePlayerController::AgrarianInvestorSmokeTest(float CaptureDelaySeconds, float QuitDelaySeconds) +{ + if (!IsLocalPlayerController()) + { + return; + } + + const float ClampedCaptureDelaySeconds = FMath::Max(2.0f, CaptureDelaySeconds); + const float ClampedQuitDelaySeconds = FMath::Max(ClampedCaptureDelaySeconds + 4.0f, QuitDelaySeconds); + + FTimerDelegate EnterWorldDelegate; + EnterWorldDelegate.BindWeakLambda(this, [this]() + { + if (!MvpFrontendWidget) + { + ShowMvpFrontend(); + } + + SelectedMvpCharacterProxyId = TEXT("female"); + if (MvpFrontendWidget) + { + MvpFrontendWidget->SetSelectedCharacterArchetype(EAgrarianMvpCharacterArchetype::YoungAdultFemale); + } + + AgrarianCompleteFrontend(); + if (AAgrarianDebugHUD* AgrarianHUD = GetHUD()) + { + AgrarianHUD->bShowDebugHUD = false; + AgrarianHUD->bShowCriticalStatsHUD = false; + AgrarianHUD->bShowInventoryHUD = false; + AgrarianHUD->bShowCraftingHUD = false; + } + + if (APawn* ControlledPawn = GetPawn()) + { + const FRotator InvestorViewRotation(-4.0f, 42.0f, 0.0f); + ControlledPawn->SetActorRotation(FRotator(0.0f, InvestorViewRotation.Yaw, 0.0f)); + SetControlRotation(InvestorViewRotation); + } + + ClientMessage(TEXT("Investor smoke test entered Ground Zero as the female MVP character proxy.")); + }); + + FTimerHandle EnterWorldTimerHandle; + GetWorldTimerManager().SetTimer(EnterWorldTimerHandle, EnterWorldDelegate, 0.75f, false); + + FTimerDelegate ScreenshotDelegate; + ScreenshotDelegate.BindWeakLambda(this, [this]() + { + ClientMessage(TEXT("Investor smoke test capturing gameplay screenshot.")); + ConsoleCommand(TEXT("HighResShot 1")); + }); + + FTimerHandle ScreenshotTimerHandle; + GetWorldTimerManager().SetTimer(ScreenshotTimerHandle, ScreenshotDelegate, ClampedCaptureDelaySeconds, false); + + FTimerDelegate QuitDelegate; + QuitDelegate.BindWeakLambda(this, [this]() + { + ClientMessage(TEXT("Investor smoke test completed; quitting packaged client.")); + ConsoleCommand(TEXT("quit")); + }); + + FTimerHandle QuitTimerHandle; + GetWorldTimerManager().SetTimer(QuitTimerHandle, QuitDelegate, ClampedQuitDelaySeconds, false); + + ClientMessage(FString::Printf( + TEXT("Investor smoke test scheduled: screenshot in %.1fs, quit in %.1fs."), + ClampedCaptureDelaySeconds, + ClampedQuitDelaySeconds)); +} + void AAgrarianGamePlayerController::AgrarianTravel(float X, float Y, float Z) { ServerAgrarianTravel(FVector(X, Y, Z)); diff --git a/Source/AgrarianGame/AgrarianGamePlayerController.h b/Source/AgrarianGame/AgrarianGamePlayerController.h index b54a43f..3dabe48 100644 --- a/Source/AgrarianGame/AgrarianGamePlayerController.h +++ b/Source/AgrarianGame/AgrarianGamePlayerController.h @@ -153,6 +153,9 @@ public: UFUNCTION(Exec) void AgrarianShowMvpScreen(FName ScreenName); + UFUNCTION(Exec) + void AgrarianInvestorSmokeTest(float CaptureDelaySeconds = 6.0f, float QuitDelaySeconds = 18.0f); + UFUNCTION(Exec) void AgrarianTravel(float X, float Y, float Z); diff --git a/Source/AgrarianGame/AgrarianMapBoundaryVolume.cpp b/Source/AgrarianGame/AgrarianMapBoundaryVolume.cpp index 84a2fe8..989c182 100644 --- a/Source/AgrarianGame/AgrarianMapBoundaryVolume.cpp +++ b/Source/AgrarianGame/AgrarianMapBoundaryVolume.cpp @@ -15,7 +15,7 @@ AAgrarianMapBoundaryVolume::AAgrarianMapBoundaryVolume() RootComponent = BoundaryVolume; BoundaryVolume->SetBoxExtent(FVector(50000.0f, 50000.0f, 25000.0f)); BoundaryVolume->SetCollisionEnabled(ECollisionEnabled::NoCollision); - BoundaryVolume->SetHiddenInGame(false); + BoundaryVolume->SetHiddenInGame(true); BoundaryVolume->ShapeColor = FColor::Yellow; } diff --git a/Source/AgrarianGame/AgrarianSkyLightingController.cpp b/Source/AgrarianGame/AgrarianSkyLightingController.cpp index cf38b30..03bde69 100644 --- a/Source/AgrarianGame/AgrarianSkyLightingController.cpp +++ b/Source/AgrarianGame/AgrarianSkyLightingController.cpp @@ -7,6 +7,7 @@ #include "Components/DirectionalLightComponent.h" #include "Components/ExponentialHeightFogComponent.h" #include "Components/SceneComponent.h" +#include "Components/SkyAtmosphereComponent.h" #include "Components/SkyLightComponent.h" #include "Engine/World.h" #include "ProfilingDebugging/CpuProfilerTrace.h" @@ -30,6 +31,10 @@ AAgrarianSkyLightingController::AAgrarianSkyLightingController() SkyLight->SetIntensity(ClearSkyLightIntensity); SkyLight->SetMobility(EComponentMobility::Movable); + SkyAtmosphere = CreateDefaultSubobject(TEXT("SkyAtmosphere")); + SkyAtmosphere->SetupAttachment(SceneRoot); + SkyAtmosphere->SetMobility(EComponentMobility::Movable); + HeightFog = CreateDefaultSubobject(TEXT("HeightFog")); HeightFog->SetupAttachment(SceneRoot); HeightFog->SetFogDensity(ClearFogDensity); diff --git a/Source/AgrarianGame/AgrarianSkyLightingController.h b/Source/AgrarianGame/AgrarianSkyLightingController.h index 48edf45..2d4499d 100644 --- a/Source/AgrarianGame/AgrarianSkyLightingController.h +++ b/Source/AgrarianGame/AgrarianSkyLightingController.h @@ -10,6 +10,7 @@ class UDirectionalLightComponent; class UExponentialHeightFogComponent; class USceneComponent; +class USkyAtmosphereComponent; class USkyLightComponent; UCLASS(Blueprintable) @@ -32,6 +33,9 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Sky") TObjectPtr SkyLight; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Sky") + TObjectPtr SkyAtmosphere; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Sky") TObjectPtr HeightFog;