23#include <glm/mat4x4.hpp>
24#include <glm/vec3.hpp>
25#include <initializer_list>
49 bool init(SDL_Window* window);
78 float& mouseSensitivity,
79 float& gamepadLookSensitivity,
81 bool& renderSeparateFromPhysics,
82 bool& inputSyncedWithPhysics,
83 bool& limitFPSToMonitor,
149 const glm::mat4& viewProj,
164 const glm::mat4& viewProj,
222 std::array<ShotDebugPair, k_shotRingMax>
shotRing{};
255 void buildShotDebugUI(
const glm::mat4& viewProj,
float screenWidth,
float screenHeight);
286 void buildDebugMenu(std::initializer_list<ExternalPanel> externalPanels);
329 float& mouseSensitivity,
330 float& gamepadLookSensitivity,
332 bool& renderSeparateFromPhysics,
333 bool& inputSyncedWithPhysics,
334 bool& limitFPSToMonitor,
Skeleton-driven hitbox types: body regions, capsule definitions, damage profiles, and per-entity runt...
Shared definitions for match status and state synchronization between server and clients.
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
Wire-format types for the PR-20 lag-comp shot debug visualizer.
Swept AABB and sphere collision queries against world geometry.
Forward-declared to avoid pulling in heavy particle headers.
Definition DebugUI.hpp:44
bool showCollisionShape
Show CollisionShape half-extents row.
Definition DebugUI.hpp:315
bool drawCollisionSpheres
Definition DebugUI.hpp:262
void toggleDebugMenu()
Toggle the unified debug menu on/off.
Definition DebugUI.cpp:115
void buildMovementChart(const Registry ®istry)
Draw the standalone 2-D overhead movement chart window.
Definition DebugUI.cpp:479
void buildWeaponSpawnerUI(const Registry ®istry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Weapon Spawner Debug window and (optionally) wireframe overlay for all weapon spawner entiti...
Definition DebugUI.cpp:1940
int bhopHistoryFill_
Samples collected so far (up to k_bhopHistorySize).
Definition DebugUI.hpp:362
bool drawHitboxOverlay
Draw 3-D capsule wireframes (independent of window visibility).
Definition DebugUI.hpp:154
void processEvent(const SDL_Event *event)
Forward an SDL event to the ImGui input backend.
Definition DebugUI.cpp:103
bool drawCollisionBrushes
Definition DebugUI.hpp:260
bool drawCollisionBoxes
Definition DebugUI.hpp:259
int shotDebugVisibleCount
Slider value: how many of the most-recent shots to render (1-k_shotRingMax).
Definition DebugUI.hpp:232
bool drawShotDebugOverlay
Definition DebugUI.hpp:228
void buildShotDebugUI(const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Build the Shot Debug ImGui window + 3D overlay.
Definition DebugUI.cpp:2362
void buildSpawnPointUI(const Registry ®istry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Spawn Point Debug window and (optionally) overlay markers for all player respawn point entit...
Definition DebugUI.cpp:2087
bool drawSpawnPointOverlay
Draw spawn point markers (independent of window visibility).
Definition DebugUI.hpp:194
void buildBhopAnalyzer(const Registry ®istry)
Draw the bhop analyzer window.
Definition DebugUI.cpp:661
int shotRingHead
Next-write slot.
Definition DebugUI.hpp:223
bool showLightingControls
Show the Lighting Controls window.
Definition DebugUI.hpp:296
bool pendingAmmoRefill_
Set by Weapon HUD button, consumed by Game::iterate().
Definition DebugUI.hpp:290
bool showWeaponHud
Show the Weapon HUD debug window (disabled by default).
Definition DebugUI.hpp:300
bool showRenderToggles
Show the Render Toggles window.
Definition DebugUI.hpp:295
bool showInputSnapshot
Show InputSnapshot key-state row.
Definition DebugUI.hpp:317
int shotDebugSelectIdx
1-based index into the ring (1 = newest) to highlight.
Definition DebugUI.hpp:235
bool showSpawnPointWindow
Show the Spawn Point Debug ImGui window.
Definition DebugUI.hpp:193
void buildDebugMenu(std::initializer_list< ExternalPanel > externalPanels)
Definition DebugUI.cpp:120
bool showWeaponSpawnerWindow
Show the Weapon Spawner Debug ImGui window.
Definition DebugUI.hpp:181
void newFrame()
Begin a new ImGui frame. Call before any ImGui draw calls.
Definition DebugUI.cpp:108
bool drawCollisionTriMeshes
Definition DebugUI.hpp:263
static constexpr int k_shotRingMax
Definition DebugUI.hpp:221
void buildUI(const Registry ®istry, int tickCount, float &mouseSensitivity, float &gamepadLookSensitivity, systems::GamepadAimAssistConfig &aimAssistCfg, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, int &ssrMode, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
Build the ECS inspector window contents.
Definition DebugUI.cpp:173
void buildNetworkUI(const NetworkStats &stats)
Build the Network Stats window showing ping, bandwidth, and update rate.
Definition DebugUI.cpp:1162
int getSimulatedLossPercent() const noexcept
The current packet-loss setting (0–50 %).
Definition DebugUI.hpp:133
bool bhopHasPrevSample_
Definition DebugUI.hpp:364
bool showNetworkSim
Show the Network Simulator (latency + loss) window.
Definition DebugUI.hpp:299
bool showPosition
Per-component visibility toggles — persistent across frames.
Definition DebugUI.hpp:312
int shotRingCount
Live entries; saturates at k_shotRingMax.
Definition DebugUI.hpp:224
bool showVelocity
Show Velocity component row.
Definition DebugUI.hpp:314
bool showParticleWindow_
Definition DebugUI.hpp:368
int simulatedLatencyMs_
Phase 6 testing: simulated round-trip latency in ms.
Definition DebugUI.hpp:305
bool showViewAngles
Show yaw/pitch/roll in degrees (easier to read than radians).
Definition DebugUI.hpp:318
float bhopGainHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:358
void shutdown()
Destroy the ImGui context and shut down the SDL3 input backend.
Definition DebugUI.cpp:97
void buildNetworkSimUI()
Build the Network Simulator window with sliders to add fake round-trip latency and packet loss.
Definition DebugUI.cpp:1204
int simulatedLossPct_
Phase 6 testing: simulated UDP packet loss in percent.
Definition DebugUI.hpp:309
bool init(SDL_Window *window)
Create the ImGui context and initialise the SDL3 input backend.
Definition DebugUI.cpp:79
void buildWeaponUI(const Registry ®istry)
Definition DebugUI.cpp:1299
void buildInspectorContents(const Registry ®istry, int tickCount, float &mouseSensitivity, float &gamepadLookSensitivity, systems::GamepadAimAssistConfig &aimAssistCfg, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, int &ssrMode, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
Draw the body of the ECS Inspector window (everything after ImGui::Begin).
Definition DebugUI.cpp:230
int bhopHistoryIdx_
Next write slot in the ring buffers.
Definition DebugUI.hpp:361
bool showMovementChart
Show the 2-D overhead movement chart window.
Definition DebugUI.hpp:319
int getSimulatedLatencyMs() const noexcept
The current latency-simulator setting in milliseconds (0–200).
Definition DebugUI.hpp:129
void buildCollisionUI(const physics::WorldGeometry &world, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Collision Debug window and (optionally) wireframe overlay for all world collision primitives...
Definition DebugUI.cpp:1835
bool showHitboxWindow
Show the Hitbox Debug ImGui window.
Definition DebugUI.hpp:153
bool showShotDebugWindow
Show the Shot Debug panel + 3D overlay (CSGO sv_showimpacts).
Definition DebugUI.hpp:227
bool showCollisionWindow
Show the Collision Debug ImGui window.
Definition DebugUI.hpp:168
float bhopPrevHSpeed_
Previous frame's horizontal speed (for gain calc).
Definition DebugUI.hpp:363
bool showNetworkStats
Show the Network Stats window.
Definition DebugUI.hpp:298
bool showBhopAnalyzer
Show the bhop analyzer (player-relative + gain/sync).
Definition DebugUI.hpp:320
bool showDebugMenu
Master toggle for the unified debug menu window.
Definition DebugUI.hpp:288
void render()
Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame().
Definition DebugUI.cpp:2501
bool showSkybox
Show the Skybox window.
Definition DebugUI.hpp:297
void buildHitboxUI(const Registry ®istry, HitboxRig &hitboxRig, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Hitbox Debug window and (optionally) capsule wireframe overlay.
Definition DebugUI.cpp:1516
bool bhopGainingHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:360
std::array< ShotDebugPair, k_shotRingMax > shotRing
Definition DebugUI.hpp:222
void buildRenderTogglesUI(class Renderer &renderer)
Build the Render Toggles window for live performance profiling.
Definition DebugUI.cpp:970
bool drawCollisionCylinders
Definition DebugUI.hpp:261
void pushServerShot(const net::shotdebug::ShotDebugCapture &cap)
Append a server-reported rewind snapshot.
Definition DebugUI.cpp:2347
static constexpr int k_bhopHistorySize
Definition DebugUI.hpp:356
int shotDebugViewMode
Which side(s) to render in the 3D overlay.
Definition DebugUI.hpp:241
void buildLightingUI(class Renderer &renderer)
Build the Lighting Controls window for live parameter tuning.
Definition DebugUI.cpp:1061
float particleSpawnDist_
Units ahead of camera to spawn effects.
Definition DebugUI.hpp:367
bool showInspector
Per-window visibility toggles — persistent across frames.
Definition DebugUI.hpp:294
float bhopSpeedHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:357
void buildSkyboxUI(class Renderer &renderer)
Build the Skybox selector window for live HDR skybox swapping.
Definition DebugUI.cpp:1121
bool bhopAirborneHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:359
bool showPrevPosition
Show PreviousPosition component row.
Definition DebugUI.hpp:313
bool showPlayerState
Show PlayerState flags row.
Definition DebugUI.hpp:316
void buildParticleUI(ParticleSystem &ps, glm::vec3 eyePos, glm::vec3 forward)
Build the Particle System debug/control window.
Definition DebugUI.cpp:866
bool drawCollisionOverlay
Draw world collision wireframes (independent of window visibility).
Definition DebugUI.hpp:169
void pushClientShot(const net::shotdebug::ShotDebugCapture &cap)
Append a fire-time snapshot the local client just took.
Definition DebugUI.cpp:2331
bool drawCollisionPlanes
Definition DebugUI.hpp:258
bool drawWeaponSpawnerOverlay
Draw weapon spawner wireframes (independent of window visibility).
Definition DebugUI.hpp:182
Top-level particle system orchestrator.
Definition ParticleSystem.hpp:35
Forward-declared to avoid circular includes.
Definition Renderer.hpp:35
Client-only input sampling system — split into two halves so mouse look can run every iterate() (smoo...
Definition DebugUI.hpp:15
Build the unified debug menu window.
Definition DebugUI.hpp:282
const char * name
Display name shown as checkbox label.
Definition DebugUI.hpp:283
bool * visible
Pointer to the visibility flag.
Definition DebugUI.hpp:284
Definition DebugUI.hpp:214
net::shotdebug::ShotDebugCapture clientView
Definition DebugUI.hpp:218
std::uint32_t shotInputTick
Definition DebugUI.hpp:215
bool hasServer
Definition DebugUI.hpp:217
net::shotdebug::ShotDebugCapture serverView
Definition DebugUI.hpp:219
bool hasClient
Definition DebugUI.hpp:216
Hitbox rig (shared per character archetype).
Definition Hitbox.hpp:159
Live network statistics updated each frame.
Definition Client.hpp:34
Server-side runtime capture of one shot's debug data, produced by WeaponSystem::handleFire and consum...
Definition ShotDebugReport.hpp:111
All world collision geometry for one tick.
Definition SweptCollision.hpp:100
Tunable parameters for gamepad aim assist.
Definition GamepadAimAssistSystem.hpp:71