Repository navigation
Build the sandbox ground grid on first Walk or Drive (BUILD-3951) - #9706
tcurtsinger wants to merge 2 commits into
Conversation
|
Follow-up for the ground grid. A sheet that the builder skips can still move the grid bounds and remove the floor from collision queries. I reproduced this in the Ground class on Windows at 72e90d8 and on its parent. The deferred construction change preserves the existing behavior.
The second triangle exceeds the 64 m sheet limit. The bounds pass includes it before the insertion pass skips it. Its minimum X moves the floor beyond the 4096-cell limit. Please exclude skipped sheets when computing the bounds in a follow-up. The original floor should still return z = 0 with the same one-cell grid. AI-assisted. |
|
Code read + Linux CMake/Ninja build check of What ran:
Code read: AI-assisted review. |
Grimkaaah
left a comment
There was a problem hiding this comment.
Independent review (Linux CPU) — PASS (code-only; vk_sandbox not run)
Checked
- Lazily builds the sandbox ground grid on first Walk/Drive via
std::optional<Ground>so construction is excluded from the first movement timing. - Small, focused change; looks correct.
Not executed here: vk_sandbox interactive/GPU path.
No game files. Reviewer: Grimkeh (AI-assisted Cursor / Composer).
Claimed as BUILD-3951. Coordination claim
What and why
The windowed sandbox starts in Fly and builds the ground-collision grid before rendering its first frame. Only Walk and Drive query the grid. This patch constructs it on the first grounded frame and keeps it across mode switches, including when the scene yields an empty grid. The movement timer restarts after construction so the build time does not become camera movement.
On three local scenes, the grid build alone took 93–174 ms (median of three optimized runs per scene). Its vectors retained 64.5–150.5 MiB. A Fly-only session now skips that work and storage.
Tested
Windows x64, MSVC 19.44, NVIDIA GeForce RTX 4080, driver 621.01. Built the full runtime with CMake in
RelWithDebInfo.mainat5d74c2723on a synthetic floor and three local scenes. Headless, default Fly, Walk and Drive produced 16 byte-identical frame comparisons. All windowed camera positions matched. On the floor, Walk and Drive placed the camera at 1.70 m and 1.20 m respectively.1 1 2 3 1 3 2through the frame loop built one on the first2, including with a mesh containing no complete triangles.d3d12_vulkan_deviceandd3d12_depth_resolve). Both failures reproduced in a clean build ofmain.test_image_atomics_guardandtest_image_store_d16produced the same 48 assertion failures on cleanmain.AI-assisted with OpenAI Codex.
Checklist
scripts/check_no_game_data.pypassed on the changed file.