Files
VoxelEngine/Core/Configuration.cs
MDietermann 2c95c7831a feat: weight vertical distance in chunk-load priority
Adds Configuration.VerticalPriorityWeight (default 4). The priority
formula in ChunkStreamer.RecomputeTargetSet now uses
dx^2 + dz^2 + dy^2 * VerticalPriorityWeight, so horizontal chunks at
the player's Y are dispatched before equally-distant chunks above or
below. Fixes janky loading where deep-underground chunks were
competing with surface chunks for early dispatch slots.
2026-06-01 13:41:55 +02:00

27 lines
1.0 KiB
C#

namespace VoxelEngine.Core;
public sealed class Configuration
{
public int RenderDistanceHorizontal { get; set; } = 8;
public int RenderDistanceVertical { get; set; } = 2;
public int SpawnReadyRadiusHorizontal { get; set; } = 1;
public int MaxGenerateJobsInFlight { get; set; } = 8;
public int MaxMeshUploadsPerFrame { get; set; } = 4;
public int WorkerThreadCount { get; set; } = Math.Max(1, Environment.ProcessorCount / 2);
// Multiplier applied to (dy)^2 in chunk-load priority. >1 prioritizes
// chunks at the player's Y over equally-distant chunks above/below, so the
// visible surface fills in before far-underground / overhead chunks.
public int VerticalPriorityWeight { get; set; } = 4;
public float MoveSpeed { get; set; } = 8f;
public float MouseSensitivity { get; set; } = 0.15f;
public float Fov { get; set; } = 60f;
public int WindowWidth { get; set; } = 1280;
public int WindowHeight { get; set; } = 720;
public int? Seed { get; set; } = null;
}