Further reduce tile streaming aggressiveness

- Load radius: 4→3 (normal), 6→5 (taxi)
- Terrain chunks per step: 16→8
- M2 models per step: 6→2 (removed idle boost)
- WMO models per step: 2→1 (removed idle boost)
- WMO doodads per step: 4→2
- All budgets now constant (no idle-vs-busy branching)
This commit is contained in:
Kelsi 2026-03-07 22:55:02 -08:00
parent 7f573fc06b
commit f681a8b361
3 changed files with 7 additions and 7 deletions

View file

@ -344,7 +344,7 @@ private:
// Streaming parameters
bool streamingEnabled = true;
int loadRadius = 4; // Load tiles within this radius (9x9 grid = 81 tiles)
int loadRadius = 3; // Load tiles within this radius (7x7 circular ~29 tiles)
int unloadRadius = 7; // Unload tiles beyond this radius
float updateInterval = 0.033f; // Check streaming every 33ms (~30 fps)
float timeSinceLastUpdate = 0.0f;

View file

@ -1108,7 +1108,7 @@ void Application::update(float deltaTime) {
// Taxi flights move fast (32 u/s) — load further ahead so terrain is ready
// before the camera arrives. Keep updates frequent to spot new tiles early.
renderer->getTerrainManager()->setUpdateInterval(onTaxi ? 0.033f : 0.033f);
renderer->getTerrainManager()->setLoadRadius(onTaxi ? 6 : 4);
renderer->getTerrainManager()->setLoadRadius(onTaxi ? 5 : 3);
renderer->getTerrainManager()->setUnloadRadius(onTaxi ? 9 : 7);
renderer->getTerrainManager()->setTaxiStreamingMode(onTaxi);
}
@ -4041,7 +4041,7 @@ void Application::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
// Use a small radius for the initial load (just immediate tiles),
// then restore the full radius after entering the game.
// This matches WoW's behavior: load quickly, stream the rest in-game.
const int savedLoadRadius = 4;
const int savedLoadRadius = 3;
terrainMgr->setLoadRadius(1);
terrainMgr->setUnloadRadius(7);

View file

@ -816,7 +816,7 @@ bool TerrainManager::advanceFinalization(FinalizingTile& ft) {
}
bool allDone = terrainRenderer->loadTerrainIncremental(
pending->mesh, pending->terrain.textures, x, y,
ft.terrainChunkNext, 16);
ft.terrainChunkNext, 8);
if (!allDone) {
return false; // More chunks remain — yield to time budget
}
@ -858,7 +858,7 @@ bool TerrainManager::advanceFinalization(FinalizingTile& ft) {
std::lock_guard<std::mutex> lk(queueMutex);
workersIdle = loadQueue.empty() && readyQueue.empty();
}
const size_t kModelsPerStep = workersIdle ? 6 : 4;
const size_t kModelsPerStep = 2;
size_t uploaded = 0;
while (ft.m2ModelIndex < pending->m2Models.size() && uploaded < kModelsPerStep) {
auto& m2Ready = pending->m2Models[ft.m2ModelIndex];
@ -925,7 +925,7 @@ bool TerrainManager::advanceFinalization(FinalizingTile& ft) {
std::lock_guard<std::mutex> lk(queueMutex);
wmoWorkersIdle = loadQueue.empty() && readyQueue.empty();
}
const size_t kWmosPerStep = wmoWorkersIdle ? 2 : 1;
const size_t kWmosPerStep = 1;
size_t uploaded = 0;
while (ft.wmoModelIndex < pending->wmoModels.size() && uploaded < kWmosPerStep) {
auto& wmoReady = pending->wmoModels[ft.wmoModelIndex];
@ -1006,7 +1006,7 @@ bool TerrainManager::advanceFinalization(FinalizingTile& ft) {
if (m2Renderer && ft.wmoDoodadIndex < pending->wmoDoodads.size()) {
// Set pre-decoded BLP cache for doodad M2 textures
m2Renderer->setPredecodedBLPCache(&pending->preloadedM2Textures);
constexpr size_t kDoodadsPerStep = 4;
constexpr size_t kDoodadsPerStep = 2;
size_t uploaded = 0;
while (ft.wmoDoodadIndex < pending->wmoDoodads.size() && uploaded < kDoodadsPerStep) {
auto& doodad = pending->wmoDoodads[ft.wmoDoodadIndex];