47#include <entt/entt.hpp>
54#include <unordered_map>
55#include <unordered_set>
75 SDL_AppResult
event(SDL_Event*
event)
override;
110 SDL_AppResult
iterate()
override;
125 void quit()
override;
152 std::uint32_t snapshotTick,
const std::uint8_t* bytes, Uint32 size, Uint64 captureNs, std::uint32_t& ackedTick);
232 std::optional<entt::entity>
Catalog of ozz animation clips shared across all animated entities.
ImGui panel for driving the animation state machine in development.
Borrowed dependencies shared by client screens.
Static asset loading and render-default metadata.
Central registry mapping named assets to renderer model indices.
Shared skinned-character rig: skeleton, bind-pose mesh, skin weights.
Low-overhead client frame profiler that records play sessions to CSV.
TCP client for connecting to the game server.
Live ECS inspector overlay and debug windows powered by Dear ImGui.
Per-frame state recorder for diagnosing camera jitter and position glitches.
AAA-style controller aim assist — applied after runGamepadLook.
Skeleton-driven hitbox types: body regions, capsule definitions, damage profiles, and per-entity runt...
HudPopupKind
Visual category for generic transient HUD popup messages.
Definition HudTypes.hpp:109
Top-level HUD system — owns widgets, renderer, context, tweens.
Abstract interface for top-level application screens (lobby, in-game).
Load collision geometry (and optionally visual data) from a map GLB file.
Shared definitions for match status and state synchronization between server and clients.
MatchPhase
Definition MatchStatus.hpp:8
@ LOBBY
Pre-match lobby phase; players are not yet spawned in-world.
Definition MatchStatus.hpp:9
Work-in-progress SDL3 GPU renderer.
Top-level particle system orchestrator owning all effect sub-systems.
Server-only locomotion bookkeeping (timers, blacklists, lurch state).
Visible / replicated half of the player locomotion state.
World-space position component for ECS entities.
Final scoreboard snapshot shown after a match ends.
Previous-tick position component for render interpolation.
Serialize and deserialize the entt ECS registry for network replication.
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
Client-side sound effects system.
Pluggable skinning interface — phase-1 CPU LBS; GPU backend slots in later.
Linear velocity component for ECS entities.
Per-weapon viewmodel, third-person, and recoil tuning parameters (header-only).
Client-side push-to-talk voice capture, decode, jitter, and spatial playback.
constexpr std::size_t kRenderableWeaponTypeCount
Definition WeaponState.hpp:24
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:12
@ Rifle
Fast hitscan/projectile (R301-style capsule tracer).
Definition WeaponState.hpp:13
Tiny persistent thread pool for parallel-for over short job ranges.
Collection of animation clips loaded on top of a shared skeleton.
Definition AnimationLibrary.hpp:75
Central asset registry — maps names to renderer model indices.
Definition AssetRegistry.hpp:50
Shared skinned rig — skeleton + bind-pose meshes + joint map.
Definition CharacterRig.hpp:45
Session recorder enabled by GROUP2_CLIENT_PERF=1.
Definition ClientPerfRecorder.hpp:177
TCP stream client — sends input to the server and receives state updates.
Definition Client.hpp:69
CPU Linear Blend Skinning — pure function; no state between calls.
Definition SkinningBackend.hpp:37
Forward-declared to avoid pulling in heavy particle headers.
Definition DebugUI.hpp:44
Records per-frame state to a timestamped directory on disk.
Definition FrameRecorder.hpp:56
Top-level client game object.
Definition Game.hpp:63
bool initDebugUI(const AppContext &ctx)
Create the Game-owned ImGui context before App initialises the renderer backend.
Definition Game.cpp:720
int heGrenadeModelIdx_
Definition Game.hpp:385
void clearPredictedStateHistory() noexcept
Definition Game.cpp:749
void quit() override
Shut down all subsystems in reverse-init order.
Definition Game.cpp:6927
std::vector< HudVoiceSpeaker > voiceSpeakers_
Definition Game.hpp:505
int handMountDebugMarkerModelIdx_
Definition Game.hpp:381
float vmScale
Weapon model scale (model is in mm).
Definition Game.hpp:514
entt::dispatcher dispatcher
Event bus for weapon/impact/explosion events.
Definition Game.hpp:237
WeaponType currentEquippedType_
Cached each frame.
Definition Game.hpp:413
float cameraRecoilYaw_
Definition Game.hpp:550
BindingDevice lastInputDevice_
Last input device the player actually used, for HUD glyph selection.
Definition Game.hpp:288
systems::GamepadAimAssistState aimAssistState_
Persistent inter-frame state for aim assist (anchor on target AABB + previous-frame snapshot used to ...
Definition Game.hpp:307
float swayOffsetY_
Current vertical sway (up axis).
Definition Game.hpp:527
bool wasChargingRailgun_
True last frame if local player was charging RailGun.
Definition Game.hpp:418
WeaponSpawnerModelParams spawnerWeaponParams_[kRenderableWeaponTypeCount]
Runtime-tunable copy; initialised from spawner defaults.
Definition Game.hpp:653
int localEmote_
Active local emote index (EmoteCatalog), or -1.
Definition Game.hpp:355
std::optional< PredictedPlayerState > captureLocalPredictedState() const
Definition Game.cpp:755
float fpsHistory[k_fpsHistorySize]
Circular buffer of per-frame FPS samples.
Definition Game.hpp:688
std::string killcamKillerName_
Killer's display nickname (for the HUD label).
Definition Game.hpp:367
float gamepadLookSensitivity
Right-stick look speed in radians per second at full deflection.
Definition Game.hpp:293
std::vector< ClientPerfFrame > benchFrameStats_
Per-frame phase-time breakdown.
Definition Game.hpp:718
float sphereFollowDist_
Distance ahead of player.
Definition Game.hpp:402
std::unordered_map< entt::entity, std::array< float, 5 > > footstepPhases_
Definition Game.hpp:426
bool renderSeparateFromPhysics
Render every iterate() with interpolation (true) vs only after a physics tick (false).
Definition Game.hpp:325
bool chatOpen_
Definition Game.hpp:508
CharacterRig charRig_
Shared skinned rig (skeleton + bind pose + weights).
Definition Game.hpp:659
void refreshRemoteProjectileRenderables()
Assign Renderable components to newly spawned projectile entities.
Definition Game.cpp:7034
int accumTotal_
Running damage total.
Definition Game.hpp:461
Uint64 prevTime
SDL performance counter at the last iterate() call.
Definition Game.hpp:239
InputRingBuffer inputRing_
Phase 5b: ring buffer of recent stamped inputs for replay- based reconciliation.
Definition Game.hpp:265
glm::vec3 cachedCamFwd_
Definition Game.hpp:347
int stickyGrenadeModelIdx_
Definition Game.hpp:386
int viewmodelLeftHandModelIdx_
Definition Game.hpp:379
UserSettings * userSettings
Borrowed user settings owned by App.
Definition Game.hpp:229
AnimationTesterState animUI_
Persistent state for the Animation Tester panel.
Definition Game.hpp:675
SDL_Gamepad * activeGamepad_
Currently-bound gamepad, or nullptr if none is plugged in.
Definition Game.hpp:280
void submitChat()
Send the current chat draft to the server and close the chat box.
Definition Game.cpp:1760
float grenadeThrowDownwardOffset_
Downward offset for the grenade-throw animation.
Definition Game.hpp:590
float benchSeconds_
Bench duration in seconds (0 = disabled).
Definition Game.hpp:710
void appendLocalChatMessage(std::string_view message)
Queue a locally-authored chat echo while waiting for server replication.
Definition Game.cpp:1801
void restoreLocalPredictedState(const PredictedPlayerState &state)
Definition Game.cpp:804
std::array< WeaponHoldPose, kRenderableWeaponTypeCount > authoredWeaponHoldPoses_
Compile-time defaults.
Definition Game.hpp:606
HandMountDebugTarget handMountDebugTarget_
Definition Game.hpp:649
float hitmarkerTimer_
Remaining display time (fades out over this).
Definition Game.hpp:445
float killcamYaw_
Smoothed killcam yaw (radians).
Definition Game.hpp:362
SDL_AppResult event(SDL_Event *event) override
Forward an SDL event to ImGui and handle application-level keys.
Definition Game.cpp:1875
Hud hud_
In-game HUD overlay system.
Definition Game.hpp:236
void appendPopupMessage(HudPopupKind kind, std::string_view message)
Queue a generic transient HUD popup message.
Definition Game.cpp:1816
float compensationCreditPitch_
Definition Game.hpp:583
glm::vec3 killcamEye_
Eye position locked at the moment of death.
Definition Game.hpp:361
float swayAmplitudeYaw_
Definition Game.hpp:531
int fpHandMountTuneWeaponIdx_
Which weapon type is being tuned.
Definition Game.hpp:619
uint32_t clientPredictTick
Monotonic per-tick counter stamped onto outgoing InputSnapshots.
Definition Game.hpp:249
Uint64 softLimitNextFrame
Performance counter target for next frame deadline.
Definition Game.hpp:335
float flashlightRange_
Flashlight attenuation range.
Definition Game.hpp:399
std::array< WeaponHoldPose, kRenderableWeaponTypeCount > weaponHoldPoses_
Runtime, live-tuned.
Definition Game.hpp:605
float vmYawOffset
Extra yaw (degrees) applied to the model before camera orient.
Definition Game.hpp:518
std::vector< float > benchFrameTimesMs_
Per-frame ms after warmup; reservation in init().
Definition Game.hpp:714
HitboxRig clientHitboxRig_
Hitbox definitions for client-side debug visualization.
Definition Game.hpp:676
float measuredPhysicsHz
Computed physics rate (Hz).
Definition Game.hpp:700
int rocketProjectileModelIdx_
Definition Game.hpp:383
bool beamEnabled_
Show the bloom beam.
Definition Game.hpp:405
std::vector< PendingDamageNumber > pendingDamageNumbers_
Definition Game.hpp:457
void openChat()
Enter chat input mode and release normal gameplay input capture.
Definition Game.cpp:1740
HudShotgunBlast shotgunPelletAccum_
In-flight accumulator (resets when 9 pellets received).
Definition Game.hpp:470
float cameraRecoilPitchVel_
Spring velocity (rad/s).
Definition Game.hpp:551
bool consumeReturnToMainMenu()
True if the user requested leaving the match for the main menu, then clear that request.
Definition Game.cpp:6871
void refreshRemoteHealthPackRenderables()
Assign or update Renderable components for replicated health pack spawner entities.
Definition Game.cpp:7181
bool showFPHandMountUI_
Show the FP Arm Tweaker window.
Definition Game.hpp:620
Uint64 statsPrevTime
Perf counter at the last stats snapshot.
Definition Game.hpp:697
bool inputSyncedWithPhysics
Sample mouse once per physics tick (true) vs every iterate() call (false).
Definition Game.hpp:327
VoiceChatSystem voiceChat_
Push-to-talk Opus proximity voice chat.
Definition Game.hpp:235
bool returnToLobbyRequested
Latched true when server sends MATCH_STATE with phase == LOBBY.
Definition Game.hpp:761
static constexpr float k_benchWarmupSeconds
Skip the first N seconds (pipeline warmup).
Definition Game.hpp:713
SDL_JoystickID activeGamepadId_
SDL_JoystickID of the active gamepad — needed to identify the device on SDL_EVENT_GAMEPAD_REMOVED so ...
Definition Game.hpp:284
bool flashlightEnabled_
Point light at camera position.
Definition Game.hpp:397
bool benchActive_
True after BENCH_SECONDS read at init.
Definition Game.hpp:712
float swayAmplitudePitch_
Definition Game.hpp:532
glm::vec3 beamStartOff_
Beam start offset (fwd, up, right) from eye.
Definition Game.hpp:406
float statsFPSCurrent
Average render FPS over the last stats window (actual frames / elapsed time).
Definition Game.hpp:701
std::vector< KillFeedEvent > killFeed
Recent kill events for on-screen kill feed (newest first).
Definition Game.hpp:766
Registry registry
The shared ECS registry.
Definition Game.hpp:226
bool showWeaponHoldUI_
Show the Weapon Hold tweaker window.
Definition Game.hpp:612
ReconciliationDecision evaluateReconciliationSkip(const PredictedPlayerState &authoritative, const PredictedPlayerState *predictedAtAck, const std::optional< PredictedPlayerState > ¤tBeforeSnapshot) const noexcept
Definition Game.cpp:821
glm::vec3 beamEndOff_
Beam end offset (fwd, up, right) from eye.
Definition Game.hpp:407
float sphereIntensity_
Point light intensity of movable sphere.
Definition Game.hpp:403
float vmDown
Downward offset from eye.
Definition Game.hpp:517
bool killcamActive_
True this frame while the killcam is driving the camera.
Definition Game.hpp:360
int medkitModelIdx_
Definition Game.hpp:388
bool showViewmodelUI
Show the Viewmodel Tweaker window.
Definition Game.hpp:521
std::array< std::string, kRenderableWeaponTypeCount > weaponHoldPosePaths_
Source TOML path each.
Definition Game.hpp:607
bool holdShowDebugMarker_
Render the spine-anchor axis marker when the tweaker is open.
Definition Game.hpp:611
float lastSnapPitchAfterCommit_
snap.pitch saved at end of last spring tick — diff against
Definition Game.hpp:573
void storePredictedPlayerState(std::uint32_t tick)
Definition Game.cpp:785
const PredictedPlayerState * predictedStateForTick(std::uint32_t tick) const noexcept
Definition Game.cpp:795
bool showMenuThemeUI_
Show the Menu Theme Tweaker panel.
Definition Game.hpp:396
float statsFPSMax
Maximum FPS in the ring buffer.
Definition Game.hpp:703
glm::vec3 cachedMuzzleWorld_
Definition Game.hpp:771
int weaponAssetIds_[kRenderableWeaponTypeCount]
Definition Game.hpp:378
std::string_view userSettingsPath_
Borrowed save path for user settings.
Definition Game.hpp:230
std::unique_ptr< WorkerPool > workerPool_
Persistent thread pool for parallel-for over per-frame loops (currently the animation update; future:...
Definition Game.hpp:316
float currentCameraRoll_
Smoothed camera roll angle (radians).
Definition Game.hpp:349
float committedRecoilYaw_
Each frame we commit (current - committed) and update.
Definition Game.hpp:556
void onWeaponFired(const struct WeaponFiredEvent &evt)
Dispatcher subscriber: when ANY player fires a shot, push a per-weapon-class additive pitch impulse o...
Definition Game.cpp:7283
std::vector< TransientVfxLight > transientVfxLights_
Definition Game.hpp:808
HandMountDebugSpace
Definition Game.hpp:623
@ FirstPerson
Definition Game.hpp:626
@ None
Definition Game.hpp:624
@ ThirdPerson
Definition Game.hpp:625
bool showDynLightUI_
Show the Dynamic Lighting panel.
Definition Game.hpp:393
bool cachedGravFlipped_
Local player gravity-flip state, updated each iterate().
Definition Game.hpp:348
bool serverShutdownNoticeRequested_
Latched true when leaving because the server connection closed.
Definition Game.hpp:763
static constexpr int k_maxTicksPerFrame
Spiral-of-death guard: max physics ticks per iterate().
Definition Game.hpp:220
int shotgunPelletAccumCount_
Pellets received for the current in-flight blast.
Definition Game.hpp:471
float cameraRecoilPitch_
Spring current offset (radians; negative = looking up).
Definition Game.hpp:549
std::vector< HudPopupMessage > pendingPopupMessages_
Generic popup notifications queued for the next HUD frame.
Definition Game.hpp:503
float flashlightIntensity_
Flashlight brightness.
Definition Game.hpp:398
void spawnExplosionFlashLight(const glm::vec3 &pos, WeaponType weaponType, float radius)
Spawn a transient explosion point light at pos.
Definition Game.cpp:2294
float vmRight
Right offset from eye.
Definition Game.hpp:516
ParticleSystem particleSystem
Client-side VFX particle system.
Definition Game.hpp:234
glm::vec3 cachedEye_
Definition Game.hpp:346
float mouseSensitivity
Radians per pixel of mouse movement.
Definition Game.hpp:323
float damagePowerupHudDuration_
Definition Game.hpp:497
float prevSwayYaw_
Definition Game.hpp:524
float damagePowerupHudTimer_
Client-side countdown for the local damage powerup HUD frame effect.
Definition Game.hpp:496
systems::GamepadAimAssistConfig aimAssistCfg_
AAA-style gamepad aim assist tuning.
Definition Game.hpp:301
int weaponModelIndices_[kRenderableWeaponTypeCount]
Definition Game.hpp:377
int damagePowerupModelIdx_
Definition Game.hpp:390
void appendChatMessage(ClientId sender, std::string_view message)
Queue a replicated chat message for HUD display.
Definition Game.cpp:1773
float compensationCreditDecay_
Credit decay rate (1/s); stale credit fades.
Definition Game.hpp:586
float matchElapsedSeconds_
Time accumulated while the match is in PLAYING phase (s).
Definition Game.hpp:483
bool consumeServerShutdownNotice()
True if the main-menu return was caused by the server connection closing, then clear that reason.
Definition Game.cpp:6880
int rightHandJointIdx_
Cached "mixamorig:RightHand" joint index (-1 = not present).
Definition Game.hpp:660
float compensationCreditYaw_
Definition Game.hpp:584
entt::entity killcamKillerEntity_
Killer entity (drives the chams pass), or null.
Definition Game.hpp:366
float recoilIdleTime_
Definition Game.hpp:595
static constexpr int k_physicsHz
Target physics tick rate.
Definition Game.hpp:210
std::array< std::filesystem::file_time_type, kRenderableWeaponTypeCount > weaponHoldPoseMTimes_
Definition Game.hpp:608
int fpsHistoryHead
Next write index.
Definition Game.hpp:689
float beamRadius_
Beam cylinder radius.
Definition Game.hpp:408
float flashlightOffset_
Forward offset from eye.
Definition Game.hpp:400
float prevArmor_
Definition Game.hpp:477
float cameraRecoilYawVel_
Definition Game.hpp:552
float holdPoseReloadAccumulator_
Seconds since last hot-reload mtime poll (~4 Hz throttle).
Definition Game.hpp:609
FrameRecorder recorder
R-key toggled frame-state + screenshot recorder.
Definition Game.hpp:342
float cameraRecoilTargetYaw_
Definition Game.hpp:554
bool prevShootingForDebug_
PR-20: tracks last frame's input.shooting so the fire-rising-edge detector inside iterate() only capt...
Definition Game.hpp:259
float swaySmoothing_
Input smoothing (0..1, lower = smoother).
Definition Game.hpp:534
float vmPitchOffset
Extra pitch (degrees).
Definition Game.hpp:519
float compensationCreditCap_
Max banked credit (rad). ~5.7° per axis.
Definition Game.hpp:585
std::unordered_map< entt::entity, PlayerSfxState > playerSfxState_
Definition Game.hpp:442
void clearGameplayInputForChat()
Clear held gameplay actions so typing chat cannot leak into movement or weapons.
Definition Game.cpp:1824
glm::vec3 killcamKillerCenter_
Killer AABB center (world) for the HUD label.
Definition Game.hpp:364
void updateCachedPostMatchResult()
Refresh the final post-match scoreboard snapshot while FINISHED stats are still replicated.
Definition Game.cpp:6889
float swayOffsetX_
Current horizontal sway (right axis, Quake units).
Definition Game.hpp:526
AnimationLibrary animLibrary_
Collection of ozz clips on the shared rig.
Definition Game.hpp:673
Uint64 benchStartTime_
Perf counter at first iterate() in bench mode.
Definition Game.hpp:711
float kRigVerticalOffset_
Per-renderable Y translation for animated characters (auto-calculated, tunable).
Definition Game.hpp:678
float killcamPitch_
Smoothed killcam pitch (radians).
Definition Game.hpp:363
ClientPerfRecorder perfRecorder_
Definition Game.hpp:719
bool localWasDead_
Local player's dead state last frame — used to detect the dead→alive (respawn) edge and snap the view...
Definition Game.hpp:320
float perfSnapshotApplyMs_
Definition Game.hpp:720
float shotgunPelletLastTimeSec_
Game-time of the last pellet (for stale-reset).
Definition Game.hpp:472
bool showWeaponSpawnerModelUI_
Show the Weapon Spawner Model Tweaker window.
Definition Game.hpp:655
WeaponType lastEquippedType_
Previous frame's weapon — triggers default reload on change.
Definition Game.hpp:414
bool showHdrDebugUI_
Show the HDR / tonemap debug panel.
Definition Game.hpp:394
static constexpr int k_fpsHistorySize
Samples in the rolling FPS ring buffer.
Definition Game.hpp:221
bool movableSphereEnabled_
Glow sphere following the player.
Definition Game.hpp:401
std::deque< std::string > pendingLocalChatEchoes_
Definition Game.hpp:507
bool tpFreezeAnimations_
Debug: freeze every animator's playback while tuning.
Definition Game.hpp:602
std::vector< HudPickupNotification > pendingPickupNotifications_
Pickup notifications queued for the next HUD frame.
Definition Game.hpp:493
int statsRenderFrames
Rendered frames accumulated since last snapshot.
Definition Game.hpp:699
SfxSystem * sfxSystem
Borrowed audio system owned by App.
Definition Game.hpp:228
void shutdownAfterRenderer() override
Destroy the Game-owned ImGui context after App shuts down the renderer backend.
Definition Game.cpp:6969
std::optional< entt::entity > mappedLocalPlayerEntity_
Local-registry entity for this client's player, once assigned.
Definition Game.hpp:233
float vmForward
Forward offset from eye (Quake units).
Definition Game.hpp:515
float kRigScale_
Per-renderable scale for animated characters (auto-calculated, tunable).
Definition Game.hpp:677
glm::vec3 muzzleFlashLightPosition(const glm::vec3 &muzzleOrigin) const
Offset a muzzle point to the actual transient point-light position.
Definition Game.cpp:2249
bool cachedMuzzleValid_
Definition Game.hpp:772
float vmRollOffset
Extra roll (degrees).
Definition Game.hpp:520
Uint64 softLimitPeriod
Target frame period in perf-counter ticks (0 = disabled).
Definition Game.hpp:334
std::optional< PostMatchResult > consumePostMatchResult()
Return the final scoreboard snapshot captured before the server reset match stats.
Definition Game.cpp:6861
void refreshRemotePlayerRenderables()
Update Renderable components for remote players (model, scale, orientation from animation rig).
Definition Game.cpp:6979
int statsPhysTicks
Physics ticks accumulated since last snapshot.
Definition Game.hpp:698
void spawnMuzzleFlashLight(const glm::vec3 &pos, WeaponType weaponType)
Spawn a transient muzzle-flash point light at pos.
Definition Game.cpp:2270
float accumResetTimer_
Timer to reset accumulator after inactivity.
Definition Game.hpp:462
int tpTuneWeaponIdx_
Which weapon type the Weapon Hold tweaker is editing.
Definition Game.hpp:601
std::uint32_t perfSnapshotApplyCount_
Definition Game.hpp:721
bool mouseCaptured
True when relative mouse mode is active.
Definition Game.hpp:268
MatchPhase currentMatchPhase
Latest match phase update from the server.
Definition Game.hpp:757
bool shouldReturnToLobby() const
True once the server has returned the match phase to the lobby.
Definition Game.cpp:6856
std::optional< PostMatchResult > cachedPostMatchResult_
Final scoreboard snapshot captured during FINISHED.
Definition Game.hpp:760
float lastSnapYawAfterCommit_
current to recover the player's mouse delta this frame.
Definition Game.hpp:574
int fpsHistoryCount
Valid sample count (saturates at k_fpsHistorySize).
Definition Game.hpp:690
std::string chatDraft_
Definition Game.hpp:506
float cameraRecoilTargetPitch_
Spring target; accumulates per shot, decays only when idle.
Definition Game.hpp:553
void applyFrameRateLimit()
Apply FPS-limit strategy based on limitFPSToMonitor, monitor Hz, and physics Hz.
Definition Game.cpp:2187
int viewmodelRightHandModelIdx_
Definition Game.hpp:380
int molotovModelIdx_
Definition Game.hpp:387
bool viewmodelDefaultsApplied_
Definition Game.hpp:415
float horizontalFovDegrees
Player-facing horizontal camera field of view in degrees.
Definition Game.hpp:324
AssetRegistry assets_
Definition Game.hpp:373
glm::vec3 muzzleFlashLightOffset_
Tunable point-light offset from the muzzle (fwd/up/right).
Definition Game.hpp:794
FirstPersonHandMountParams fpHandMountParams_[kRenderableWeaponTypeCount]
Runtime-tunable copy; initialised from defaults.
Definition Game.hpp:616
physics::MapCollisionData mapCollision_
Definition Game.hpp:370
int prevPrimaryWeaponType_
Last-frame snapshot of the local player's weapon-slot types (-1 = empty).
Definition Game.hpp:488
ThirdPersonWeaponParams tpWeaponParams_[kRenderableWeaponTypeCount]
Runtime-tunable procedural/scale params.
Definition Game.hpp:600
float recoilPitch_
Current recoil pitch offset (degrees).
Definition Game.hpp:537
float committedRecoilPitch_
Portion of cameraRecoilPitch_ already added to snap.pitch.
Definition Game.hpp:555
NewRenderer * renderer
Borrowed renderer owned by App.
Definition Game.hpp:225
bool haveLastSnap_
Becomes true after the first frame the local player exists.
Definition Game.hpp:575
float reloadDownwardOffset_
Downward offset for the reload animation.
Definition Game.hpp:589
void refreshRemotePowerupRenderables()
Assign or update Renderable components for replicated powerup entities.
Definition Game.cpp:7155
bool swayInitialized_
Guard against initial delta spike.
Definition Game.hpp:528
std::array< PredictedPlayerState, InputRingBuffer::k_capacity > predictedStateHistory_
Definition Game.hpp:267
int prevSecondaryWeaponType_
Definition Game.hpp:489
int spine2JointIdx_
Cached "mixamorig:Spine2" joint index.
Definition Game.hpp:661
HudShotgunBlast lastShotgunBlast_
Most recently completed blast (staged for HUD).
Definition Game.hpp:473
glm::vec3 muzzleFlashOrigin(const glm::vec3 &fallback) const
World position to spawn local weapon particles.
Definition Game.cpp:2229
int grenadeModelIdx_
Definition Game.hpp:384
static constexpr float k_physicsDt
Seconds per tick.
Definition Game.hpp:211
std::optional< registry_serialization::Loader > snapshotLoader_
Incremental loader; created on first snapshot.
Definition Game.hpp:231
float recoilRoll_
Current recoil roll offset (degrees).
Definition Game.hpp:539
float pingTimer
Accumulator for periodic PING sends.
Definition Game.hpp:694
int spawnerTuneWeaponIdx_
Which weapon type is being tuned.
Definition Game.hpp:654
float prevHealth_
Definition Game.hpp:476
bool hitmarkerIsHeadshot_
True when the current hitmarker was a headshot.
Definition Game.hpp:446
float holdRotStepDeg_
Delta-rotation step (deg) for the spine-rotation buttons.
Definition Game.hpp:610
void handleLocalPlayerReady(entt::entity local)
Emplace player-control components onto the mapped local entity and record it.
Definition Game.cpp:732
int shieldPowerupModelIdx_
Definition Game.hpp:389
float beamLightSpacing_
Distance between point lights along beam.
Definition Game.hpp:412
float statsFPS1pLow
1st-percentile FPS (1 % low).
Definition Game.hpp:704
glm::vec3 beamColor_
Beam emissive colour (purple).
Definition Game.hpp:409
CpuLbsSkinningBackend skinBackend_
Phase-1 CPU linear-blend-skinning backend.
Definition Game.hpp:674
float cameraRecoilIdleThreshold_
Seconds off-trigger before target starts decaying.
Definition Game.hpp:561
void refreshDroppedWeaponRenderables()
Assign Renderable components to dropped-weapon entities (mirrors spawner visuals).
Definition Game.cpp:7212
float statsFPS5pLow
5th-percentile FPS (5 % low).
Definition Game.hpp:705
float cameraRecoilTargetDecay_
Idle-recovery decay rate (1/s). Higher = faster snap-back.
Definition Game.hpp:560
SDL_Window * window
The application window.
Definition Game.hpp:223
float sphereRange_
Point light range of movable sphere.
Definition Game.hpp:404
bool applyIncomingSnapshot(std::uint32_t snapshotTick, const std::uint8_t *bytes, Uint32 size, Uint64 captureNs, std::uint32_t &ackedTick)
Deserialize a snapshot from the server and update the ECS registry.
Definition Game.cpp:856
float localRecoilHeat_
Definition Game.hpp:594
std::unordered_map< entt::entity, BeamAudioState > beamAudioStates_
Definition Game.hpp:425
float prevSwayPitch_
Definition Game.hpp:525
float statsFPSMin
Minimum FPS in the ring buffer.
Definition Game.hpp:702
entt::entity accumTarget_
Current target being damaged.
Definition Game.hpp:460
float aimAssistParityAccumSec_
Seconds since the last aim-assist parity check log line (Phase F).
Definition Game.hpp:672
SDL_AppResult iterate() override
Advance one frame: sample input, step physics, render.
Definition Game.cpp:2342
bool useRecoilCompensation_
false = Approach A (no restore — aim keeps the view angles the recoil walked it to; player compensate...
Definition Game.hpp:570
float rigMeshMinY_
Minimum Y of the bind-pose mesh vertices (model space).
Definition Game.hpp:680
void closeChat()
Leave chat input mode and restore normal gameplay input capture.
Definition Game.cpp:1750
ClientId currentWinnerId
ClientId of the current match winner, if in POSTMATCH.
Definition Game.hpp:758
bool returnToMainMenuRequested_
Latched true when the pause menu or disconnect requests leaving.
Definition Game.hpp:762
float countdownTimer
Countdown timer for transitions between match phases (e.g. warmup to in-progress).
Definition Game.hpp:759
bool hitmarkerShieldBreak_
True when the current hit depleted target armor.
Definition Game.hpp:447
bool showHudDebug_
Show the HUD Tweaker panel.
Definition Game.hpp:395
float swayDecayRate_
Exponential decay speed.
Definition Game.hpp:533
std::unordered_map< entt::entity, float > footstepCooldowns_
Definition Game.hpp:427
FirstPersonHandMountParams authoredFPHandMountParams_[kRenderableWeaponTypeCount]
Defaults loaded from authored weapon assets.
Definition Game.hpp:618
float beamLightIntensity_
Point light intensity per sample.
Definition Game.hpp:410
HandMountDebugPoint
Definition Game.hpp:630
@ Elbow
Definition Game.hpp:632
@ Palm
Definition Game.hpp:633
@ Shoulder
Definition Game.hpp:631
@ Finger1
Definition Game.hpp:635
@ Finger2
Definition Game.hpp:636
@ Finger4
Definition Game.hpp:638
@ Finger3
Definition Game.hpp:637
@ Finger0
Definition Game.hpp:634
bool cachedRightPalmValid_
Definition Game.hpp:777
uint64_t frameCount
Monotonic render-frame counter.
Definition Game.hpp:343
void refreshRemoteRespawnRenderables()
Reset Renderable visibility for players transitioning through respawn.
Definition Game.cpp:7074
float cameraRecoilOmega_
Spring angular frequency (rad/s). Higher = snappier kick.
Definition Game.hpp:559
uint8_t accumLastHitType_
0=health(white), 1=shield(blue), 2=headshot(gold).
Definition Game.hpp:463
Uint64 prevRenderTime
Perf counter at the last render call.
Definition Game.hpp:691
float recoilPatternScaleMultiplier_
Live multiplier on WeaponConfig.recoilPatternScale.
Definition Game.hpp:557
glm::vec3 scopedRailgunBeamOrigin() const
Camera-relative railgun beam start used while scoped.
Definition Game.cpp:2241
glm::vec3 killcamKillerHalf_
Killer AABB half-extents (world) for the HUD label.
Definition Game.hpp:365
bool useSpringCameraRecoil_
Toggle Apex-spring path vs legacy instant snap-pitch write.
Definition Game.hpp:548
float accumulator
Unprocessed physics time in seconds.
Definition Game.hpp:240
DebugUI debugUI
Owns the ImGui context and SDL3 input backend.
Definition Game.hpp:224
Client * client
Borrowed UDP network client owned by App.
Definition Game.hpp:227
glm::vec3 cachedRightPalmWorld_
Definition Game.hpp:776
PauseMenu pauseMenu
In-game pause menu (opened with ESC, blocks input to the game when active).
Definition Game.hpp:768
float localFireCooldown_
Countdown timer; fire VFX only when <= 0.
Definition Game.hpp:593
float recoilPushBack_
Current recoil backward offset (Quake units).
Definition Game.hpp:538
bool init(AppContext &ctx)
Initialise all subsystems and spawn the local player entity.
Definition Game.cpp:891
float beamLightRange_
Point light range per sample.
Definition Game.hpp:411
std::vector< HudChatMessage > chatMessages_
Definition Game.hpp:504
bool limitFPSToMonitor
VSync on (true) / off (false).
Definition Game.hpp:329
void attachAnimatedCharacter(entt::entity e)
Attach a fresh AnimatedCharacter component to an entity.
Definition Game.cpp:7264
std::unordered_set< entt::entity > dissolveSpawned_
Entities for which a death-dissolve particle burst has already been spawned (so we emit it exactly on...
Definition Game.hpp:685
float emoteCamBlend_
0 = first-person, 1 = third-person emote cam (eased).
Definition Game.hpp:356
void scanForConnectedGamepads()
Open the first already-connected gamepad, if any.
Definition Game.cpp:2327
int pendingScrollSwitch_
+1 = next slot, -1 = previous slot, consumed each frame.
Definition Game.hpp:597
std::unordered_map< entt::entity, GripSwapState > gripSwapState_
Definition Game.hpp:671
void adoptGamepad(SDL_JoystickID id)
Open the gamepad with the given SDL_JoystickID and make it the active controller, but only if none is...
Definition Game.cpp:2215
int tickCount
Total physics ticks elapsed since start.
Definition Game.hpp:241
Top-level HUD system.
Definition Hud.hpp:25
Interface implemented by each full-screen mode (Lobby, Game).
Definition IScreen.hpp:16
Graphics-team's work-in-progress SDL3 GPU renderer.
Definition NewRenderer.hpp:83
Top-level particle system orchestrator.
Definition ParticleSystem.hpp:39
Client-side sound effects system.
Definition SfxSystem.hpp:50
std::uint32_t SourceHandle
Definition SfxSystem.hpp:52
static constexpr SourceHandle kInvalidSource
Definition SfxSystem.hpp:53
Definition VoiceChatSystem.hpp:23
Utilities for serializing and deserializing the ECS registry over the network.
Definition RegistrySerialization.cpp:128
Definition AudioRuntime.hpp:365
constexpr float kDefaultMouseSensitivity
Mouse-look sensitivity in radians per SDL relative mouse unit.
Definition UserSettings.hpp:15
Persistent UI state for the Animation Tester panel.
Definition AnimationTesterUI.hpp:13
Non-owning view of App-owned services and configuration.
Definition AppContext.hpp:20
Associates an entity with a connected network client.
Definition ClientId.hpp:10
Per-weapon first-person shoulder/elbow/palm/finger target data.
Definition ViewmodelConfig.hpp:67
float loopDelaySeconds
Definition Game.hpp:422
bool active
Definition Game.hpp:421
SfxSystem::SourceHandle loopHandle
Definition Game.hpp:423
Per-entity weapon-swap fade state.
Definition Game.hpp:667
float swapElapsedSec
Initialised to "already done" so freshly-seen entities start at full hold.
Definition Game.hpp:669
WeaponType lastType
Definition Game.hpp:668
int weaponIdx
Definition Game.hpp:644
HandMountDebugPoint point
Definition Game.hpp:646
bool left
Definition Game.hpp:645
HandMountDebugSpace space
Definition Game.hpp:643
glm::vec3 pos
Definition Game.hpp:452
float damage
Definition Game.hpp:453
bool headshot
Definition Game.hpp:454
bool shielded
Definition Game.hpp:455
float primaryCooldown
Definition Game.hpp:438
bool grappleActive
Definition Game.hpp:437
SfxSystem::SourceHandle slideLoopHandle
Definition Game.hpp:440
float secondaryCooldown
Definition Game.hpp:439
bool initialized
Definition Game.hpp:432
int moveMode
Definition Game.hpp:435
bool isDead
Definition Game.hpp:434
bool gravityFlipped
Definition Game.hpp:436
bool grounded
Definition Game.hpp:433
InputSnapshot input
Definition Game.hpp:164
Velocity velocity
Definition Game.hpp:161
std::uint32_t tick
Definition Game.hpp:158
bool valid
Definition Game.hpp:165
PlayerVisState vis
Definition Game.hpp:162
Position position
Definition Game.hpp:159
PlayerSimState sim
Definition Game.hpp:163
PreviousPosition previousPosition
Definition Game.hpp:160
float velocityError
Definition Game.hpp:173
bool skip
Definition Game.hpp:170
bool missingHistory
Definition Game.hpp:171
float positionError
Definition Game.hpp:172
float intensity
Peak intensity at spawn (faded by age).
Definition Game.hpp:803
float range
Renderer light attenuation range.
Definition Game.hpp:806
float lifetime
Total flash duration in seconds.
Definition Game.hpp:805
glm::vec3 color
Flash colour (linear RGB).
Definition Game.hpp:802
float age
Seconds elapsed since spawn.
Definition Game.hpp:804
glm::vec3 position
World position at spawn time.
Definition Game.hpp:801
Hitbox rig (shared per character archetype).
Definition Hitbox.hpp:159
A single completed shotgun blast (11 pellets) staged for the HUD widget.
Definition HudTypes.hpp:357
Server-only locomotion bookkeeping.
Definition PlayerSimState.hpp:32
Replicated subset of player locomotion state.
Definition PlayerVisState.hpp:40
World-space position of an entity, in game units.
Definition Position.hpp:10
Copy of Position from the previous physics tick, used for render interpolation.
Definition PreviousPosition.hpp:22
Per-weapon procedural-overlay + scale params for the third-person body.
Definition ViewmodelConfig.hpp:28
Per-user gameplay settings loaded from SDL's pref-path TOML file.
Definition UserSettings.hpp:25
Linear velocity of an entity, in game units per second.
Definition Velocity.hpp:10
Emitted when a weapon fires (both hitscan and projectile).
Definition ParticleEvents.hpp:13
World weapon spawner model params.
Definition ViewmodelConfig.hpp:75
Collision data.
Definition MapLoader.hpp:36
Tunable parameters for gamepad aim assist.
Definition GamepadAimAssistSystem.hpp:71
Per-frame state required to compute the rotational pull as a delta between frames.
Definition GamepadAimAssistSystem.hpp:123