Debugging
Verifying terrain visibility, headless collision testing, and common problems.
Terrain Visibility Self-Check
GalaxyEggbertCnaGame::Draw() includes a one-shot self-check: it samples a 5×5 grid
of on-screen pixels via GetBackBufferData() and counts how many show real terrain
color vs. the sky-blue clear color. A healthy run shows most sampled points with real terrain
color across many distinct colors — confirming actual texture sampling, not a placeholder or a
fully-blue (empty) screen.
Headless Collision Verification
cmake --build build-cna --target VerifyBlupiMovement
./build-cna/VerifyBlupiMovement
tools/VerifyBlupiMovement.cpp links only GEBlupiController.cpp (no
CNA/Easy3D dependency) and scripts movement scenarios without a live window — the fastest way
to debug step-up/gravity/collision logic in isolation.
Worlds Data Model Tests
cmake -S . -B build-cna -DBUILD_TESTING=ON
cmake --build build-cna --target GalaxyEggbertWorldsTests
ctest --test-dir build-cna --output-on-failure
Common Problems
| Symptom | Likely Cause | Fix |
|---|---|---|
| Solid blue screen, no terrain | Binary not run from its build directory, so relative asset paths fail | Run from inside build-cna/ |
| Texture seams between tiles | Atlas pitch miscalculated (64 px vs. real 65 px pitch) | Check GETileAtlas's grid registration — see the 2026-07-04 bug fix note on its class page |
| Invisible collision point falls through floor | World-center offset mismatch between renderer and controller | Both must use the same kWorldCenterX/Z = 50 |
| CMake link errors (duplicate symbols) | Easy3D configured before CNA | Reconfigure from a clean build dir, CNA first |
| Test suite fails to build | GoogleTest not fetched | Ensure network access during first CMake configure, or check BUILD_TESTING=ON |
GDB
cd build-cna
gdb ./GalaxyEggbertCNA
(gdb) run
# On crash:
(gdb) bt