feat(hud): F3 debug overlay — FPS, frame time, worst frame, state
A top-left readout for performance work: smoothed FPS and frame time, the worst frame in a rolling two-second window, the active view, player speed, a frame counter and the player's position in metres from the project origin. - F3 toggles it, through the console variable gigline.Debug so a packaged build can be checked without a rebuild (IA_ToggleDebug). - On automatically for -perf and -qaselftest, so a performance capture never depends on pressing a key first; off in the built demo, because a player should not see an FPS counter over Hollywood Boulevard. - The first two seconds are a warm-up window excluded from the worst-frame figure. Without it the readout showed "worst 400 ms" for a healthy run: the startup shader and streaming hitches dominated the rolling maximum. Measured cost on the self-test route at 1440p: 2.64 to 2.77 ms average, about 5 %, still 6x the floor. The release-check number stays the overlay-off run; the overlay-on series is committed beside it as Docs/perf/0.2.0-walk-frametimes-overlay.csv. Docs: controls (F3 row, overlay section, switch table), release checks (cost row), architecture building block view (HUD and input list).
This commit is contained in:
1 parent
12272d6b96
commit
bc2e9c3b8e
12 files changed
+904
-8
No files matched your search
@@ -42,6 +42,9 @@ protected:
|
||||
void TogglePause();
|
||||
|
||||
public:
|
||||
/** True while the third-person rig is the active view (for the debug overlay). */
|
||||
bool IsThirdPerson() const { return bThirdPerson; }
|
||||
|
||||
/** Review harness: hold or release forward input from the screenshot actor. */
|
||||
void SetReviewWalk(bool bEnable);
|
||||
|
||||
@@ -172,6 +175,13 @@ protected:
|
||||
/** Applies the `-walk` forward input when the flag is set and the pawn is grounded. */
|
||||
void WalkForever();
|
||||
|
||||
/** Debug-overlay action (F3). */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input")
|
||||
TObjectPtr<UInputAction> ToggleDebugAction;
|
||||
|
||||
/** Flips the gigline.Debug console variable that the HUD reads. */
|
||||
void ToggleDebugOverlay();
|
||||
|
||||
/** Toggle-camera action (V). */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input")
|
||||
TObjectPtr<UInputAction> ToggleCameraAction;
|
||||
|
||||
Reference in new issue
Block a user