|
group2 0.1.0
CSE 125 Group 2
|
Top-level client game object. More...
#include <Game.hpp>
Classes | |
| struct | PredictedPlayerState |
| struct | ReconciliationDecision |
| struct | BeamAudioState |
| struct | PlayerSfxState |
| struct | PendingDamageNumber |
| struct | HandMountDebugTarget |
| struct | GripSwapState |
| Per-entity weapon-swap fade state. More... | |
| struct | TransientVfxLight |
Public Member Functions | |
| bool | initDebugUI (const AppContext &ctx) |
| Create the Game-owned ImGui context before App initialises the renderer backend. | |
| bool | init (AppContext &ctx) |
| Initialise all subsystems and spawn the local player entity. | |
| SDL_AppResult | event (SDL_Event *event) override |
| Forward an SDL event to ImGui and handle application-level keys. | |
| SDL_AppResult | iterate () override |
| Advance one frame: sample input, step physics, render. | |
| bool | shouldReturnToLobby () const |
| True once the server has returned the match phase to the lobby. | |
| std::optional< PostMatchResult > | consumePostMatchResult () |
| Return the final scoreboard snapshot captured before the server reset match stats. | |
| bool | consumeReturnToMainMenu () |
| True if the user requested leaving the match for the main menu, then clear that request. | |
| bool | consumeServerShutdownNotice () |
| True if the main-menu return was caused by the server connection closing, then clear that reason. | |
| void | quit () override |
| Shut down all subsystems in reverse-init order. | |
| void | shutdownAfterRenderer () override |
| Destroy the Game-owned ImGui context after App shuts down the renderer backend. | |
| void | refreshRemotePlayerRenderables () |
| Update Renderable components for remote players (model, scale, orientation from animation rig). | |
| void | refreshRemoteProjectileRenderables () |
| Assign Renderable components to newly spawned projectile entities. | |
| void | refreshRemoteRespawnRenderables () |
| Reset Renderable visibility for players transitioning through respawn. | |
| void | refreshRemotePowerupRenderables () |
| Assign or update Renderable components for replicated powerup entities. | |
| void | refreshRemoteHealthPackRenderables () |
| Assign or update Renderable components for replicated health pack spawner entities. | |
| void | refreshDroppedWeaponRenderables () |
| Assign Renderable components to dropped-weapon entities (mirrors spawner visuals). | |
| Public Member Functions inherited from IScreen | |
| virtual | ~IScreen ()=default |
Private Types | |
| enum class | HandMountDebugSpace : std::uint8_t { None , ThirdPerson , FirstPerson } |
| enum class | HandMountDebugPoint : std::uint8_t { Shoulder , Elbow , Palm , Finger0 , Finger1 , Finger2 , Finger3 , Finger4 } |
Private Member Functions | |
| 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. | |
| void | handleLocalPlayerReady (entt::entity local) |
| Emplace player-control components onto the mapped local entity and record it. | |
| void | clearPredictedStateHistory () noexcept |
| void | storePredictedPlayerState (std::uint32_t tick) |
| std::optional< PredictedPlayerState > | captureLocalPredictedState () const |
| const PredictedPlayerState * | predictedStateForTick (std::uint32_t tick) const noexcept |
| void | restoreLocalPredictedState (const PredictedPlayerState &state) |
| ReconciliationDecision | evaluateReconciliationSkip (const PredictedPlayerState &authoritative, const PredictedPlayerState *predictedAtAck, const std::optional< PredictedPlayerState > ¤tBeforeSnapshot) const noexcept |
| void | updateCachedPostMatchResult () |
| Refresh the final post-match scoreboard snapshot while FINISHED stats are still replicated. | |
| void | openChat () |
| Enter chat input mode and release normal gameplay input capture. | |
| void | closeChat () |
| Leave chat input mode and restore normal gameplay input capture. | |
| void | submitChat () |
| Send the current chat draft to the server and close the chat box. | |
| void | appendChatMessage (ClientId sender, std::string_view message) |
| Queue a replicated chat message for HUD display. | |
| void | appendLocalChatMessage (std::string_view message) |
| Queue a locally-authored chat echo while waiting for server replication. | |
| void | appendPopupMessage (HudPopupKind kind, std::string_view message) |
| Queue a generic transient HUD popup message. | |
| void | clearGameplayInputForChat () |
| Clear held gameplay actions so typing chat cannot leak into movement or weapons. | |
| void | applyFrameRateLimit () |
| Apply FPS-limit strategy based on limitFPSToMonitor, monitor Hz, and physics Hz. | |
| void | attachAnimatedCharacter (entt::entity e) |
| Attach a fresh AnimatedCharacter component to an entity. | |
| void | onWeaponFired (const struct WeaponFiredEvent &evt) |
| Dispatcher subscriber: when ANY player fires a shot, push a per-weapon-class additive pitch impulse onto that player's spine. | |
| void | adoptGamepad (SDL_JoystickID id) |
| Open the gamepad with the given SDL_JoystickID and make it the active controller, but only if none is currently bound (first-device-wins policy). | |
| void | scanForConnectedGamepads () |
| Open the first already-connected gamepad, if any. | |
| glm::vec3 | muzzleFlashOrigin (const glm::vec3 &fallback) const |
| World position to spawn local weapon particles. | |
| glm::vec3 | muzzleFlashLightPosition (const glm::vec3 &muzzleOrigin) const |
| Offset a muzzle point to the actual transient point-light position. | |
| void | spawnMuzzleFlashLight (const glm::vec3 &pos, WeaponType weaponType) |
Spawn a transient muzzle-flash point light at pos. | |
| void | spawnExplosionFlashLight (const glm::vec3 &pos, WeaponType weaponType, float radius) |
Spawn a transient explosion point light at pos. | |
Private Attributes | |
| SDL_Window * | window = nullptr |
| The application window. | |
| DebugUI | debugUI |
| Owns the ImGui context and SDL3 input backend. | |
| NewRenderer * | renderer = nullptr |
| Borrowed renderer owned by App. | |
| Registry | registry |
| The shared ECS registry. | |
| Client * | client = nullptr |
| Borrowed UDP network client owned by App. | |
| SfxSystem * | sfxSystem = nullptr |
| Borrowed audio system owned by App. | |
| UserSettings * | userSettings = nullptr |
| Borrowed user settings owned by App. | |
| std::string_view | userSettingsPath_ |
| Borrowed save path for user settings. | |
| std::optional< registry_serialization::Loader > | snapshotLoader_ |
| Incremental loader; created on first snapshot. | |
| std::optional< entt::entity > | mappedLocalPlayerEntity_ |
| Local-registry entity for this client's player, once assigned. | |
| ParticleSystem | particleSystem |
| Client-side VFX particle system. | |
| VoiceChatSystem | voiceChat_ |
| Push-to-talk Opus proximity voice chat. | |
| Hud | hud_ |
| In-game HUD overlay system. | |
| entt::dispatcher | dispatcher |
| Event bus for weapon/impact/explosion events. | |
| Uint64 | prevTime = 0 |
| SDL performance counter at the last iterate() call. | |
| float | accumulator = 0.0f |
| Unprocessed physics time in seconds. | |
| int | tickCount = 0 |
| Total physics ticks elapsed since start. | |
| uint32_t | clientPredictTick = 0 |
| Monotonic per-tick counter stamped onto outgoing InputSnapshots. | |
| bool | prevShootingForDebug_ = false |
| PR-20: tracks last frame's input.shooting so the fire-rising-edge detector inside iterate() only captures the FIRST tick of a click (a "trigger pull"), not every tick the button is held. | |
| InputRingBuffer | inputRing_ |
| Phase 5b: ring buffer of recent stamped inputs for replay- based reconciliation. | |
| std::array< PredictedPlayerState, InputRingBuffer::k_capacity > | predictedStateHistory_ {} |
| bool | mouseCaptured = true |
| True when relative mouse mode is active. | |
| SDL_Gamepad * | activeGamepad_ = nullptr |
| Currently-bound gamepad, or nullptr if none is plugged in. | |
| SDL_JoystickID | activeGamepadId_ = 0 |
| SDL_JoystickID of the active gamepad — needed to identify the device on SDL_EVENT_GAMEPAD_REMOVED so we don't tear down a different controller when a second one disconnects. | |
| BindingDevice | lastInputDevice_ {} |
| Last input device the player actually used, for HUD glyph selection. | |
| float | gamepadLookSensitivity = 6.0f |
| Right-stick look speed in radians per second at full deflection. | |
| systems::GamepadAimAssistConfig | aimAssistCfg_ |
| AAA-style gamepad aim assist tuning. | |
| systems::GamepadAimAssistState | aimAssistState_ |
| Persistent inter-frame state for aim assist (anchor on target AABB + previous-frame snapshot used to compute the angular delta from which the rotational pull is derived). | |
| std::unique_ptr< WorkerPool > | workerPool_ |
| Persistent thread pool for parallel-for over per-frame loops (currently the animation update; future: parallel frustum cull, particle update, ECS transforms). | |
| bool | localWasDead_ = false |
| Local player's dead state last frame — used to detect the dead→alive (respawn) edge and snap the view to the spawn yaw. | |
| float | mouseSensitivity = user_settings::kDefaultMouseSensitivity |
| Radians per pixel of mouse movement. | |
| float | horizontalFovDegrees = 90.0f |
| Player-facing horizontal camera field of view in degrees. | |
| bool | renderSeparateFromPhysics = true |
| Render every iterate() with interpolation (true) vs only after a physics tick (false). | |
| bool | inputSyncedWithPhysics = true |
| Sample mouse once per physics tick (true) vs every iterate() call (false). | |
| bool | limitFPSToMonitor = true |
| VSync on (true) / off (false). | |
| Uint64 | softLimitPeriod = 0 |
| Target frame period in perf-counter ticks (0 = disabled). | |
| Uint64 | softLimitNextFrame = 0 |
| Performance counter target for next frame deadline. | |
| FrameRecorder | recorder |
| R-key toggled frame-state + screenshot recorder. | |
| uint64_t | frameCount = 0 |
| Monotonic render-frame counter. | |
| glm::vec3 | cachedEye_ {0.f, 100.f, 0.f} |
| glm::vec3 | cachedCamFwd_ {0.f, 0.f, 1.f} |
| bool | cachedGravFlipped_ {false} |
| Local player gravity-flip state, updated each iterate(). | |
| float | currentCameraRoll_ {0.0f} |
| Smoothed camera roll angle (radians). | |
| int | localEmote_ {-1} |
| Active local emote index (EmoteCatalog), or -1. | |
| float | emoteCamBlend_ {0.0f} |
| 0 = first-person, 1 = third-person emote cam (eased). | |
| bool | killcamActive_ {false} |
| True this frame while the killcam is driving the camera. | |
| glm::vec3 | killcamEye_ {0.0f} |
| Eye position locked at the moment of death. | |
| float | killcamYaw_ {0.0f} |
| Smoothed killcam yaw (radians). | |
| float | killcamPitch_ {0.0f} |
| Smoothed killcam pitch (radians). | |
| glm::vec3 | killcamKillerCenter_ {0.0f} |
| Killer AABB center (world) for the HUD label. | |
| glm::vec3 | killcamKillerHalf_ {0.0f} |
| Killer AABB half-extents (world) for the HUD label. | |
| entt::entity | killcamKillerEntity_ {entt::null} |
| Killer entity (drives the chams pass), or null. | |
| std::string | killcamKillerName_ |
| Killer's display nickname (for the HUD label). | |
| physics::MapCollisionData | mapCollision_ |
| AssetRegistry | assets_ |
| int | weaponModelIndices_ [kRenderableWeaponTypeCount] = {-1, -1, -1, -1, -1} |
| int | weaponAssetIds_ [kRenderableWeaponTypeCount] = {-1, -1, -1, -1, -1} |
| int | viewmodelLeftHandModelIdx_ = -1 |
| int | viewmodelRightHandModelIdx_ = -1 |
| int | handMountDebugMarkerModelIdx_ = -1 |
| int | rocketProjectileModelIdx_ = -1 |
| int | grenadeModelIdx_ = -1 |
| int | heGrenadeModelIdx_ = -1 |
| int | stickyGrenadeModelIdx_ = -1 |
| int | molotovModelIdx_ = -1 |
| int | medkitModelIdx_ = -1 |
| int | shieldPowerupModelIdx_ = -1 |
| int | damagePowerupModelIdx_ = -1 |
| bool | showDynLightUI_ = false |
| Show the Dynamic Lighting panel. | |
| bool | showHdrDebugUI_ = false |
| Show the HDR / tonemap debug panel. | |
| bool | showHudDebug_ = false |
| Show the HUD Tweaker panel. | |
| bool | showMenuThemeUI_ = false |
| Show the Menu Theme Tweaker panel. | |
| bool | flashlightEnabled_ = false |
| Point light at camera position. | |
| float | flashlightIntensity_ = 8.0f |
| Flashlight brightness. | |
| float | flashlightRange_ = 800.0f |
| Flashlight attenuation range. | |
| float | flashlightOffset_ = 30.0f |
| Forward offset from eye. | |
| bool | movableSphereEnabled_ = false |
| Glow sphere following the player. | |
| float | sphereFollowDist_ = 150.0f |
| Distance ahead of player. | |
| float | sphereIntensity_ = 5.0f |
| Point light intensity of movable sphere. | |
| float | sphereRange_ = 500.0f |
| Point light range of movable sphere. | |
| bool | beamEnabled_ = false |
| Show the bloom beam. | |
| glm::vec3 | beamStartOff_ {30.0f, -5.0f, 10.0f} |
| Beam start offset (fwd, up, right) from eye. | |
| glm::vec3 | beamEndOff_ {200.0f, -5.0f, 10.0f} |
| Beam end offset (fwd, up, right) from eye. | |
| float | beamRadius_ = 3.0f |
| Beam cylinder radius. | |
| glm::vec3 | beamColor_ {0.6f, 0.1f, 1.0f} |
| Beam emissive colour (purple). | |
| float | beamLightIntensity_ = 4.0f |
| Point light intensity per sample. | |
| float | beamLightRange_ = 300.0f |
| Point light range per sample. | |
| float | beamLightSpacing_ = 60.0f |
| Distance between point lights along beam. | |
| WeaponType | currentEquippedType_ = WeaponType::Rifle |
| Cached each frame. | |
| WeaponType | lastEquippedType_ = WeaponType::Rifle |
| Previous frame's weapon — triggers default reload on change. | |
| bool | viewmodelDefaultsApplied_ = false |
| bool | wasChargingRailgun_ = false |
| True last frame if local player was charging RailGun. | |
| std::unordered_map< entt::entity, BeamAudioState > | beamAudioStates_ |
| std::unordered_map< entt::entity, std::array< float, 5 > > | footstepPhases_ |
| std::unordered_map< entt::entity, float > | footstepCooldowns_ |
| std::unordered_map< entt::entity, PlayerSfxState > | playerSfxState_ |
| float | hitmarkerTimer_ = 0.0f |
| Remaining display time (fades out over this). | |
| bool | hitmarkerIsHeadshot_ = false |
| True when the current hitmarker was a headshot. | |
| bool | hitmarkerShieldBreak_ = false |
| True when the current hit depleted target armor. | |
| std::vector< PendingDamageNumber > | pendingDamageNumbers_ |
| entt::entity | accumTarget_ = entt::null |
| Current target being damaged. | |
| int | accumTotal_ = 0 |
| Running damage total. | |
| float | accumResetTimer_ = 0.f |
| Timer to reset accumulator after inactivity. | |
| uint8_t | accumLastHitType_ = 0 |
| 0=health(white), 1=shield(blue), 2=headshot(gold). | |
| HudShotgunBlast | shotgunPelletAccum_ {} |
| In-flight accumulator (resets when 9 pellets received). | |
| int | shotgunPelletAccumCount_ = 0 |
| Pellets received for the current in-flight blast. | |
| float | shotgunPelletLastTimeSec_ = 0.f |
| Game-time of the last pellet (for stale-reset). | |
| HudShotgunBlast | lastShotgunBlast_ {} |
| Most recently completed blast (staged for HUD). | |
| float | prevHealth_ = 100.f |
| float | prevArmor_ = 100.f |
| float | matchElapsedSeconds_ = 0.f |
| Time accumulated while the match is in PLAYING phase (s). | |
| int | prevPrimaryWeaponType_ = -1 |
| Last-frame snapshot of the local player's weapon-slot types (-1 = empty). | |
| int | prevSecondaryWeaponType_ = -1 |
| int | prevAmmoReserve_ = -1 |
| Drives "+N <weapon> AMMO" reserve-grow notifications. | |
| std::vector< HudPickupNotification > | pendingPickupNotifications_ |
| Pickup notifications queued for the next HUD frame. | |
| std::vector< HudPopupMessage > | pendingPopupMessages_ |
| Generic popup notifications queued for the next HUD frame. | |
| std::vector< HudChatMessage > | chatMessages_ |
| std::vector< HudVoiceSpeaker > | voiceSpeakers_ |
| std::string | chatDraft_ |
| std::deque< std::string > | pendingLocalChatEchoes_ |
| bool | chatOpen_ = false |
| float | vmScale = 1.0f |
| Weapon model scale (model is in mm). | |
| float | vmForward = 0.0f |
| Forward offset from eye (Quake units). | |
| float | vmRight = 0.0f |
| Right offset from eye. | |
| float | vmDown = 0.0f |
| Downward offset from eye. | |
| float | vmYawOffset = 0.0f |
| Extra yaw (degrees) applied to the model before camera orient. | |
| float | vmPitchOffset = 0.0f |
| Extra pitch (degrees). | |
| float | vmRollOffset = 0.0f |
| Extra roll (degrees). | |
| bool | showViewmodelUI = false |
| Show the Viewmodel Tweaker window. | |
| float | prevSwayYaw_ = 0.0f |
| float | prevSwayPitch_ = 0.0f |
| float | swayOffsetX_ = 0.0f |
| Current horizontal sway (right axis, Quake units). | |
| float | swayOffsetY_ = 0.0f |
| Current vertical sway (up axis). | |
| bool | swayInitialized_ = false |
| Guard against initial delta spike. | |
| float | swayAmplitudeYaw_ = 3.0f |
| float | swayAmplitudePitch_ = 2.0f |
| float | swayDecayRate_ = 8.0f |
| Exponential decay speed. | |
| float | swaySmoothing_ = 0.15f |
| Input smoothing (0..1, lower = smoother). | |
| float | recoilPitch_ = 0.0f |
| Current recoil pitch offset (degrees). | |
| float | recoilPushBack_ = 0.0f |
| Current recoil backward offset (Quake units). | |
| float | recoilRoll_ = 0.0f |
| Current recoil roll offset (degrees). | |
| bool | useSpringCameraRecoil_ = true |
| Toggle Apex-spring path vs legacy instant snap-pitch write. | |
| float | cameraRecoilPitch_ = 0.0f |
| Spring current offset (radians; negative = looking up). | |
| float | cameraRecoilYaw_ = 0.0f |
| float | cameraRecoilPitchVel_ = 0.0f |
| Spring velocity (rad/s). | |
| float | cameraRecoilYawVel_ = 0.0f |
| float | cameraRecoilTargetPitch_ = 0.0f |
| Spring target; accumulates per shot, decays only when idle. | |
| float | cameraRecoilTargetYaw_ = 0.0f |
| float | committedRecoilPitch_ = 0.0f |
| Portion of cameraRecoilPitch_ already added to snap.pitch. | |
| float | committedRecoilYaw_ = 0.0f |
| Each frame we commit (current - committed) and update. | |
| float | recoilPatternScaleMultiplier_ = 2.0f |
| Live multiplier on WeaponConfig.recoilPatternScale. | |
| float | cameraRecoilOmega_ = 35.0f |
| Spring angular frequency (rad/s). Higher = snappier kick. | |
| float | cameraRecoilTargetDecay_ = 5.0f |
| Idle-recovery decay rate (1/s). Higher = faster snap-back. | |
| float | cameraRecoilIdleThreshold_ = 0.18f |
| Seconds off-trigger before target starts decaying. | |
| bool | useRecoilCompensation_ = false |
| false = Approach A (no restore — aim keeps the view angles the recoil walked it to; player compensates manually); true = Approach B. | |
| float | lastSnapPitchAfterCommit_ = 0.0f |
| snap.pitch saved at end of last spring tick — diff against | |
| float | lastSnapYawAfterCommit_ = 0.0f |
| current to recover the player's mouse delta this frame. | |
| bool | haveLastSnap_ = false |
| Becomes true after the first frame the local player exists. | |
| float | compensationCreditPitch_ = 0.0f |
| float | compensationCreditYaw_ = 0.0f |
| float | compensationCreditCap_ = 0.10f |
| Max banked credit (rad). ~5.7° per axis. | |
| float | compensationCreditDecay_ = 1.0f |
| Credit decay rate (1/s); stale credit fades. | |
| float | reloadDownwardOffset_ = 0.0f |
| Downward offset for the reload animation. | |
| float | grenadeThrowDownwardOffset_ = 0.0f |
| Downward offset for the grenade-throw animation. | |
| float | localFireCooldown_ = 0.0f |
| Countdown timer; fire VFX only when <= 0. | |
| float | localRecoilHeat_ = 0.0f |
| float | recoilIdleTime_ = 0.0f |
| int | pendingScrollSwitch_ = 0 |
| +1 = next slot, -1 = previous slot, consumed each frame. | |
| ThirdPersonWeaponParams | tpWeaponParams_ [kRenderableWeaponTypeCount] |
| Runtime-tunable procedural/scale params. | |
| int | tpTuneWeaponIdx_ = 0 |
| Which weapon type the Weapon Hold tweaker is editing. | |
| bool | tpFreezeAnimations_ = false |
| Debug: freeze every animator's playback while tuning. | |
| std::array< WeaponHoldPose, kRenderableWeaponTypeCount > | weaponHoldPoses_ {} |
| Runtime, live-tuned. | |
| std::array< WeaponHoldPose, kRenderableWeaponTypeCount > | authoredWeaponHoldPoses_ {} |
| Compile-time defaults. | |
| std::array< std::string, kRenderableWeaponTypeCount > | weaponHoldPosePaths_ {} |
| Source TOML path each. | |
| std::array< std::filesystem::file_time_type, kRenderableWeaponTypeCount > | weaponHoldPoseMTimes_ {} |
| float | holdPoseReloadAccumulator_ = 0.0f |
| Seconds since last hot-reload mtime poll (~4 Hz throttle). | |
| float | holdRotStepDeg_ = 5.0f |
| Delta-rotation step (deg) for the spine-rotation buttons. | |
| bool | holdShowDebugMarker_ = true |
| Render the spine-anchor axis marker when the tweaker is open. | |
| bool | showWeaponHoldUI_ = false |
| Show the Weapon Hold tweaker window. | |
| FirstPersonHandMountParams | fpHandMountParams_ [kRenderableWeaponTypeCount] |
| Runtime-tunable copy; initialised from defaults. | |
| FirstPersonHandMountParams | authoredFPHandMountParams_ [kRenderableWeaponTypeCount] |
| Defaults loaded from authored weapon assets. | |
| int | fpHandMountTuneWeaponIdx_ = 0 |
| Which weapon type is being tuned. | |
| bool | showFPHandMountUI_ = false |
| Show the FP Arm Tweaker window. | |
| HandMountDebugTarget | handMountDebugTarget_ {} |
| WeaponSpawnerModelParams | spawnerWeaponParams_ [kRenderableWeaponTypeCount] |
| Runtime-tunable copy; initialised from spawner defaults. | |
| int | spawnerTuneWeaponIdx_ = 0 |
| Which weapon type is being tuned. | |
| bool | showWeaponSpawnerModelUI_ = false |
| Show the Weapon Spawner Model Tweaker window. | |
| CharacterRig | charRig_ |
| Shared skinned rig (skeleton + bind pose + weights). | |
| int | rightHandJointIdx_ = -1 |
| Cached "mixamorig:RightHand" joint index (-1 = not present). | |
| int | spine2JointIdx_ = -1 |
| Cached "mixamorig:Spine2" joint index. | |
| std::unordered_map< entt::entity, GripSwapState > | gripSwapState_ {} |
| float | aimAssistParityAccumSec_ = 0.0f |
| Seconds since the last aim-assist parity check log line (Phase F). | |
| AnimationLibrary | animLibrary_ |
| Collection of ozz clips on the shared rig. | |
| CpuLbsSkinningBackend | skinBackend_ |
| Phase-1 CPU linear-blend-skinning backend. | |
| AnimationTesterState | animUI_ |
| Persistent state for the Animation Tester panel. | |
| HitboxRig | clientHitboxRig_ |
| Hitbox definitions for client-side debug visualization. | |
| float | kRigScale_ = 1.0f |
| Per-renderable scale for animated characters (auto-calculated, tunable). | |
| float | kRigVerticalOffset_ |
| Per-renderable Y translation for animated characters (auto-calculated, tunable). | |
| float | rigMeshMinY_ = 0.0f |
| Minimum Y of the bind-pose mesh vertices (model space). | |
| std::unordered_set< entt::entity > | dissolveSpawned_ |
| Entities for which a death-dissolve particle burst has already been spawned (so we emit it exactly once per death). | |
| float | fpsHistory [k_fpsHistorySize] = {} |
| Circular buffer of per-frame FPS samples. | |
| int | fpsHistoryHead = 0 |
| Next write index. | |
| int | fpsHistoryCount = 0 |
| Valid sample count (saturates at k_fpsHistorySize). | |
| Uint64 | prevRenderTime = 0 |
| Perf counter at the last render call. | |
| float | pingTimer = 0.0f |
| Accumulator for periodic PING sends. | |
| Uint64 | statsPrevTime = 0 |
| Perf counter at the last stats snapshot. | |
| int | statsPhysTicks = 0 |
| Physics ticks accumulated since last snapshot. | |
| int | statsRenderFrames = 0 |
| Rendered frames accumulated since last snapshot. | |
| float | measuredPhysicsHz = 0.0f |
| Computed physics rate (Hz). | |
| float | statsFPSCurrent = 0.0f |
| Average render FPS over the last stats window (actual frames / elapsed time). | |
| float | statsFPSMin = 0.0f |
| Minimum FPS in the ring buffer. | |
| float | statsFPSMax = 0.0f |
| Maximum FPS in the ring buffer. | |
| float | statsFPS1pLow = 0.0f |
| 1st-percentile FPS (1 % low). | |
| float | statsFPS5pLow = 0.0f |
| 5th-percentile FPS (5 % low). | |
| float | benchSeconds_ = 0.0f |
| Bench duration in seconds (0 = disabled). | |
| Uint64 | benchStartTime_ = 0 |
| Perf counter at first iterate() in bench mode. | |
| bool | benchActive_ = false |
| True after BENCH_SECONDS read at init. | |
| std::vector< float > | benchFrameTimesMs_ |
| Per-frame ms after warmup; reservation in init(). | |
| std::vector< ClientPerfFrame > | benchFrameStats_ |
| Per-frame phase-time breakdown. | |
| ClientPerfRecorder | perfRecorder_ |
| float | perfSnapshotApplyMs_ = 0.0f |
| std::uint32_t | perfSnapshotApplyCount_ = 0 |
| MatchPhase | currentMatchPhase = MatchPhase::LOBBY |
| Latest match phase update from the server. | |
| ClientId | currentWinnerId = ClientId{-1} |
| ClientId of the current match winner, if in POSTMATCH. | |
| float | countdownTimer = 0.0f |
| Countdown timer for transitions between match phases (e.g. warmup to in-progress). | |
| std::optional< PostMatchResult > | cachedPostMatchResult_ |
| Final scoreboard snapshot captured during FINISHED. | |
| bool | returnToLobbyRequested = false |
| Latched true when server sends MATCH_STATE with phase == LOBBY. | |
| bool | returnToMainMenuRequested_ = false |
| Latched true when the pause menu or disconnect requests leaving. | |
| bool | serverShutdownNoticeRequested_ = false |
| Latched true when leaving because the server connection closed. | |
| std::vector< KillFeedEvent > | killFeed |
| Recent kill events for on-screen kill feed (newest first). | |
| PauseMenu | pauseMenu |
| In-game pause menu (opened with ESC, blocks input to the game when active). | |
| glm::vec3 | cachedMuzzleWorld_ {0.0f} |
| bool | cachedMuzzleValid_ = false |
| glm::vec3 | cachedRightPalmWorld_ {0.0f} |
| bool | cachedRightPalmValid_ = false |
| glm::vec3 | muzzleFlashLightOffset_ {-12.25f, 0.0f, -10.0f} |
| Tunable point-light offset from the muzzle (fwd/up/right). | |
| std::vector< TransientVfxLight > | transientVfxLights_ |
Static Private Attributes | |
| static constexpr int | k_physicsHz = 128 |
| Target physics tick rate. | |
| static constexpr float | k_physicsDt = 1.0f / static_cast<float>(k_physicsHz) |
| Seconds per tick. | |
| static constexpr int | k_maxTicksPerFrame = 2 |
| Spiral-of-death guard: max physics ticks per iterate(). | |
| static constexpr int | k_fpsHistorySize = 512 |
| Samples in the rolling FPS ring buffer. | |
| static constexpr float | k_benchWarmupSeconds = 2.0f |
| Skip the first N seconds (pipeline warmup). | |
Additional Inherited Members | |
| Static Protected Member Functions inherited from IScreen | |
| static SDL_AppResult | processCommonImguiEvent (SDL_Event *event) |
| Forward event to ImGui and detect SDL_EVENT_QUIT. | |
| static bool | handleSystemMenuEvent (SDL_Event *event, SystemMenuOverlay &menu, UserSettings *settings) |
| Handle Escape-toggle of a SystemMenuOverlay and forward consumed events. | |
| static void | beginMenuFrame (NewRenderer *renderer) |
| Start a new ImGui frame and paint the shared menu background. | |
| static void | presentMenuFrame (NewRenderer &renderer) |
| Render the ImGui draw data and present a default-camera frame. | |
Top-level client game object.
Owns the active game screen subsystems and borrows App-owned window, renderer, and network client. Wired through App into SDL's application-callback API.
|
strongprivate |
|
strongprivate |
|
private |
Open the gamepad with the given SDL_JoystickID and make it the active controller, but only if none is currently bound (first-device-wins policy).
Shared by the SDL_EVENT_GAMEPAD_ADDED hot-plug path and the init-time scan below, so both routes apply identical state + logging.
|
private |
Queue a replicated chat message for HUD display.
|
private |
Queue a locally-authored chat echo while waiting for server replication.
|
private |
Queue a generic transient HUD popup message.
|
private |
Apply FPS-limit strategy based on limitFPSToMonitor, monitor Hz, and physics Hz.
Advance one frame: decoupled physics / render loop.
When monitor refresh >= physics Hz, uses VSync. Otherwise falls back to a software frame limiter at physics Hz with mailbox/immediate presentation.
Physics ALWAYS runs at exactly 128 Hz (k_physicsHz) using an accumulator with a multi-tick catch-up loop (up to k_maxTicksPerFrame per call). This is non-negotiable: it must match the server tick rate.
Input is split into two independent streams:
Mouse look (yaw / pitch) – sampled EVERY iterate() call so camera rotation is perfectly smooth at whatever frame rate the renderer produces. The camera always uses the latest yaw directly (never interpolated). Interpolating yaw with the physics alpha creates a timebase mismatch on multi-tick or zero-tick frames, producing visible jitter.
Movement keys (WASD / jump / crouch) – sampled once per physics tick group when inputSyncedWithPhysics is true (the default) so movement calculations match the server. When the toggle is off, keys are also sampled every iterate() call.
Position interpolation uses alpha = accumulator / k_physicsDt across the LAST physics tick (PreviousPosition is saved inside the while loop before each tick).
Three ImGui-tunable flags:
renderSeparateFromPhysics – render every iterate() call with position interpolated between the last two physics ticks (true, default) vs. render only after a physics tick (false, caps render fps at 128 Hz).
inputSyncedWithPhysics – sample movement keys once per tick group (true, default, server-consistent) vs. every iterate() call (false). Mouse look is always per-frame regardless of this toggle.
limitFPSToMonitor – when ON and monitor >= physicsHz, uses VSync. When monitor < physicsHz (regardless of this toggle), a software frame limiter at physicsHz is always active to ensure rock-steady frame pacing — the monitor can't display above its refresh rate anyway, and uncapped rendering creates beat-frequency jitter.
|
private |
Deserialize a snapshot from the server and update the ECS registry.
|
private |
Attach a fresh AnimatedCharacter component to an entity.
Creates a new CharacterAnimator wired to the shared rig + clip library + skinning backend, uploads a per-entity clone of the rig's template model, and emplaces the component. Safe to call even if the rig failed to load (logs a warning and leaves the entity un-animated).
|
nodiscardprivate |
|
private |
Clear held gameplay actions so typing chat cannot leak into movement or weapons.
|
privatenoexcept |
|
private |
Leave chat input mode and restore normal gameplay input capture.
| std::optional< PostMatchResult > Game::consumePostMatchResult | ( | ) |
Return the final scoreboard snapshot captured before the server reset match stats.
| bool Game::consumeReturnToMainMenu | ( | ) |
True if the user requested leaving the match for the main menu, then clear that request.
| bool Game::consumeServerShutdownNotice | ( | ) |
True if the main-menu return was caused by the server connection closing, then clear that reason.
|
nodiscardprivatenoexcept |
|
overridevirtual |
|
private |
Emplace player-control components onto the mapped local entity and record it.
| bool Game::init | ( | AppContext & | ctx | ) |
Initialise all subsystems and spawn the local player entity.
| bool Game::initDebugUI | ( | const AppContext & | ctx | ) |
Create the Game-owned ImGui context before App initialises the renderer backend.
|
overridevirtual |
Advance one frame: sample input, step physics, render.
Execution flow each frame:
Viewmodel — weapon sway, bob, recoil decay, camera-space transform.
< rgb=color, a=blend factor (0=no tint).
< call animator->update()
< write to instance/palette slots
< index into skinnedInstances + base into bonePalette
< Apply holdPose to the animator this frame.
< Per-weapon spine-relative offset/rotation + FK arm pose.
< Weapon-swap fade weight for the arm FK (0→1).
Implements IScreen.
|
nodiscardprivate |
Offset a muzzle point to the actual transient point-light position.
muzzleFlashLightOffset_ uses camera/viewmodel basis units: x = forward, y = up, z = right.
|
nodiscardprivate |
World position to spawn local weapon particles.
Prefer the weapon model's tagged muzzle marker (is_muzzle / socket_muzzle) when available; fall back to the old palm-derived point for untagged guns.
|
private |
Dispatcher subscriber: when ANY player fires a shot, push a per-weapon-class additive pitch impulse onto that player's spine.
The kick decays inside CharacterAnimator::runSamplingAndSkinning so the upper body rises and settles back to the sampled aim pose over ~250 ms. Wired to the same WeaponFiredEvent channel SfxSystem listens on, so the same event drives both audio and visuals.
|
private |
Enter chat input mode and release normal gameplay input capture.
|
nodiscardprivatenoexcept |
|
overridevirtual |
Shut down all subsystems in reverse-init order.
Implements IScreen.
| void Game::refreshDroppedWeaponRenderables | ( | ) |
Assign Renderable components to dropped-weapon entities (mirrors spawner visuals).
| void Game::refreshRemoteHealthPackRenderables | ( | ) |
Assign or update Renderable components for replicated health pack spawner entities.
| void Game::refreshRemotePlayerRenderables | ( | ) |
Update Renderable components for remote players (model, scale, orientation from animation rig).
| void Game::refreshRemotePowerupRenderables | ( | ) |
Assign or update Renderable components for replicated powerup entities.
| void Game::refreshRemoteProjectileRenderables | ( | ) |
Assign Renderable components to newly spawned projectile entities.
| void Game::refreshRemoteRespawnRenderables | ( | ) |
Reset Renderable visibility for players transitioning through respawn.
|
private |
|
private |
Open the first already-connected gamepad, if any.
SDL fires SDL_EVENT_GAMEPAD_ADDED for pads present at SDL_Init time, but those events are delivered to whatever screen is active then (the lobby / Home), not the Game which doesn't exist yet — so a controller plugged in before the match starts would otherwise never be bound until the user physically reconnected it. Game::init() calls this to enumerate SDL_GetGamepads() and adopt the first one, covering the "connected before launch" case; the event handler still covers runtime hot-plug.
| bool Game::shouldReturnToLobby | ( | ) | const |
True once the server has returned the match phase to the lobby.
|
overridevirtual |
|
private |
Spawn a transient explosion point light at pos.
|
private |
Spawn a transient muzzle-flash point light at pos.
|
private |
|
private |
Send the current chat draft to the server and close the chat box.
|
private |
Refresh the final post-match scoreboard snapshot while FINISHED stats are still replicated.
|
private |
0=health(white), 1=shield(blue), 2=headshot(gold).
|
private |
Timer to reset accumulator after inactivity.
|
private |
Current target being damaged.
|
private |
Running damage total.
|
private |
Unprocessed physics time in seconds.
|
private |
Currently-bound gamepad, or nullptr if none is plugged in.
Opened by scanForConnectedGamepads() at init (for pads already plugged in before the match) and on SDL_EVENT_GAMEPAD_ADDED for runtime hot-plug (first device wins — extra controllers are ignored until the active one disconnects), closed on SDL_EVENT_GAMEPAD_REMOVED. SDL3's gamepad mapping database normalises every supported controller (Xbox 360 / One, DualShock, Switch Pro, ...) onto the same logical buttons + axes, so the input mapping in InputSampleSystem.hpp works uniformly across devices.
|
private |
SDL_JoystickID of the active gamepad — needed to identify the device on SDL_EVENT_GAMEPAD_REMOVED so we don't tear down a different controller when a second one disconnects.
|
private |
AAA-style gamepad aim assist tuning.
Active only when a gamepad is connected (mouse input is unaffected). Defaults are tuned for assist not auto-aim: a stationary enemy gets zero rotational pull, a moving enemy gets partial tracking help. Live-tunable from the ECS inspector.
|
private |
Seconds since the last aim-assist parity check log line (Phase F).
|
private |
Persistent inter-frame state for aim assist (anchor on target AABB + previous-frame snapshot used to compute the angular delta from which the rotational pull is derived).
Reset implicitly when the target is lost or aim assist is disabled.
|
private |
Collection of ozz clips on the shared rig.
|
private |
Persistent state for the Animation Tester panel.
|
private |
|
private |
Defaults loaded from authored weapon assets.
|
private |
Compile-time defaults.
|
private |
|
private |
Beam emissive colour (purple).
|
private |
Show the bloom beam.
|
private |
Beam end offset (fwd, up, right) from eye.
|
private |
Point light intensity per sample.
|
private |
Point light range per sample.
|
private |
Distance between point lights along beam.
|
private |
Beam cylinder radius.
|
private |
Beam start offset (fwd, up, right) from eye.
|
private |
True after BENCH_SECONDS read at init.
|
private |
Per-frame phase-time breakdown.
Captured every frame in bench mode and by GROUP2_CLIENT_PERF=1 play-session recordings.
|
private |
Per-frame ms after warmup; reservation in init().
|
private |
Bench duration in seconds (0 = disabled).
|
private |
Perf counter at first iterate() in bench mode.
|
private |
|
private |
|
private |
Local player gravity-flip state, updated each iterate().
|
private |
|
private |
|
private |
Final scoreboard snapshot captured during FINISHED.
|
private |
|
private |
|
private |
Seconds off-trigger before target starts decaying.
|
private |
Spring angular frequency (rad/s). Higher = snappier kick.
|
private |
Spring current offset (radians; negative = looking up).
|
private |
Spring velocity (rad/s).
|
private |
Idle-recovery decay rate (1/s). Higher = faster snap-back.
|
private |
Spring target; accumulates per shot, decays only when idle.
|
private |
|
private |
|
private |
|
private |
Shared skinned rig (skeleton + bind pose + weights).
|
private |
|
private |
|
private |
|
private |
Hitbox definitions for client-side debug visualization.
|
private |
Monotonic per-tick counter stamped onto outgoing InputSnapshots.
Bumped once per physics tick group inside iterate() and copied into the local player's InputSnapshot.tick before each send. The server uses this to dedup re-sent inputs (multi-input redundancy) and apply only inputs newer than its lastAppliedInputTick. Phase-5 prediction also keys the input ring buffer by it.
|
private |
Portion of cameraRecoilPitch_ already added to snap.pitch.
|
private |
Each frame we commit (current - committed) and update.
|
private |
Max banked credit (rad). ~5.7° per axis.
|
private |
Credit decay rate (1/s); stale credit fades.
|
private |
|
private |
|
private |
Countdown timer for transitions between match phases (e.g. warmup to in-progress).
|
private |
Smoothed camera roll angle (radians).
|
private |
Cached each frame.
|
private |
Latest match phase update from the server.
ClientId of the current match winner, if in POSTMATCH.
|
private |
|
private |
Owns the ImGui context and SDL3 input backend.
|
private |
Event bus for weapon/impact/explosion events.
|
private |
Entities for which a death-dissolve particle burst has already been spawned (so we emit it exactly once per death).
Cleared per-entity on respawn. See the death-capture pass in the render submit.
|
private |
0 = first-person, 1 = third-person emote cam (eased).
|
private |
Point light at camera position.
|
private |
Flashlight brightness.
|
private |
Forward offset from eye.
|
private |
Flashlight attenuation range.
|
private |
|
private |
|
private |
Runtime-tunable copy; initialised from defaults.
|
private |
Which weapon type is being tuned.
|
private |
Circular buffer of per-frame FPS samples.
|
private |
Valid sample count (saturates at k_fpsHistorySize).
|
private |
Next write index.
|
private |
Monotonic render-frame counter.
|
private |
Right-stick look speed in radians per second at full deflection.
6.0 rad/s ≈ 343°/s — most testers found 3.0 too sluggish for tracking players during firefights; this is in line with mainstream console FPS defaults. Tunable from the ECS inspector.
|
private |
|
private |
Downward offset for the grenade-throw animation.
|
private |
|
private |
|
private |
|
private |
Becomes true after the first frame the local player exists.
|
private |
|
private |
True when the current hitmarker was a headshot.
|
private |
True when the current hit depleted target armor.
|
private |
Remaining display time (fades out over this).
|
private |
Seconds since last hot-reload mtime poll (~4 Hz throttle).
|
private |
Delta-rotation step (deg) for the spine-rotation buttons.
|
private |
Render the spine-anchor axis marker when the tweaker is open.
|
private |
Player-facing horizontal camera field of view in degrees.
|
private |
In-game HUD overlay system.
|
private |
Phase 5b: ring buffer of recent stamped inputs for replay- based reconciliation.
Each entry is keyed by clientPredictTick so runReconciliation can look up the input that was sent for any recent tick and feed it back into runMovement during replay.
|
private |
Sample mouse once per physics tick (true) vs every iterate() call (false).
|
staticconstexprprivate |
Skip the first N seconds (pipeline warmup).
|
staticconstexprprivate |
Samples in the rolling FPS ring buffer.
|
staticconstexprprivate |
Spiral-of-death guard: max physics ticks per iterate().
Dropped from 8 to 2 in Phase 3g — the bench profiler showed the slowest frames are dominated by catch-up bursts (e.g. 8 ticks × ~2 ms = 16 ms in one frame, dragging p1/p5). Capping at 2 spreads the catch-up across more render frames so any individual frame's worst case is ~4 ms instead of ~16 ms. Visual consequence on a stall: physics simulation briefly runs 0.5× wall speed until the accumulator drains naturally; human-imperceptible at 1000+ render Hz.
|
staticconstexprprivate |
Seconds per tick.
|
staticconstexprprivate |
Target physics tick rate.
|
private |
True this frame while the killcam is driving the camera.
|
private |
Eye position locked at the moment of death.
|
private |
Killer AABB center (world) for the HUD label.
|
private |
Killer entity (drives the chams pass), or null.
|
private |
Killer AABB half-extents (world) for the HUD label.
|
private |
Killer's display nickname (for the HUD label).
|
private |
Smoothed killcam pitch (radians).
|
private |
Smoothed killcam yaw (radians).
|
private |
Recent kill events for on-screen kill feed (newest first).
|
private |
Per-renderable scale for animated characters (auto-calculated, tunable).
|
private |
Per-renderable Y translation for animated characters (auto-calculated, tunable).
|
private |
Previous frame's weapon — triggers default reload on change.
|
private |
Last input device the player actually used, for HUD glyph selection.
Flips to Controller on gamepad button/stick/trigger input and back to KeyboardMouse on key/mouse input. Value-init is KeyboardMouse (0).
|
private |
Most recently completed blast (staged for HUD).
|
private |
snap.pitch saved at end of last spring tick — diff against
|
private |
current to recover the player's mouse delta this frame.
|
private |
VSync on (true) / off (false).
Default ON: caps to the monitor refresh, which frees GPU headroom and removes the near-light stutter. Toggle live via the debug menu; the GROUP2_CLIENT_UNCAPPED env var / bench mode still force it off.
|
private |
Active local emote index (EmoteCatalog), or -1.
|
private |
Countdown timer; fire VFX only when <= 0.
|
private |
|
private |
Local player's dead state last frame — used to detect the dead→alive (respawn) edge and snap the view to the spawn yaw.
|
private |
|
private |
Local-registry entity for this client's player, once assigned.
|
private |
Time accumulated while the match is in PLAYING phase (s).
Drives the top-center match-header readout. Reset on phase changes other than PLAYING so a fresh match starts at 0:00.
|
private |
Computed physics rate (Hz).
|
private |
|
private |
|
private |
True when relative mouse mode is active.
|
private |
Radians per pixel of mouse movement.
|
private |
Glow sphere following the player.
|
private |
Tunable point-light offset from the muzzle (fwd/up/right).
|
private |
Client-side VFX particle system.
|
private |
In-game pause menu (opened with ESC, blocks input to the game when active).
|
private |
|
private |
|
private |
Pickup notifications queued for the next HUD frame.
Emitted when the local player's WeaponState gains a new weapon type or their reserve ammo grows beyond the previous frame's reading.
|
private |
Generic popup notifications queued for the next HUD frame.
The HUD widget consumes each entry once, then owns display lifetime, animation, and expiration.
|
private |
+1 = next slot, -1 = previous slot, consumed each frame.
|
private |
|
private |
|
private |
|
private |
Accumulator for periodic PING sends.
|
private |
|
private |
|
private |
Drives "+N <weapon> AMMO" reserve-grow notifications.
|
private |
|
private |
|
private |
Last-frame snapshot of the local player's weapon-slot types (-1 = empty).
Used to detect new weapons appearing → emit a pickup notification ("+1 RIFLE") so the side feed reflects what just changed.
|
private |
Perf counter at the last render call.
|
private |
|
private |
PR-20: tracks last frame's input.shooting so the fire-rising-edge detector inside iterate() only captures the FIRST tick of a click (a "trigger pull"), not every tick the button is held.
Survives across frames as a member; is naturally reset when the local player respawns because the View<LocalPlayer> branch returns early during the dead-window (no InputSnapshot present). Implementation detail of the shot-debug visualizer.
|
private |
|
private |
|
private |
SDL performance counter at the last iterate() call.
|
private |
|
private |
Live multiplier on WeaponConfig.recoilPatternScale.
1.0 = nominal; 2.0 = double recoil. Tune in debug UI.
|
private |
Current recoil pitch offset (degrees).
|
private |
Current recoil backward offset (Quake units).
|
private |
Current recoil roll offset (degrees).
|
private |
R-key toggled frame-state + screenshot recorder.
|
private |
The shared ECS registry.
|
private |
Downward offset for the reload animation.
|
private |
Borrowed renderer owned by App.
|
private |
Render every iterate() with interpolation (true) vs only after a physics tick (false).
|
private |
Latched true when server sends MATCH_STATE with phase == LOBBY.
|
private |
Latched true when the pause menu or disconnect requests leaving.
|
private |
Cached "mixamorig:RightHand" joint index (-1 = not present).
|
private |
Minimum Y of the bind-pose mesh vertices (model space).
|
private |
|
private |
Latched true when leaving because the server connection closed.
|
private |
|
private |
In-flight accumulator (resets when 9 pellets received).
|
private |
Pellets received for the current in-flight blast.
|
private |
Game-time of the last pellet (for stale-reset).
|
private |
Show the Dynamic Lighting panel.
|
private |
Show the FP Arm Tweaker window.
|
private |
Show the HDR / tonemap debug panel.
|
private |
Show the HUD Tweaker panel.
|
private |
Show the Menu Theme Tweaker panel.
|
private |
Show the Viewmodel Tweaker window.
|
private |
Show the Weapon Hold tweaker window.
|
private |
Show the Weapon Spawner Model Tweaker window.
|
private |
Phase-1 CPU linear-blend-skinning backend.
|
private |
Incremental loader; created on first snapshot.
|
private |
Performance counter target for next frame deadline.
|
private |
Target frame period in perf-counter ticks (0 = disabled).
|
private |
Which weapon type is being tuned.
|
private |
Runtime-tunable copy; initialised from spawner defaults.
|
private |
Distance ahead of player.
|
private |
Point light intensity of movable sphere.
|
private |
Point light range of movable sphere.
|
private |
Cached "mixamorig:Spine2" joint index.
The weapon is a rigid child of this bone and the FK arm hold hangs off it.
|
private |
1st-percentile FPS (1 % low).
|
private |
5th-percentile FPS (5 % low).
|
private |
Average render FPS over the last stats window (actual frames / elapsed time).
|
private |
Maximum FPS in the ring buffer.
|
private |
Minimum FPS in the ring buffer.
|
private |
Physics ticks accumulated since last snapshot.
|
private |
Perf counter at the last stats snapshot.
|
private |
Rendered frames accumulated since last snapshot.
|
private |
|
private |
|
private |
|
private |
Exponential decay speed.
|
private |
Guard against initial delta spike.
|
private |
Current horizontal sway (right axis, Quake units).
|
private |
Current vertical sway (up axis).
|
private |
Input smoothing (0..1, lower = smoother).
|
private |
Total physics ticks elapsed since start.
|
private |
Debug: freeze every animator's playback while tuning.
|
private |
Which weapon type the Weapon Hold tweaker is editing.
|
private |
Runtime-tunable procedural/scale params.
|
private |
|
private |
false = Approach A (no restore — aim keeps the view angles the recoil walked it to; player compensates manually); true = Approach B.
|
private |
Borrowed user settings owned by App.
|
private |
Borrowed save path for user settings.
|
private |
Toggle Apex-spring path vs legacy instant snap-pitch write.
|
private |
|
private |
|
private |
|
private |
Downward offset from eye.
|
private |
Forward offset from eye (Quake units).
|
private |
Extra pitch (degrees).
|
private |
Right offset from eye.
|
private |
Extra roll (degrees).
|
private |
Weapon model scale (model is in mm).
|
private |
Extra yaw (degrees) applied to the model before camera orient.
|
private |
Push-to-talk Opus proximity voice chat.
|
private |
|
private |
True last frame if local player was charging RailGun.
|
private |
|
private |
|
private |
Source TOML path each.
|
private |
Runtime, live-tuned.
|
private |
|
private |
The application window.
|
private |
Persistent thread pool for parallel-for over per-frame loops (currently the animation update; future: parallel frustum cull, particle update, ECS transforms).
Initialised in Game::init with a worker count derived from std::thread::hardware_concurrency() / 2 (or GROUP2_WORKERS if set), so we leave half the cores for the rest of the system. Gated behind a unique_ptr so it constructs AFTER init() reads the env override.