Devlog/FPS Lab

FPS Lab 0.8.1 - LOD - UI - Prformance optimalization

FPS Lab v0.8.1 3 min read
FPS Lab 0.8.1 - LOD - UI - Prformance optimalization

Level of Detail — the whole feature, in five phases

Mesh objects can now carry cheaper stand-in geometry. LOD0 stays SceneObject::mesh; the extra levels live in a new lods list, each with the relative screen height below which it takes over. Screen height rather than distance was deliberate — the same 30 m can't mean the same thing for a pebble and a cathedral, or for a 60° and a 90° FOV (core/Lod.h). Pieces that landed:

Performance: the hierarchy stopped being quadratic

Object identity is a string and lookup was a linear scan — on the 709-object Gomenstein3D scene that came to 2.66 million string comparisons per frame. Two fixes, neither of which asks anything of the ~100 places that mutate objects_: a validate-on-read id → index accelerator (99.97% hit rate; a stale entry costs a scan, never a wrong answer), and a one-pass first-child/next-sibling chain for the Hierarchy tree.

Two-column Project browser

The bottom Project tab is now a folder tree │ folder contents │ asset inspector layout: breadcrumb, search-scope chips (whole project vs. this folder), list/grid view with an icon-size slider, draggable splitter, F2 rename, reveal-an-asset, Alt+click recursive expand. Folders are scanned lazily — only what's open. It moved out of AppUI.cpp into its own AppProjectPanel.cpp with the path/geometry rules as testable free functions.

Editor & runtime odds and ends

Get FPS Lab Comment on itch.io FPS Lab overview