Skip to content

Claude/engine optimization ideas ng6c9#499

Merged
Krilliac merged 3 commits into
Workingfrom
claude/engine-optimization-ideas-ng6c9
Apr 18, 2026
Merged

Claude/engine optimization ideas ng6c9#499
Krilliac merged 3 commits into
Workingfrom
claude/engine-optimization-ideas-ng6c9

Conversation

@Krilliac

Copy link
Copy Markdown
Owner

No description provided.

claude added 3 commits April 18, 2026 18:18
Technique #15 from the advanced-techniques catalog: add Critical / Normal /
Low priority tiers to QueuedEventBus. Dispatch order is Critical → Normal →
Low; under MaxQueueSize pressure the oldest Low-tier event is evicted first,
then Normal, and Critical only as a last-resort safety valve. The existing
QueueEvent<T>(evt) call path defaults to Normal, so every current caller
keeps identical behavior.

Also lands the advanced-techniques knowledge doc that inventories 34
candidate techniques across rendering / ECS / AI / physics / net / streaming /
scripting, and verifies which items from pre-existing plan docs are in fact
already shipped (gpu-cpu-separation Phase 1-4, reflection Phase 4,
AI LOD-tick via AIBudgetLimiter).

Tests: 7 new tests cover default-tier behavior, per-tier counts, dispatch
ordering, Low-first eviction, Critical survival, Critical-flood last-resort
eviction, and Clear() across tiers. Full suite: 5656/5656.

https://claude.ai/code/session_01RQQiNVSeECM4Ha82zeabSJ
Removed 58 knowledge files whose content had outlived its shelf life: 29
`engine-next-steps-phase-*` one-shot completion logs (A–DD, EE–II deep-wire
session, JJ/KK/LL fake-coverage conversion, Themes 1-6), 12 `daemon-phase-*`
phase logs (all six daemon phases shipped), 7 superseded Wine investigation
logs (working recipe is baked into `tools/wine-run.sh`; root-cause + usable
pattern are retained in `wine-role-and-fallback-tiers` and
`wine-no-jobsystem-breakthrough`), 6 single-session "here's what I did
today" logs (connection-scope-wiring, preexisting-bugs-fixed,
templates-placeholder-removal, module-dllmain-extraction,
neural-training-substrate, engine-gap-fill, deep-optimizations,
project-priorities-session), and the Resolved-status closed-engines-analysis.

Kept: overarching decision/pattern/plan docs (engine analyses, coding
patterns, cross-compilation, bloat audit, test audit, gameplay + module
status, architecture plans, advanced-techniques catalog, Wine role +
breakthrough, daemon architecture). Per-session phase chronicles live in
git history; `.claude/` now keeps only reference material future sessions
will actually consult.

Rewrote `.claude/index.md` to match: 37 entries remaining (was 96), with
status Reference for plan docs whose phases are all shipped. Added Quick
Reference note about the new priority tier on QueuedEventBus.

https://claude.ai/code/session_01RQQiNVSeECM4Ha82zeabSJ
Technique #26 from the advanced-techniques catalog — halves per-entity
transform bandwidth by swapping naive XMFLOAT3/XMFLOAT4 serialization for
smallest-three 48-bit quaternion packing and 16-bit-per-component bounded
position packing.

`Utils/Quantization` is a new low-level pair that owns the bit layout:

  PackQuat48(XMFLOAT4) / UnpackQuat48          — 6 bytes / unit-length round trip
  PackVec16(XMFLOAT3, min, max) / UnpackVec16  — 6 bytes inside a caller-chosen AABB

`Engine/Networking/NetQuantize` wraps those with NetBuffer-aware
Write/Read helpers, so replication code can emit a full pose in 12 bytes
versus the current 28. `kQuat48Size` / `kVec16Size` constants are exposed
for bandwidth budgeting. Short reads on the wire flip NetBuffer's error
flag and return identity / range-min, matching the existing NetBuffer
contract.

Math is copied verbatim from the existing `AnimationCompressor` bit layout
so an offline-compressed quat and a live-replicated quat share the same
encoding. Leaving AnimationCompression untouched to avoid regressing the
animation pipeline.

Tests (12 new): quat round trip for identity, axis rotations, and an
arbitrary normalized quat (within 1e-3 component tolerance); vector round
trip at ±10 km (0.2 m tolerance) and ±100 m (5 mm tolerance); out-of-range
clamping; degenerate range fallback; NetBuffer byte-count assertions;
full-pose round trip ending at 12 bytes vs. 28 naive; short-read error
handling. Full suite: 5667/5667.

https://claude.ai/code/session_01RQQiNVSeECM4Ha82zeabSJ
@Krilliac
Krilliac merged commit 9dd17f2 into Working Apr 18, 2026
35 of 42 checks passed
@Krilliac
Krilliac deleted the claude/engine-optimization-ideas-ng6c9 branch April 18, 2026 19:09
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage (GCC + lcov)

Utils/StringUtils.h                            |18.1%   116| 0.0%  21|    -    0
Utils/Telemetry.h                              |20.6%   136| 0.0%  23|    -    0
Utils/ThreadDebugger.h                         |11.6%   199| 0.0%  23|    -    0
Utils/ThreadSafeQueue.h                        |27.5%    40| 0.0%  11|    -    0
Utils/Timer.cpp                                |19.4%    36| 0.0%   7|    -    0
Utils/Timer.h                                  | 100%     2| 0.0%   2|    -    0
Utils/TimerManager.h                           |18.6%   102| 0.0%  19|    -    0
Utils/Tween.h                                  |26.3%    38| 0.0%   6|    -    0
Utils/UUID.h                                   |43.2%    37| 0.0%  16|    -    0
Utils/Validate.h                               |    -     0|    -   0|    -    0
Utils/WineDetection.cpp                        |23.1%    39| 0.0%   9|    -    0

[/home/runner/work/SparkEngine/SparkEngine/SparkSDK/Include/Spark/]
IEngineContext.h                               |7300%     1| 0.0%   1|    -    0
IModule.h                                      | 800%     1| 0.0%   1|    -    0
ServiceInterfaces.h                            | 200%     3| 0.0%   3|    -    0
Version.h                                      |    -     0|    -   0|    -    0

[/home/runner/work/SparkEngine/SparkEngine/Templates/EmptyProject/Source/]
GameModule.h                                   |38.9%    18| 0.0%   6|    -    0

[/home/runner/work/SparkEngine/SparkEngine/Templates/FPSStarter/Source/]
GameModule.h                                   |36.0%    25| 0.0%   7|    -    0

[/home/runner/work/SparkEngine/SparkEngine/Templates/MultiplayerArena/Source/]
GameModule.h                                   |34.6%    26| 0.0%   7|    -    0

[/home/runner/work/SparkEngine/SparkEngine/Templates/PlatformerKit/Source/]
GameModule.h                                   |25.0%    32| 0.0%   7|    -    0

[/home/runner/work/SparkEngine/SparkEngine/Templates/RPGStarter/Source/]
GameModule.h                                   |37.5%    24| 0.0%   8|    -    0
================================================================================
                                         Total:|30.4% 35350| 0.0%  6k|    -    0

Per-Subsystem Coverage

Subsystem Lines Hit Coverage Threshold Status
AI 3716 942 25.3% 35%
Animation 905 277 30.6% 35%
Audio 0 0 0% 30%
Camera 0 0 0% 40%
Core 4877 2920 59.9% 40%
ECS 426 213 50% 40%
Editor 7413 3046 41.1% 25%
GameModules 6621 3234 48.8% 30%
Graphics 17891 9060 50.6% 30%
Networking 3578 2376 66.4% 35%
Physics 0 0 0% 35%
Scripting 283 80 28.3% 30%
Utils 9877 6144 62.2% 60%

Total: 50.9% (28292/55587 lines)

@github-actions

Copy link
Copy Markdown
Contributor

❌ CI Error Report

Failed jobs: clang-tidy, macos-Debug-OpenGL, macos-Release-Metal, macos-Release-OpenGL, windows-vs2022-Release
Errors: 1 | Test failures: 4 | Test warnings: 15 | Compiler warnings: 0

Build Errors

Other errors (1)
clang++: error: linker command failed with exit code 1 (u e -v to  ee invocation) [macos-Debug-OpenGL, macos-Release-Metal, macos-Release-OpenGL]

Test Failures

Test Jobs
1/1 Test #1: SparkEngineTests .................***Failed 16.82 sec windows-vs2022-Release
::warning title=Flaky test: Integration_NetworkingECS_ReplicationLatencyJitterPredictionReconciliation::Integration_N... windows-vs2022-Release
[ FAILED ] Training_GradientCheckHuber (1.6ms, 1 assertions) windows-vs2022-Release
0% tests passed, 1 tests failed out of 1 windows-vs2022-Release

⚠️ Test Warnings (Known Flaky)

These tests are registered as known flaky and do not block the build:

Test Jobs
[19:47:15.841] [TID:6784] [WARN ] [Network ] RCON unknown command: nonexistent_cmd (DedicatedServer.cpp:573) windows-vs2022-Release
[19:47:15.858] [TID:6784] [WARN ] [Network ] NetBuffer::ReadUint8 — buffer overrun at pos 1 (size=1) (NetworkBuffer.c... windows-vs2022-Release
[19:47:15.881] [TID:6784] [WARN ] [AI ] BuildNavMeshWithRecast: empty geometry (RecastDetourBackend.cpp:35) windows-vs2022-Release
[19:47:15.881] [TID:6784] [WARN ] [AI ] NavMeshBuilder: Recast build failed, falling back to triangle-soup builder (N... windows-vs2022-Release
[19:47:15.881] [TID:6784] [WARN ] [Audio ] XAudio2 backend requested but no AudioEngine provided, falling back to Nul... windows-vs2022-Release
[ RUN ] FixedTimestep_M[19:47:15.902] [TID:6784] [WARN ] [Graphics ] No graphics backend available — falling back to ... windows-vs2022-Release
[19:47:15.902] [TID:6784] [WARN ] [Graphics ] No graphics backend available — falling back to NullRHIDevice (headless... windows-vs2022-Release
[19:47:15.907] [TID:6784] [WARN ] [Editor ] Cannot host: userName is empty. (CollaborativeEditSession.cpp:454) windows-vs2022-Release
[19:47:15.907] [TID:6784] [WARN ] [Editor ] Already connected. (CollaborativeEditSession.cpp:459) windows-vs2022-Release
[19:47:15.910] [TID:6784] [WARN ] [Editor ] BroadcastEdit rejected: nodeId is empty. (CollaborativeEditSession.cpp:1108) windows-vs2022-Release
[19:47:15.910] [TID:6784] [WARN ] [Editor ] BroadcastEdit rejected: sourceEditor is not set. (CollaborativeEditSessio... windows-vs2022-Release
[19:47:15.911] [TID:6784] [WARN ] [Editor ] SetLocalSelection rejected: nodeId exceeds 255 chars (length=300). (Colla... windows-vs2022-Release
[19:47:21.482] [TID:6784] [WARN ] [Network ] Connection rejected for pending client 5: server full (4/4) (NetworkConn... windows-vs2022-Release
[19:47:21.484] [TID:6784] [WARN ] [Network ] Invalid packet magic 0x6A0E5CB3 (expected 0x5350524B) (NetworkManager.cp... windows-vs2022-Release
[19:47:21.484] [TID:6784] [WARN ] [Network ] Invalid packet magic 0xC6BB6E5B (expected 0x5350524B) (NetworkManager.cp... windows-vs2022-Release

Updated: 2026-04-18T19:56:05Z — this comment is updated in-place, not duplicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants