From a4cb44d98a5cca02fe09de70199e6bd6d4b17d15 Mon Sep 17 00:00:00 2001 From: Nicholas Harding <40708936+sir306@users.noreply.github.com> Date: Thu, 22 Oct 2026 15:47:14 +1300 Subject: [PATCH 1/2] Stop door spawning stalling geometry loads on slow frames A tester left Mobius idle for ~30 minutes, then loaded a geometry file and it "crawled". DecideAndExecuteSpawnStrategy chooses batched flow-counter spawning when FPS is at or below 40 (or the average is under 30, or memory is low), and the batched tick then skipped every frame longer than 25 ms, i.e. under 40 FPS. On a slow or thermally throttled machine the door queue never drained and the loading card stayed up, while one log line was written per skipped frame. Reproduced on ISO-Test-8-FireSmoke.udatasmith at t.MaxFPS 30: 0 of 15 doors in 84 s and 2,498 skip lines. - Flow counters: pace batches by wall-clock time only. Each SpawnInterval batch spawns at least one door and stops early after BatchTimeBudgetMs (4 ms), so the queue drains at any frame rate. Same test: 15 of 15 in 3.8 s. - Low-FPS watchdog: judge on the smoothed FPS rather than one frame, fire once per low-FPS spell instead of re-arming every 10 s, and ignore minimised frames (in the check and in the average). - Minimised windows (packaged / -game only): cap at Mobius.Perf.MinimisedMaxFPS (default 5, 0 = off) and restore the previous t.MaxFPS on restore. The editor and PIE are never capped; full rate while merely unfocused is kept. Verified in -game: t.MaxFPS 5 while minimised, 120 after restore, no watchdog noise on restore. An idle run with no data showed no growth between 1 and 6 minutes (MaterialInstanceDynamic 180 -> 96, TextureRenderTarget2D 2 -> 2, UserWidget 135 -> 135). Editor target builds clean. AI-assisted with Claude Code; all changes reviewed, tested, and verified by a human maintainer in line with this repository's AI-tooling policy. --- .../FlowCounterSpawnerComponent.cpp | 22 ++-- .../Subsystems/PerformanceUtilSubsystem.cpp | 108 +++++++++++++++++- .../Components/FlowCounterSpawnerComponent.h | 11 +- .../Subsystems/PerformanceUtilSubsystem.h | 14 +++ 4 files changed, 136 insertions(+), 19 deletions(-) diff --git a/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Components/FlowCounterSpawnerComponent.cpp b/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Components/FlowCounterSpawnerComponent.cpp index 3ea99599c..f00e15156 100644 --- a/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Components/FlowCounterSpawnerComponent.cpp +++ b/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Components/FlowCounterSpawnerComponent.cpp @@ -142,18 +142,11 @@ void UFlowCounterSpawnerComponent::TickComponent(float DeltaTime, ELevelTick Tic if (!bSpawning || PendingDoorMeshes.Num() == 0) return; - - // Check frame time throttle to avoid spawning when the game is struggling - float FrameTime = DeltaTime * 1000.0f; // ms - if (FrameTime > 25.0f) - { - // Skip this batch - system under load - LogToCustomLogger(FString::Printf(TEXT("TickComponent skipped spawning due to frame time %.2fms; pending doors: %d"), - FrameTime, PendingDoorMeshes.Num())); - return; - } - // Check TIME throttle (not frame throttle) + // Pace by wall-clock time only, never by frame time. This used to skip every frame slower than 25 ms, + // but ARuntimeMeshBuilder::DecideAndExecuteSpawnStrategy picks this batched path precisely when FPS is + // at or below 40, so on a slow (or thermally throttled) machine the queue could stop draining for good + // and leave the loading card up. A slow frame now only shortens the batch, via BatchTimeBudgetMs. const double Now = FPlatformTime::Seconds(); if (Now - LastSpawnTime < SpawnInterval) return; @@ -161,9 +154,16 @@ void UFlowCounterSpawnerComponent::TickComponent(float DeltaTime, ELevelTick Tic LastSpawnTime = Now; int32 SpawnedThisBatch = 0; + const double BatchDeadline = Now + BatchTimeBudgetMs / 1000.0; while (PendingDoorMeshes.Num() > 0 && SpawnedThisBatch < MaxPerBatch) { + // At least one per batch, however long it takes, so progress is guaranteed at any frame rate. + if (SpawnedThisBatch > 0 && FPlatformTime::Seconds() > BatchDeadline) + { + break; + } + const FPendingDoorEntry PendingDoor = PendingDoorMeshes[0]; PendingDoorMeshes.RemoveAtSwap(0); diff --git a/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Subsystems/PerformanceUtilSubsystem.cpp b/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Subsystems/PerformanceUtilSubsystem.cpp index 716e74c6f..7d983dedc 100644 --- a/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Subsystems/PerformanceUtilSubsystem.cpp +++ b/UnrealFolder/ProjectMobius/Source/MobiusCore/Private/Subsystems/PerformanceUtilSubsystem.cpp @@ -11,8 +11,33 @@ #include "RHI.h" #include "Subsystems/MobiusCustomLoggerSubsystem.h" #include "Engine/Engine.h" +#include "Engine/GameViewportClient.h" #include "Engine/World.h" +#include "HAL/IConsoleManager.h" #include "UserConfig/UserProjectSettings.h" +#include "Widgets/SWindow.h" + +static TAutoConsoleVariable CVarMobiusMinimisedMaxFPS( + TEXT("Mobius.Perf.MinimisedMaxFPS"), + 5.0f, + TEXT("Frame-rate cap while the packaged / -game window is minimised; t.MaxFPS is restored when it is restored.\n") + TEXT("0 disables the cap. The editor and PIE are never capped."), + ECVF_Default); + +namespace +{ + bool IsGameWindowMinimised() + { + if (GEngine && GEngine->GameViewport) + { + if (const TSharedPtr Window = GEngine->GameViewport->GetWindow()) + { + return Window->IsWindowMinimized(); + } + } + return false; + } +} // Heavy render-feature cvar tables per render tier (task C1). Each entry documents what it gates and // the per-tier value. Returned as "name=value" strings for ApplyConsoleCommands (-> ECVF_SetByCode). @@ -135,6 +160,13 @@ void UPerformanceUtilSubsystem::Deinitialize() CurrentRenderTier = ERpt_High; } + // t.MaxFPS is process-wide, so never leave the minimised cap behind on a world teardown. + if (bMinimisedFrameCapActive && GEngine) + { + GEngine->SetMaxFPS(FPSBeforeMinimise); + bMinimisedFrameCapActive = false; + } + // Clean up any resources or delegates here if needed if (ProjectSettings) { @@ -159,11 +191,48 @@ void UPerformanceUtilSubsystem::Tick(float DeltaTime) { Super::Tick(DeltaTime); + UpdateMinimisedFrameCap(); + // Calculate the current FPS based on DeltaTime CalculateCurrentFPS(DeltaTime); CheckCurrentFPS(); } +void UPerformanceUtilSubsystem::UpdateMinimisedFrameCap() +{ + // Packaged and -game only. The editor deliberately keeps full rate when it is not in front + // (Config/DefaultEditorSettings.ini), and PIE shares the editor process. + if (GIsEditor || !GEngine) + { + return; + } + + const float CapFPS = CVarMobiusMinimisedMaxFPS.GetValueOnGameThread(); + const bool bWantCap = CapFPS > 0.0f && IsGameWindowMinimised(); + if (bWantCap == bMinimisedFrameCapActive) + { + return; + } + + if (bWantCap) + { + FPSBeforeMinimise = GEngine->GetMaxFPS(); + GEngine->SetMaxFPS(CapFPS); + } + else + { + GEngine->SetMaxFPS(FPSBeforeMinimise); + } + bMinimisedFrameCapActive = bWantCap; + + if (UMobiusCustomLoggerSubsystem* StartupLogger = GEngine->GetEngineSubsystem()) + { + StartupLogger->EnqueueLogMessage(bWantCap + ? FString::Printf(TEXT("Window minimised: frame rate capped at %.0f FPS (was %.0f)"), CapFPS, FPSBeforeMinimise) + : FString::Printf(TEXT("Window restored: frame-rate limit back to %.0f FPS"), FPSBeforeMinimise)); + } +} + static bool ParseCVarString(const FString& InString, FString& OutName, FString& OutValue) { // Split only on the first �=� @@ -228,7 +297,13 @@ void UPerformanceUtilSubsystem::CalculateCurrentFPS(float DeltaTime) if (DeltaTime > 0.0f) { CurrentFPS = 1.0f / DeltaTime; - SmoothedFPS = FMath::Lerp(SmoothedFPS, CurrentFPS, 0.1f); + + // Minimised frames run under the minimised frame cap and say nothing about real performance; keep + // them out of the average so restoring the window does not read as a sudden low-FPS spell. + if (!IsGameWindowMinimised()) + { + SmoothedFPS = FMath::Lerp(SmoothedFPS, CurrentFPS, 0.1f); + } } } @@ -615,6 +690,10 @@ void UPerformanceUtilSubsystem::ApplyOptimizationsBasedOnFPS() // set the avatar model type to low spec CurrentAvatarModelType = EPss_Low; + // Latch until FPS recovers (see CheckCurrentFPS). The user can still switch the avatar model back + // by hand (UAdjustAvatarModel), and this will not immediately undo that. + bLowFPSOptimisationApplied = true; + // Notify listeners that auto scalability has changed OnAutoScalabilityChanged.Broadcast(); @@ -628,9 +707,24 @@ void UPerformanceUtilSubsystem::ApplyOptimizationsBasedOnFPS() //TODO: Our check for FPS is simplistic and only checks if the FPS is below a threshold. - we may want a range tolerance as well void UPerformanceUtilSubsystem::CheckCurrentFPS() { - if (CurrentFPS <= LowFPSThreshold) + // A minimised window renders nothing worth judging, and runs under the minimised frame cap, so it + // must neither arm the watchdog nor let an armed one fire. + if (IsGameWindowMinimised()) + { + if (AutoScalabilityTimerHandle.IsValid()) + { + GetWorld()->GetTimerManager().ClearTimer(AutoScalabilityTimerHandle); + AutoScalabilityTimerHandle.Invalidate(); + } + return; + } + + // Smoothed, not instantaneous: one long frame (a load hitch) is not a sustained drop. + if (SmoothedFPS <= LowFPSThreshold) { - if (!AutoScalabilityTimerHandle.IsValid()) + // Once per low-FPS episode. This used to re-arm straight after firing, so a machine that stayed + // slow re-applied the optimisation and logged two lines every 10 s indefinitely. + if (!bLowFPSOptimisationApplied && !AutoScalabilityTimerHandle.IsValid()) { // Start the timer to trigger auto scalability adjustments GetWorld()->GetTimerManager().SetTimer(AutoScalabilityTimerHandle, this, @@ -642,10 +736,12 @@ void UPerformanceUtilSubsystem::CheckCurrentFPS() } } } - else + else if (SmoothedFPS > LowFPSThreshold + 5.0f) // 5 FPS of hysteresis { - // if we have hit the low FPS threshold and the timer is valid, we clear it, provided the FPS has improved by our tolerance - if (AutoScalabilityTimerHandle.IsValid() && CurrentFPS > LowFPSThreshold + 5.0f)// Adding a tolerance of 5 FPS + // Recovered: a later sustained drop may fire again. + bLowFPSOptimisationApplied = false; + + if (AutoScalabilityTimerHandle.IsValid()) { GetWorld()->GetTimerManager().ClearTimer(AutoScalabilityTimerHandle); AutoScalabilityTimerHandle.Invalidate(); diff --git a/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Components/FlowCounterSpawnerComponent.h b/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Components/FlowCounterSpawnerComponent.h index ad0d392b3..2b47ced36 100644 --- a/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Components/FlowCounterSpawnerComponent.h +++ b/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Components/FlowCounterSpawnerComponent.h @@ -36,7 +36,7 @@ class MOBIUSCORE_API UFlowCounterSpawnerComponent : public UActorComponent // called by owner when all doors discovered void BeginSpawning(); - // bypass frame-budget throttle — call after load spikes to finish remaining spawns immediately + // bypass the batch pacing — call after load spikes to finish remaining spawns immediately void FlushRemainingSpawns(); // cancel in-progress spawning and discard all queued doors — call before a new load replaces the mesh @@ -47,7 +47,14 @@ class MOBIUSCORE_API UFlowCounterSpawnerComponent : public UActorComponent UPROPERTY(EditAnywhere) float SpawnInterval = 0.25f; - + + /** + * Wall-clock budget for one batch, in milliseconds. A batch stops early once it has used this much, + * but always spawns at least one door, so the queue drains at any frame rate. + */ + UPROPERTY(EditAnywhere) + float BatchTimeBudgetMs = 4.0f; + UPROPERTY(EditAnywhere, BlueprintAssignable, Category = "MeshGenerator|Delegates") FOnFlowCounterSpawned OnFlowCounterAutoSpawned; diff --git a/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Subsystems/PerformanceUtilSubsystem.h b/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Subsystems/PerformanceUtilSubsystem.h index 49906d8e4..fd2fc5d09 100644 --- a/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Subsystems/PerformanceUtilSubsystem.h +++ b/UnrealFolder/ProjectMobius/Source/MobiusCore/Public/Subsystems/PerformanceUtilSubsystem.h @@ -198,6 +198,20 @@ class MOBIUSCORE_API UPerformanceUtilSubsystem : public UTickableWorldSubsystem */ void CheckCurrentFPS(); + /** + * Packaged / -game only: cap the frame rate while the window is minimised (Mobius.Perf.MinimisedMaxFPS) + * and restore the previous t.MaxFPS when it is restored. Nothing on screen needs 120 FPS while + * minimised, and an hour of full-rate rendering behind a minimised window heats the machine for nothing. + */ + void UpdateMinimisedFrameCap(); + + /** Set once the low-FPS watchdog has fired; it stays quiet until FPS recovers instead of re-firing every 10 s. */ + bool bLowFPSOptimisationApplied = false; + + /** True while the minimised frame cap is in force; FPSBeforeMinimise is what t.MaxFPS returns to afterwards. */ + bool bMinimisedFrameCapActive = false; + float FPSBeforeMinimise = 0.0f; + /** * Called from the low-FPS watchdog (ApplyOptimizationsBasedOnFPS). Intentionally a no-op for the * render tier: C1 is startup hardware-detect + the C2 override only, NOT FPS-driven runtime From f8386760327c2d5b120dedac627f6ae5bc6852da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Oct 2026 02:47:40 +0000 Subject: [PATCH 2/2] Update tech debt report [skip ci] --- docs/TECH-DEBT.md | 400 +++++++++++++++++++++++----------------------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/docs/TECH-DEBT.md b/docs/TECH-DEBT.md index 1d1a0ad6e..23cf38992 100644 --- a/docs/TECH-DEBT.md +++ b/docs/TECH-DEBT.md @@ -2,7 +2,7 @@ > Auto-generated by [todo-tracker.yml](../.github/workflows/todo-tracker.yml) — updated weekly and on source changes. -**Generated:** 2026-10-21 23:31 UTC +**Generated:** 2026-10-22 02:47 UTC ## Summary @@ -43,39 +43,61 @@ - Line 54: `// TODO (owner ruling 2026-08-03, deferred for deadline): this drives the SUBSYSTEM directly -- it sets` **ProjectMobiusTests/Private/Tests/TrajectoryHeatmapInGameTest.cpp** - Line 51: `// TODO (owner ruling 2026-08-03, carried over from the pre-rewrite file, still true): every scenario here` -**MobiusWidgets/Private/Slate/Components/SFieldAndTitleText.cpp** -- Line 260: `// TODO: add in padding if needed` -**MobiusWidgets/Private/Slate/Components/SAgentFollowIndicator.cpp** -- Line 68: `//TODO: need to do this once, likely store a variable and check for nullptr` -- Line 138: `// TODO: we can improve this to be the only SMeshWidget, we just need to figure out how to handle the different textures for each instance` -**MobiusWidgets/Private/Slate/Components/SWindowTitleBarWidget.cpp** -- Line 123: `// TODO: Investigate further why calling the parent implementation here seems to cause issues.` -**MobiusWidgets/Private/Slate/Components/SPedestrianAgentHoverMeshWidget.cpp** -- Line 158: `// TODO: we should add small white placeholder text like ---` -**MobiusWidgets/Private/UI/MobiusSettingPanel.cpp** -- Line 40: `// TODO:` -**MobiusWidgets/Private/UI/Components/FloorStatsWidget.cpp** -- Line 629: `// TODO: currently we have a limitation for updates that are sent to the overlay,` +**Visualization/Private/DynamicPixelRenderingTexture.cpp** +- Line 72: `// Level of Service Colors for each band - in linear color format TODO: this needs to be a parameter` +- Line 106: `//TODO: add extra parameters for mip settings, compression settings, and srgb settings to give more control` +- Line 169: `if (!bIsBlurRequired && *(PixelPtrToUpdate + 2) > COLOR_TO_BYTE(BlurTriggerThreshold))// TODO: this value needs to either be a parameter or passed in - this is the lower band` +- Line 683: `* TODO: This needs to be fixed in the future, but for now we will use the Mat class. Potential fixes include OpenCV stream handling` +- Line 726: `std::vector points;// TODO: need to test this with a vector of points` +- Line 891: `// TODO: future work may want to add a bool to save texture as grayscale` +- Line 1100: `//TODO: ADD VARIABLES TO STORE ALREADY CALCULATED CVD COLOURS -- MAYBE BUT BLUR Could mess this up` +- Line 1134: `//TODO: ADD VARIABLES TO STORE ALREADY CALCULATED CVD COLOURS -- MAYBE BUT BLUR Could mess this up` +**Visualization/Private/QuadTreeSubsystem.cpp** +- Line 102: `// check tree not null -TODO: Add bool if we using a quad or oct tree(eventually all be oct)` +**Visualization/Private/HeatmapVisualizer.cpp** +- Line 232: `//TODO FIX THIS SIZE ISSUE` +- Line 332: `//TODO: covert to parallel for loop` +**Visualization/Public/QuadTreeSubsystem.h** +- Line 71: `void RemoveEntityFromTree(FVector EntityLocation);//TODO: this needs to be a hash` +- Line 86: `//TODO: work out the columns and rows for the quadtree for spline graph to use` +**Visualization/Public/HeatmapVisualizer.h** +- Line 63: `// TODO: This method is likely going to need to be async so that we can update the render target in real time and not block the main thread` +**Visualization/Public/QuadTreeDataMap.h** +- Line 90: `//TODO: If a hash can be made to work out the tree location this would be a lot faster` +- Line 105: `* TODO: Add ID hashing to remove entities - this way we don't have to recursively search for the entity and can remove it in O(TreeDepth) time` **MobiusWidgets/Private/UI/Components/Scalability/AdjustAvatarModel.cpp** - Line 43: `//TODO: we have method duplicates that we need to rename and call where appropriate` -**MobiusWidgets/Private/UI/Components/BaseLoadingWidget.cpp** -- Line 156: `// TODO: Future will customize this image to do more effects like change colour` -**MobiusWidgets/Private/UI/Components/FlowSectionCounter.cpp** -- Line 63: `// TODO: backgrounds adjust padding/colors here` -- Line 107: `// TODO: determine if center/align inside our root grid cell here if needed` +**MobiusWidgets/Private/UI/Components/FloorStatsWidget.cpp** +- Line 629: `// TODO: currently we have a limitation for updates that are sent to the overlay,` +**MobiusWidgets/Private/UI/Components/PedestrianDataDisplay.cpp** +- Line 142: `// TODO: for now widget field 6 will be collapsed and not used as the gait speed is not yet implemented` +- Line 227: `WidgetHeadGridPanel->SetVisibility(ESlateVisibility::Visible);// should change to visible but self not hit testable -> TODO: update BP logic to handle this` +- Line 358: `// Check if the the required width and height are not the same as the current coefficients -> TODO: add a tolerance check here so we don't resize if the values are very close` **MobiusWidgets/Private/UI/Components/BaseChangePedestrianMaterial.cpp** - Line 133: `// TODO: this check need to be better and handled differently` - Line 270: `// Does the MaterialInst match the starting material of the pedestrian? // TODO` - Line 436: `// TODO: we may want to display a value to a user` - Line 487: `//PropertySliderText->SetText(FText::FromString("Current " + CurrentMaterialProperty + ": " + FString::SanitizeFloat(CurrentVal))); //TODO this needs to be done in slider changed too` - Line 517: `// TODO: until i figure the best way to handle resizing and scaling of the widget, we will hide the slider and text this way the widget will not be resized` -**MobiusWidgets/Private/UI/Components/PedestrianDataDisplay.cpp** -- Line 142: `// TODO: for now widget field 6 will be collapsed and not used as the gait speed is not yet implemented` -- Line 227: `WidgetHeadGridPanel->SetVisibility(ESlateVisibility::Visible);// should change to visible but self not hit testable -> TODO: update BP logic to handle this` -- Line 358: `// Check if the the required width and height are not the same as the current coefficients -> TODO: add a tolerance check here so we don't resize if the values are very close` +**MobiusWidgets/Private/UI/Components/BaseLoadingWidget.cpp** +- Line 156: `// TODO: Future will customize this image to do more effects like change colour` +**MobiusWidgets/Private/UI/Components/FlowSectionCounter.cpp** +- Line 63: `// TODO: backgrounds adjust padding/colors here` +- Line 107: `// TODO: determine if center/align inside our root grid cell here if needed` +**MobiusWidgets/Private/UI/MobiusSettingPanel.cpp** +- Line 40: `// TODO:` **MobiusWidgets/Private/UI/InWorld/FlowCounterWidget.cpp** - Line 154: `// TODO: may need to assess if the ptr array count matches the uniform grid children count` - Line 195: `// TODO: implement scroll logic` +**MobiusWidgets/Private/Slate/Components/SAgentFollowIndicator.cpp** +- Line 68: `//TODO: need to do this once, likely store a variable and check for nullptr` +- Line 138: `// TODO: we can improve this to be the only SMeshWidget, we just need to figure out how to handle the different textures for each instance` +**MobiusWidgets/Private/Slate/Components/SPedestrianAgentHoverMeshWidget.cpp** +- Line 158: `// TODO: we should add small white placeholder text like ---` +**MobiusWidgets/Private/Slate/Components/SFieldAndTitleText.cpp** +- Line 260: `// TODO: add in padding if needed` +**MobiusWidgets/Private/Slate/Components/SWindowTitleBarWidget.cpp** +- Line 123: `// TODO: Investigate further why calling the parent implementation here seems to cause issues.` **MobiusWidgets/Private/Util/WidgetUtilHelpers.cpp** - Line 196: `//TODO: FIX THIS METHOD` - Line 208: `// TODO: this calculation is wrong` @@ -90,217 +112,195 @@ - Line 67: `// TODO: add methods for updating specific section counter values` **MobiusWidgets/Public/UI/InWorld/AgentInfoDisplay.h** - Line 52: `// TODO: should remove storing data from the widget and instead use a subsystem to manage this data` -**Visualization/Private/HeatmapVisualizer.cpp** -- Line 232: `//TODO FIX THIS SIZE ISSUE` -- Line 332: `//TODO: covert to parallel for loop` -**Visualization/Private/DynamicPixelRenderingTexture.cpp** -- Line 72: `// Level of Service Colors for each band - in linear color format TODO: this needs to be a parameter` -- Line 106: `//TODO: add extra parameters for mip settings, compression settings, and srgb settings to give more control` -- Line 169: `if (!bIsBlurRequired && *(PixelPtrToUpdate + 2) > COLOR_TO_BYTE(BlurTriggerThreshold))// TODO: this value needs to either be a parameter or passed in - this is the lower band` -- Line 683: `* TODO: This needs to be fixed in the future, but for now we will use the Mat class. Potential fixes include OpenCV stream handling` -- Line 726: `std::vector points;// TODO: need to test this with a vector of points` -- Line 891: `// TODO: future work may want to add a bool to save texture as grayscale` -- Line 1100: `//TODO: ADD VARIABLES TO STORE ALREADY CALCULATED CVD COLOURS -- MAYBE BUT BLUR Could mess this up` -- Line 1134: `//TODO: ADD VARIABLES TO STORE ALREADY CALCULATED CVD COLOURS -- MAYBE BUT BLUR Could mess this up` -**Visualization/Private/QuadTreeSubsystem.cpp** -- Line 102: `// check tree not null -TODO: Add bool if we using a quad or oct tree(eventually all be oct)` -**Visualization/Public/QuadTreeDataMap.h** -- Line 90: `//TODO: If a hash can be made to work out the tree location this would be a lot faster` -- Line 105: `* TODO: Add ID hashing to remove entities - this way we don't have to recursively search for the entity and can remove it in O(TreeDepth) time` -**Visualization/Public/QuadTreeSubsystem.h** -- Line 71: `void RemoveEntityFromTree(FVector EntityLocation);//TODO: this needs to be a hash` -- Line 86: `//TODO: work out the columns and rows for the quadtree for spline graph to use` -**Visualization/Public/HeatmapVisualizer.h** -- Line 63: `// TODO: This method is likely going to need to be async so that we can update the render target in real time and not block the main thread` -**ProjectMobius/Private/BRisk/BRiskDataSubsystem.cpp** -- Line 596: `// TODO(b-risk geometry toggle / mobius builder): the OFF path below reloads the imported building` -**ProjectMobius/Private/Widgets/Simulation/TimeDilationWidget.cpp** -- Line 59: `//TODO: change to FTEXT so we can format the text better and have it localized` -**ProjectMobius/Private/Widgets/Simulation/SimulationPlayBar.cpp** -- Line 352: `//TODO: THIS NEEDS TO BE FIXED - currently only works when sim is paused first then dragged and unpaused not live adjust(somewhere is updating to previous value after new value)` -- Line 396: `// Round current step to the nearest step size - TODO: this ` -- Line 519: `// TODO: look into UWidgetUtilHelpers for this functionality and see if its better or useable` -**ProjectMobius/Private/Controller/MobiusController.cpp** -- Line 515: `// TODO: Current implementation is a placeholder and will load the file each time and then pick a random transform` -**ProjectMobius/Private/MassAI/MassProcessor/Collisions/PedestrianCollisionProcessor.cpp** -- Line 47: `//TODO: add tag for when we do toggle logic if we want to toggle the collision processor on and off` -- Line 74: `//TODO: We have two methods that rely on the agent subsystem we should assign it to a variable and use it` -- Line 101: `//TODO: below the query needs to be optimized so its scalable - current implementation is not scalable and is a hack together prototype` -- Line 120: `//TODO: We have two methods that rely on the agent subsystem we should assign it to a variable and use it` -- Line 252: `if (EntityCollision.Capsule.Get() == HoveredCapsuleComponent)//TODO: DOUBLE CLICK ` -**ProjectMobius/Private/MassAI/MassProcessor/PedestrianMovementProcessor.cpp** -- Line 171: `// TODO: This processor needs breaking up into smaller processors as it is doing too much at once` -- Line 196: `//TODO: Move data to subsystem and get it from there so not constantly getting large data sets` -- Line 413: `//TODO: ****** when destroying respawning back this should only be called when needed not every execute ******` -- Line 494: `// TODO: This one should be at the start to only check once per call not per loop iteration per call` -**ProjectMobius/Private/MassAI/MassProcessor/Representation/AgentHeatmapProcessor.cpp** -- Line 151: `// TODO: Getting mallocs and realloc collisions with parallel -> maybe need to look at null check or something` -- Line 448: `// TODO: this loop is not parallelized, implement ParallelFor for performance and a threadsafe container for HeatmapLocations for simplicity` -**ProjectMobius/Private/MassAI/MassProcessor/Representation/NiagaraAgentRepProcessor.cpp** -- Line 122: `//TODO: Make flag for this so no constant gets etc` -- Line 127: `// Get the agent representation actor //TODO: this works but it could be better` -- Line 150: `//TODO: need to look at mass ai signals and how to use them -> this should be the equivalent to delegates and events -> and the reloading the shared fragments should only occur then` -- Line 158: `//TODO: this check does not work at all, it never returns true despite data changes!!` -- Line 347: `// Half of the former TODO here is now done: a failed agent's mesh is hidden (bHiddenByTenabilityFailure` -- Line 548: `//TODO: FIX THIS - when going low spec to high the animations remain paused and only resume when we pause and unpause` -**ProjectMobius/Private/MassAI/MassProcessor/Representation/DisplayAgentUIStatsProcessor.cpp** -- Line 207: `//TODO: Moving away from the agent mesh viewer, we will need to update this to use the new system ->once we have collisions` -**ProjectMobius/Private/MassAI/MassProcessor/Analytics/FlowCounterProcessor.cpp** -- Line 63: `//TODO: check if paused -> don't want to keep executing if not needed` -**ProjectMobius/Private/MassAI/SubSystems/MassEntitySpawnSubsystem.cpp** -- Line 120: `//TODO: add a bool to check if the archetype has been created and if so, don't create it again` -- Line 179: `//TODO: We dont want to simulate time till this is done, also we need a better way to build shared fragment and update the archetype on data changes` -**ProjectMobius/Private/MassAI/SubSystems/MassRepresentation/MRS_RepresentationSubsystem.cpp** -- Line 260: `// TODO: no separate gender logic yet` -- Line 578: `// TODO: refactor this method` -- Line 599: `//TODO: at the moment this method will be fine` -**ProjectMobius/Private/MassAI/SubSystems/AgentDataSubsystem.cpp** -- Line 115: `//TODO: optimize this so that the file path is not hardcoded and we only perform this operation once` -- Line 173: `//TODO: this is a temp fix but we need to find a better way to update loading text from this subsystems` -- Line 296: `else // no valid age demographic found -> TODO: for now just set it to adult but need to think on how we want to handle this` -- Line 900: `* @note TODO: Some agents appear to be moving but have 0 speed calculated. Investigate where` -- Line 957: `Subsys->ProgressQueue.Enqueue(0.0f);// TODO: NEED to broadcast new load text here` -- Line 1149: `// TODO: this has no way to know progress of loading file at the moment so we need to think on how to do this better` -**ProjectMobius/Private/MassAI/MassObserverProcessor/PedestrianInitializeMOP.cpp** -- Line 202: `//TODO: This is a poor assumption and should really be searching and checking` -- Line 347: `//TODO: MOVE INTO OWN OBSERVOR` -**ProjectMobius/Private/MassAI/MassObserverProcessor/Representation/AgentRepresentation_MOP.cpp** -- Line 155: `//TODO: need to do index size and offset check here` -- Line 168: `// TODO: this check will always fail on data swap as the frags are reset so sizes will be 0 like the offset` -- Line 252: `// TODO(§4): confirm this handle name once the chair emitter is actually added to both Niagara` -**ProjectMobius/Private/MassAI/SignalProcessors/EnableCollisionSignalProcessor.cpp** -- Line 34: `//TODO: will want to break this into two different signal processors, one for enabling collisions and one for disabling collisions -> this way the disable logic can be more complex and handle the disa` -**ProjectMobius/Public/Widgets/Simulation/SimulationPlayBar.h** -- Line 108: `* Decrement the current playback by 0.1 seconds - TODO: see whether its better to do by a timestep or by a fixed value` -**ProjectMobius/Public/Widgets/Simulation/TimeDilationWidget.h** -- Line 76: `//TODO: Change UTextblocks to RichTextBlocks for better formatting and styling` -**ProjectMobius/Public/MassAI/MassProcessor/PedestrianMovementProcessor.h** -- Line 109: `* TODO: This will be eventually replaced to be a lookup method but for now simple check` -**ProjectMobius/Public/MassAI/MassProcessor/Representation/AgentHeatmapProcessor.h** -- Line 118: `/** Subsystem for heatmaps -- TODO: move this to its own processor */` -- Line 215: `UE::TConsumeAllMpmcQueue LocationQueue; //TODO: Need to handle garbage collection of this queue` -**ProjectMobius/Public/MassAI/Fragments/SharedFragments/SimulationFragment.h** -- Line 121: `// TODO: Add buffer method and not store all data in this struct` -- Line 122: `// TODO: This Map logic needs improving as it is not efficient with large data sets and looping over all data is poor` -**ProjectMobius/Public/MassAI/Fragments/SharedFragments/RepresentationFragments/AgentRepresentationFragment.h** -- Line 90: `int32 NumberOfChildren = 0;// TODO: Maybe do different genders` -- Line 99: `//TODO: currently use bool to switch between low spec static effect and med VAT effect -> when we use enum we will use it here too` -- Line 142: `int32 NumberOfChildren = 0;// TODO: Maybe do different genders` -- Line 154: `//TODO: currently use bool to switch between low spec static effect and med VAT effect -> when we use enum we will use it here too` -**ProjectMobius/Public/MassAI/Fragments/SharedFragments/RepresentationFragments/AgentNiagaraDataFrag.h** -- Line 53: `TArray MaleAdultAnimationStates; // TODO: likely when we bring dif age brackets we want all of them to be in one array` -- Line 77: `TArray FemaleAdultAnimationStates; // TODO: likely when we bring dif age brackets we want all of them to be in one array` -**ProjectMobius/Public/MassAI/Fragments/EntityInfoFragment.h** -- Line 218: `uint8 showPedestrianStats = 0;// 0 = don't show, 1 = show, TODO: 2 = show and highlight` -- Line 288: `struct PROJECTMOBIUS_API FEntityCollisionFragment: public FMassFragment //TODO: this may want to be a FObjectWrapperFragment ?? TBD` -**ProjectMobius/Public/MassAI/SubSystems/MassRepresentation/MRS_RepresentationSubsystem.h** -- Line 63: `static const FVatMovementFrames AvatarGaitSpeedBands[] = { // TODO: need more, narrower bands: fastShuffle, VerySlowWalk etc.` -- Line 169: `* @param[float] AgentMaxSpeed The agents max speed TODO: this is a quick fix to create variations in agent movement speeds` -- Line 213: `//TODO: while still using bool on avatar choice in frag use this method to convert current setting to a bool` -**ProjectMobius/Public/MassAI/SubSystems/MassEntitySpawnSubsystem.h** -- Line 134: `void BuildPedestrianRepresentationFragmentData(); // TODO: add inputs to allow for customisation of the pedestrian representation currently hardcoded values` -**ProjectMobius/Public/MassAI/SubSystems/AgentDataSubsystem.h** -- Line 349: `* @warning TODO: Some agents appear to be moving but have 0 speed calculated.` -**HIT_ThesisWork/Private/ExperimentScorer.cpp** -- Line 209: `Result = FFileHelper::SaveStringToFile(FString("Test Data"), *CSVFilePath);//TODO: Replace "Test Data" with the actual data and look at my other code for how to format the data and add more complexity` -- Line 345: `bColourDeficiencyOverrided = false; // TODO: change to true once images for thesis done` -**HIT_ThesisWork/Public/ExperimentScorer.h** -- Line 285: `const int32 SimulationLimit = 5;// TODO: change this if recruitment increases` **MobiusCore/Private/GameInstances/ProjectMobiusGameInstance.cpp** - Line 38: `// TODO: Set default values for these variables -- talk to peter if particular values are needed that` -**MobiusCore/Private/Actors/FlowCounter.cpp** -- Line 50: `// TODO: Move these helpers to a utility class - likely will be useful elsewhere` -- Line 277: `// TODO: Need to clean up the line offset so we are consistent about ground vs line height as this is confusing` -- Line 357: `// TODO: setup alternative for VR` -- Line 533: `//TODO: likely need to communicate pillars location changing wait for changes to mass ai so we don't get data corruption/mismatches` -- Line 583: `// TODO: depending on mass ai logic we may want to reset the agents passed through counter as well` -- Line 680: `//TODO: Our z limits shouldn't be based on the trigger box extents as if the pillars are at different z locations, the trigger box will be rotated` -- Line 785: `// TODO: this is a temporary fix to account for the Z search limits being in world space and the line intersection check being in local space` -- Line 851: `else if (FlowCounter->PreviousTrackedAgentLocations.Contains(Data.AgentID)) // TODO: check if we actually want to check if intersected or disregard ` -- Line 870: `// TODO: this is a temporary fix to account for the Z search limits being in world space and the line intersection check being in local space -> also minz may not be correctly set` -- Line 1029: `// TODO: until we handle new sim time for large amounts of actors then we should only ` -- Line 1154: `// TODO: Review this logic with Pete to ensure this is how we should be checking` -- Line 1221: `//TODO: If we store in multiple buckets in the case when start and end locations are the same we may want to remove from all buckets` -**MobiusCore/Private/Actors/HeatmapPixelTextureVisualizer.cpp** -- Line 262: `GenerateMeshVerticesUVsAndTriangles(MeshSize, FIntPoint(TextureWidth, TextureHeight), bIs3DHeatmap); // TODO work out a resolution for the mesh to be generated` -- Line 1035: `//TODO: for now hardcode the radius as 11 - this is to be changed to a variable and be a float over integer for more precise locations` -- Line 1080: `//TODO:OPTIMIZE` -- Line 1105: `DynamicTexture->ClearTexture(); // TODO: create a buffer that represents clear so no need to keep doing loops` -- Line 1135: `// TODO: this convert not needed as was part of user study test -> it should be converted into a material logic not cpu logic` -- Line 1262: `//TODO:OPTIMIZE` -- Line 1281: `DynamicTexture->ClearTexture(); // TODO: create a buffer that represents clear so no need to keep doing loops` -- Line 1308: `// TODO: this convert not needed as was part of user study test -> it should be converted into a material logic not cpu logic` -- Line 1894: `NumTriangles.X = FMath::CeilToInt32(MeshSize.X / 25); // TODO: working in meters so 100 is 1 meter so divide by 25 to get 4 triangles per meter` -- Line 1896: `//TODO: this is a fix triangle size based on being to a 10 tenth of the mesh size - this is as resolution goes up so does the number of triangles required` -- Line 2502: `float StepSize = 650.0f; // TODO: This is a hardcoded value for now for demo 500 ensures the building is covered - its too large for the mesh and has overflow around the edges ` **MobiusCore/Private/BuildingGenerator/RuntimeMeshBuilder.cpp** - Line 784: `FDatasmithRuntimeImportOptions ImportOptions;// TODO: set the import options` - Line 935: `// TODO:check valid data` - Line 940: `/** TODO: if we get here and the runnable is not valid or the async loader is not valid we need to handle this` -**MobiusCore/Private/Subsystems/StatisticSubsystem.cpp** -- Line 128: `// TODO: switch to delta add/remove instead of full-array rebroadcast.` -- Line 133: `//TODO: we are going to need to expand this functionality when we increase the number of flow counters and their Z bounds` -- Line 185: `//TODO: this should be private method that we call after filtered in to correspond flowcounter groups - but prototype only using one so direct call to this is fine` -- Line 276: `// TODO: Instantaneous flow rate is the important one need to add` +**MobiusCore/Private/Interfaces/AssimpInterface.cpp** +- Line 37: `// May need to use rotate instead of unrotate -- TODO: See the difference between the two` **MobiusCore/Private/Subsystems/PerformanceUtilSubsystem.cpp** -- Line 149: `//TODO: investigate the best way to clear the delegate` -- Line 223: `//TODO: This method is simplistic and only calculates FPS based on DeltaTime.` -- Line 296: `// TODO: Extract private update method so we can update settings automatically or by users` -- Line 322: `// TODO: check if we can optimize this and reduce` -- Line 339: `// TODO: Extract private update method so we can update settings automatically or by users` -- Line 423: `// Using RHI we can get the available resolutions - TODO: we may want to look at refresh rate as well` -- Line 454: `// TODO: Extract private update method so we can update settings automatically or by users` -- Line 505: `// TODO: Extract private update method so we can update settings automatically or by users` -- Line 526: `//TODO: Below can be optimized with a lambda` -- Line 609: `CheckHardwareUsageAndApplyOptimizations();// TODO: current method is a stub, we need to implement it` -- Line 628: `//TODO: Our check for FPS is simplistic and only checks if the FPS is below a threshold. - we may want a range tolerance as well` +- Line 181: `//TODO: investigate the best way to clear the delegate` +- Line 292: `//TODO: This method is simplistic and only calculates FPS based on DeltaTime.` +- Line 371: `// TODO: Extract private update method so we can update settings automatically or by users` +- Line 397: `// TODO: check if we can optimize this and reduce` +- Line 414: `// TODO: Extract private update method so we can update settings automatically or by users` +- Line 498: `// Using RHI we can get the available resolutions - TODO: we may want to look at refresh rate as well` +- Line 529: `// TODO: Extract private update method so we can update settings automatically or by users` +- Line 580: `// TODO: Extract private update method so we can update settings automatically or by users` +- Line 601: `//TODO: Below can be optimized with a lambda` +- Line 684: `CheckHardwareUsageAndApplyOptimizations();// TODO: current method is a stub, we need to implement it` +- Line 707: `//TODO: Our check for FPS is simplistic and only checks if the FPS is below a threshold. - we may want a range tolerance as well` **MobiusCore/Private/Subsystems/TimeDilationSubSystem.cpp** - Line 53: `UpdateMaxTimeSteps(FMath::CeilToInt(TotalTime / TimeBetweenSteps)); //TODO: TimeBetweenSteps should be read from file or a setting for the user` - Line 203: `UpdateMaxTimeSteps(FMath::CeilToInt32(TotalTime / TimeBetweenSteps)); //TODO: TimeBetweenSteps should be read from file or a setting for the user` - Line 318: `// TODO make this better` +**MobiusCore/Private/Subsystems/StatisticSubsystem.cpp** +- Line 128: `// TODO: switch to delta add/remove instead of full-array rebroadcast.` +- Line 133: `//TODO: we are going to need to expand this functionality when we increase the number of flow counters and their Z bounds` +- Line 185: `//TODO: this should be private method that we call after filtered in to correspond flowcounter groups - but prototype only using one so direct call to this is fine` +- Line 276: `// TODO: Instantaneous flow rate is the important one need to add` **MobiusCore/Private/Subsystems/HeatmapSubsystem.cpp** - Line 125: `//TODO: we just want to update the heatmap if the location is the same and values are different` - Line 140: `FString HeatmapName = FString::Printf(TEXT("Heatmap_%i"), HeatmapIndex);// TODO: create a floor classification method based on array size` - Line 510: `// TODO: this sort of works for now but likely will cause problems later on` - Line 779: `// TODO: THis method causing a small performance hit, need to investigate, likely due to the way task is executed and requiring game thread for some operations` -**MobiusCore/Private/Components/FlowCounterSpawnerComponent.cpp** -- Line 261: `// TODO: Manipulate the rotation, size etc to fit door` -**MobiusCore/Private/Interfaces/AssimpInterface.cpp** -- Line 37: `// May need to use rotate instead of unrotate -- TODO: See the difference between the two` +**MobiusCore/Private/Actors/HeatmapPixelTextureVisualizer.cpp** +- Line 262: `GenerateMeshVerticesUVsAndTriangles(MeshSize, FIntPoint(TextureWidth, TextureHeight), bIs3DHeatmap); // TODO work out a resolution for the mesh to be generated` +- Line 1035: `//TODO: for now hardcode the radius as 11 - this is to be changed to a variable and be a float over integer for more precise locations` +- Line 1080: `//TODO:OPTIMIZE` +- Line 1105: `DynamicTexture->ClearTexture(); // TODO: create a buffer that represents clear so no need to keep doing loops` +- Line 1135: `// TODO: this convert not needed as was part of user study test -> it should be converted into a material logic not cpu logic` +- Line 1262: `//TODO:OPTIMIZE` +- Line 1281: `DynamicTexture->ClearTexture(); // TODO: create a buffer that represents clear so no need to keep doing loops` +- Line 1308: `// TODO: this convert not needed as was part of user study test -> it should be converted into a material logic not cpu logic` +- Line 1894: `NumTriangles.X = FMath::CeilToInt32(MeshSize.X / 25); // TODO: working in meters so 100 is 1 meter so divide by 25 to get 4 triangles per meter` +- Line 1896: `//TODO: this is a fix triangle size based on being to a 10 tenth of the mesh size - this is as resolution goes up so does the number of triangles required` +- Line 2502: `float StepSize = 650.0f; // TODO: This is a hardcoded value for now for demo 500 ensures the building is covered - its too large for the mesh and has overflow around the edges ` +**MobiusCore/Private/Actors/FlowCounter.cpp** +- Line 50: `// TODO: Move these helpers to a utility class - likely will be useful elsewhere` +- Line 277: `// TODO: Need to clean up the line offset so we are consistent about ground vs line height as this is confusing` +- Line 357: `// TODO: setup alternative for VR` +- Line 533: `//TODO: likely need to communicate pillars location changing wait for changes to mass ai so we don't get data corruption/mismatches` +- Line 583: `// TODO: depending on mass ai logic we may want to reset the agents passed through counter as well` +- Line 680: `//TODO: Our z limits shouldn't be based on the trigger box extents as if the pillars are at different z locations, the trigger box will be rotated` +- Line 785: `// TODO: this is a temporary fix to account for the Z search limits being in world space and the line intersection check being in local space` +- Line 851: `else if (FlowCounter->PreviousTrackedAgentLocations.Contains(Data.AgentID)) // TODO: check if we actually want to check if intersected or disregard ` +- Line 870: `// TODO: this is a temporary fix to account for the Z search limits being in world space and the line intersection check being in local space -> also minz may not be correctly set` +- Line 1029: `// TODO: until we handle new sim time for large amounts of actors then we should only ` +- Line 1154: `// TODO: Review this logic with Pete to ensure this is how we should be checking` +- Line 1221: `//TODO: If we store in multiple buckets in the case when start and end locations are the same we may want to remove from all buckets` **MobiusCore/Private/AsyncAssimpMeshLoader.cpp** - Line 334: `//TODO: Need to workout a way to handle normals for WKT data -> filters just don't work for this` - Line 905: `//TODO: this method needs to be refactored to use matrix transformations as it doesn't work when it comes to normals and this is where the issue is for translucent materials` +**MobiusCore/Private/Components/FlowCounterSpawnerComponent.cpp** +- Line 261: `// TODO: Manipulate the rotation, size etc to fit door` **MobiusCore/Public/GameInstances/ProjectMobiusGameInstance.h** - Line 113: `//TODO: convert methods below so we can broadcast events when the data is changed` - Line 288: `//TODO: we will bring datatables back as it makes it to manage and requires less memory allocation` - Line 371: `//TODO: we will bring datatables back as it makes it to manage and requires less memory allocation` -**MobiusCore/Public/Actors/FlowCounter.h** -- Line 19: `// Structs used internally for bucketing agents -> TODO: Move it to the FlowCounterStructs.h file as we may want to use it elsewhere` -- Line 255: `// TODO: we will need to also bucket this off as a per segment rolling average as we want that data` -- Line 307: `/* TODO: this property is redundant, we should just update methods to use the line that would be at the base of the pillars` -- Line 314: `/* TODO: we will want a reference to a user widget this way we can create a cpp version in the widget module and` -**MobiusCore/Public/Actors/HeatmapPixelTextureVisualizer.h** -- Line 214: `// TODO: This method is likely going to need to be async so that we can update the render target in real time and not block the main thread` -- Line 305: `/**TODO: look over this as it is late when you wrote it` -- Line 569: `* TODO: Currently using integer values, this should be changed to a float value for more precise locations and scale to texture and mesh size` -- Line 572: `int32 CircleRadius = 110; // 110 = 1.1m for our scaled data - TODO: SORT THIS OUT FOR BETTER SCALING` -- Line 698: `// TODO(perf, owner-flagged 2026-08-10): reduce the trajectory field's memory footprint by condensing` -- Line 1032: `int32 ScaledCircleSize; // TODO: This should be a float value for more precise locations and scale to texture and mesh size` -**MobiusCore/Public/EnumsAndStructs/AgentMeshViewer.h** -- Line 28: `//TODO: // Add more properties as needed, such as direction, health, etc.` **MobiusCore/Public/BuildingGenerator/RuntimeMeshBuilder.h** - Line 308: `/** Internal method to set the material on the mesh - TODO: this will need to be converted to be called via a delegate */` - Line 486: `/** TODO: We eventually want to get the mesh material and apply our materials to it as a mask or material function to it` **MobiusCore/Public/Subsystems/PerformanceUtilSubsystem.h** - Line 21: `DECLARE_MULTICAST_DELEGATE(FOnManualScalabilityChanged);//TODO: investigate whether separate param delegates will be better for performance or not` +**MobiusCore/Public/Subsystems/StatisticSubsystem.h** +- Line 57: `/** TODO: this will be used to pull logic from the heatmap subsystem and the floor stats widget so only one subsystem is used` **MobiusCore/Public/Subsystems/HeatmapSubsystem.h** - Line 118: `* TODO: we will in future want to pass more parameters to this function like type of heatmap, size, etc` - Line 249: `//TODO: this method needs to be placed in a more appropriate place as it is not really a heatmap method but we have bound the visualiser chart logic to this system` -**MobiusCore/Public/Subsystems/StatisticSubsystem.h** -- Line 57: `/** TODO: this will be used to pull logic from the heatmap subsystem and the floor stats widget so only one subsystem is used` **MobiusCore/Public/Subsystems/TimeDilationSubSystem.h** - Line 44: `/** Delegate to broadcast the new simulation time when it changes */ //TODO: do we need this delegate? left comment for now` - Line 190: `//TODO: @Peter -- This an assumption to be clarified but I am assuming all timesteps are calculated` **MobiusCore/Public/Subsystems/MobiusControllerSubsystem.h** - Line 87: `/**TODO: TBD if we can or want to use interfaces with mass ai entities, if so then we can use this method to perform a line trace` +**MobiusCore/Public/Actors/HeatmapPixelTextureVisualizer.h** +- Line 214: `// TODO: This method is likely going to need to be async so that we can update the render target in real time and not block the main thread` +- Line 305: `/**TODO: look over this as it is late when you wrote it` +- Line 569: `* TODO: Currently using integer values, this should be changed to a float value for more precise locations and scale to texture and mesh size` +- Line 572: `int32 CircleRadius = 110; // 110 = 1.1m for our scaled data - TODO: SORT THIS OUT FOR BETTER SCALING` +- Line 698: `// TODO(perf, owner-flagged 2026-08-10): reduce the trajectory field's memory footprint by condensing` +- Line 1032: `int32 ScaledCircleSize; // TODO: This should be a float value for more precise locations and scale to texture and mesh size` +**MobiusCore/Public/Actors/FlowCounter.h** +- Line 19: `// Structs used internally for bucketing agents -> TODO: Move it to the FlowCounterStructs.h file as we may want to use it elsewhere` +- Line 255: `// TODO: we will need to also bucket this off as a per segment rolling average as we want that data` +- Line 307: `/* TODO: this property is redundant, we should just update methods to use the line that would be at the base of the pillars` +- Line 314: `/* TODO: we will want a reference to a user widget this way we can create a cpp version in the widget module and` +**MobiusCore/Public/EnumsAndStructs/AgentMeshViewer.h** +- Line 28: `//TODO: // Add more properties as needed, such as direction, health, etc.` +**HIT_ThesisWork/Private/ExperimentScorer.cpp** +- Line 209: `Result = FFileHelper::SaveStringToFile(FString("Test Data"), *CSVFilePath);//TODO: Replace "Test Data" with the actual data and look at my other code for how to format the data and add more complexity` +- Line 345: `bColourDeficiencyOverrided = false; // TODO: change to true once images for thesis done` +**HIT_ThesisWork/Public/ExperimentScorer.h** +- Line 285: `const int32 SimulationLimit = 5;// TODO: change this if recruitment increases` +**ProjectMobius/Private/MassAI/MassObserverProcessor/Representation/AgentRepresentation_MOP.cpp** +- Line 155: `//TODO: need to do index size and offset check here` +- Line 168: `// TODO: this check will always fail on data swap as the frags are reset so sizes will be 0 like the offset` +- Line 252: `// TODO(§4): confirm this handle name once the chair emitter is actually added to both Niagara` +**ProjectMobius/Private/MassAI/MassObserverProcessor/PedestrianInitializeMOP.cpp** +- Line 202: `//TODO: This is a poor assumption and should really be searching and checking` +- Line 347: `//TODO: MOVE INTO OWN OBSERVOR` +**ProjectMobius/Private/MassAI/SignalProcessors/EnableCollisionSignalProcessor.cpp** +- Line 34: `//TODO: will want to break this into two different signal processors, one for enabling collisions and one for disabling collisions -> this way the disable logic can be more complex and handle the disa` +**ProjectMobius/Private/MassAI/SubSystems/AgentDataSubsystem.cpp** +- Line 115: `//TODO: optimize this so that the file path is not hardcoded and we only perform this operation once` +- Line 173: `//TODO: this is a temp fix but we need to find a better way to update loading text from this subsystems` +- Line 296: `else // no valid age demographic found -> TODO: for now just set it to adult but need to think on how we want to handle this` +- Line 900: `* @note TODO: Some agents appear to be moving but have 0 speed calculated. Investigate where` +- Line 957: `Subsys->ProgressQueue.Enqueue(0.0f);// TODO: NEED to broadcast new load text here` +- Line 1149: `// TODO: this has no way to know progress of loading file at the moment so we need to think on how to do this better` +**ProjectMobius/Private/MassAI/SubSystems/MassEntitySpawnSubsystem.cpp** +- Line 120: `//TODO: add a bool to check if the archetype has been created and if so, don't create it again` +- Line 179: `//TODO: We dont want to simulate time till this is done, also we need a better way to build shared fragment and update the archetype on data changes` +**ProjectMobius/Private/MassAI/SubSystems/MassRepresentation/MRS_RepresentationSubsystem.cpp** +- Line 260: `// TODO: no separate gender logic yet` +- Line 578: `// TODO: refactor this method` +- Line 599: `//TODO: at the moment this method will be fine` +**ProjectMobius/Private/MassAI/MassProcessor/PedestrianMovementProcessor.cpp** +- Line 171: `// TODO: This processor needs breaking up into smaller processors as it is doing too much at once` +- Line 196: `//TODO: Move data to subsystem and get it from there so not constantly getting large data sets` +- Line 413: `//TODO: ****** when destroying respawning back this should only be called when needed not every execute ******` +- Line 494: `// TODO: This one should be at the start to only check once per call not per loop iteration per call` +**ProjectMobius/Private/MassAI/MassProcessor/Representation/NiagaraAgentRepProcessor.cpp** +- Line 122: `//TODO: Make flag for this so no constant gets etc` +- Line 127: `// Get the agent representation actor //TODO: this works but it could be better` +- Line 150: `//TODO: need to look at mass ai signals and how to use them -> this should be the equivalent to delegates and events -> and the reloading the shared fragments should only occur then` +- Line 158: `//TODO: this check does not work at all, it never returns true despite data changes!!` +- Line 347: `// Half of the former TODO here is now done: a failed agent's mesh is hidden (bHiddenByTenabilityFailure` +- Line 548: `//TODO: FIX THIS - when going low spec to high the animations remain paused and only resume when we pause and unpause` +**ProjectMobius/Private/MassAI/MassProcessor/Representation/DisplayAgentUIStatsProcessor.cpp** +- Line 207: `//TODO: Moving away from the agent mesh viewer, we will need to update this to use the new system ->once we have collisions` +**ProjectMobius/Private/MassAI/MassProcessor/Representation/AgentHeatmapProcessor.cpp** +- Line 151: `// TODO: Getting mallocs and realloc collisions with parallel -> maybe need to look at null check or something` +- Line 448: `// TODO: this loop is not parallelized, implement ParallelFor for performance and a threadsafe container for HeatmapLocations for simplicity` +**ProjectMobius/Private/MassAI/MassProcessor/Analytics/FlowCounterProcessor.cpp** +- Line 63: `//TODO: check if paused -> don't want to keep executing if not needed` +**ProjectMobius/Private/MassAI/MassProcessor/Collisions/PedestrianCollisionProcessor.cpp** +- Line 47: `//TODO: add tag for when we do toggle logic if we want to toggle the collision processor on and off` +- Line 74: `//TODO: We have two methods that rely on the agent subsystem we should assign it to a variable and use it` +- Line 101: `//TODO: below the query needs to be optimized so its scalable - current implementation is not scalable and is a hack together prototype` +- Line 120: `//TODO: We have two methods that rely on the agent subsystem we should assign it to a variable and use it` +- Line 252: `if (EntityCollision.Capsule.Get() == HoveredCapsuleComponent)//TODO: DOUBLE CLICK ` +**ProjectMobius/Private/Controller/MobiusController.cpp** +- Line 515: `// TODO: Current implementation is a placeholder and will load the file each time and then pick a random transform` +**ProjectMobius/Private/Widgets/Simulation/SimulationPlayBar.cpp** +- Line 352: `//TODO: THIS NEEDS TO BE FIXED - currently only works when sim is paused first then dragged and unpaused not live adjust(somewhere is updating to previous value after new value)` +- Line 396: `// Round current step to the nearest step size - TODO: this ` +- Line 519: `// TODO: look into UWidgetUtilHelpers for this functionality and see if its better or useable` +**ProjectMobius/Private/Widgets/Simulation/TimeDilationWidget.cpp** +- Line 59: `//TODO: change to FTEXT so we can format the text better and have it localized` +**ProjectMobius/Private/BRisk/BRiskDataSubsystem.cpp** +- Line 596: `// TODO(b-risk geometry toggle / mobius builder): the OFF path below reloads the imported building` +**ProjectMobius/Public/MassAI/SubSystems/AgentDataSubsystem.h** +- Line 349: `* @warning TODO: Some agents appear to be moving but have 0 speed calculated.` +**ProjectMobius/Public/MassAI/SubSystems/MassRepresentation/MRS_RepresentationSubsystem.h** +- Line 63: `static const FVatMovementFrames AvatarGaitSpeedBands[] = { // TODO: need more, narrower bands: fastShuffle, VerySlowWalk etc.` +- Line 169: `* @param[float] AgentMaxSpeed The agents max speed TODO: this is a quick fix to create variations in agent movement speeds` +- Line 213: `//TODO: while still using bool on avatar choice in frag use this method to convert current setting to a bool` +**ProjectMobius/Public/MassAI/SubSystems/MassEntitySpawnSubsystem.h** +- Line 134: `void BuildPedestrianRepresentationFragmentData(); // TODO: add inputs to allow for customisation of the pedestrian representation currently hardcoded values` +**ProjectMobius/Public/MassAI/MassProcessor/Representation/AgentHeatmapProcessor.h** +- Line 118: `/** Subsystem for heatmaps -- TODO: move this to its own processor */` +- Line 215: `UE::TConsumeAllMpmcQueue LocationQueue; //TODO: Need to handle garbage collection of this queue` +**ProjectMobius/Public/MassAI/MassProcessor/PedestrianMovementProcessor.h** +- Line 109: `* TODO: This will be eventually replaced to be a lookup method but for now simple check` +**ProjectMobius/Public/MassAI/Fragments/EntityInfoFragment.h** +- Line 218: `uint8 showPedestrianStats = 0;// 0 = don't show, 1 = show, TODO: 2 = show and highlight` +- Line 288: `struct PROJECTMOBIUS_API FEntityCollisionFragment: public FMassFragment //TODO: this may want to be a FObjectWrapperFragment ?? TBD` +**ProjectMobius/Public/MassAI/Fragments/SharedFragments/SimulationFragment.h** +- Line 121: `// TODO: Add buffer method and not store all data in this struct` +- Line 122: `// TODO: This Map logic needs improving as it is not efficient with large data sets and looping over all data is poor` +**ProjectMobius/Public/MassAI/Fragments/SharedFragments/RepresentationFragments/AgentRepresentationFragment.h** +- Line 90: `int32 NumberOfChildren = 0;// TODO: Maybe do different genders` +- Line 99: `//TODO: currently use bool to switch between low spec static effect and med VAT effect -> when we use enum we will use it here too` +- Line 142: `int32 NumberOfChildren = 0;// TODO: Maybe do different genders` +- Line 154: `//TODO: currently use bool to switch between low spec static effect and med VAT effect -> when we use enum we will use it here too` +**ProjectMobius/Public/MassAI/Fragments/SharedFragments/RepresentationFragments/AgentNiagaraDataFrag.h** +- Line 53: `TArray MaleAdultAnimationStates; // TODO: likely when we bring dif age brackets we want all of them to be in one array` +- Line 77: `TArray FemaleAdultAnimationStates; // TODO: likely when we bring dif age brackets we want all of them to be in one array` +**ProjectMobius/Public/Widgets/Simulation/SimulationPlayBar.h** +- Line 108: `* Decrement the current playback by 0.1 seconds - TODO: see whether its better to do by a timestep or by a fixed value` +**ProjectMobius/Public/Widgets/Simulation/TimeDilationWidget.h** +- Line 76: `//TODO: Change UTextblocks to RichTextBlocks for better formatting and styling`