-
-
Notifications
You must be signed in to change notification settings - Fork 2
Features
Every optimization in Optimum v0.2.8. Each one produces identical gameplay to vanilla. The only observable difference is higher and steadier FPS.
Precise Frame Pacing. Vanilla uses Thread.Sleep(1) for frame limiting, which overshoots by 1-15ms depending on the OS timer resolution. Optimum replaces this with a three-stage loop: sleep while far from target, yield when close, spin for the final microseconds. Frame times become consistent and micro-stutter disappears. Togglable in settings.
Background FPS Limiter. When the game window loses focus (alt-tab), Optimum caps the client at 30 FPS. The GPU and CPU drop to near-idle. Togglable in settings.
Entity Shadow Distance Culling. Shadows for entities beyond a configurable distance (default 80 blocks) stop drawing. Shadow maps are expensive per-entity, and shadows beyond this range are invisible to the player. The distance slider in settings controls the threshold.
Shadow Far Vegetation Skip. The far shadow cascade renders vegetation (BlendNoCull pass) into a shadow map that covers terrain at extreme range. At that distance, foliage shadows contribute nothing visible. Optimum skips vegetation in the far cascade. Togglable in settings.
Dynamic Light Radius Scaling. The held-item dynamic light (torch, lantern) uses a fixed 120-block radius in vanilla. Optimum scales it to 35-60 blocks based on your view distance setting. A 120-block light sphere on a 64-block view distance wastes GPU time illuminating chunks that do not exist on screen.
Animated Block LOD. Block entities with animations (forges, querns, crucibles, mechanical components) update their animation at three distance tiers. Close blocks animate at full rate. Medium-distance blocks tick at half rate. Far blocks tick at quarter rate. The visual difference at distance is imperceptible, but the CPU cost of skeletal animation drops proportionally. Togglable in settings.
Chiseled Block LOD. Chiseled blocks carry full vertex meshes (up to 15,000 vertices per block for complex sculptures). Optimum uses the engine's native lodLevel system to render distant chiseled blocks as simplified geometry. Near blocks render at full detail. Far blocks drop to a solid cube. 83x vertex reduction for distant chiseled chunks in builds with heavy microblock use. Togglable in settings.
Entity Render Distance Pre-Cull. Before computing the model matrix, shader uniforms, and UBO joint copy for an entity, Optimum checks squared distance against view distance. Entities beyond range skip the render call entirely. At 200 loaded entities, this saves 6-15 microseconds per frame in the opaque render pass.
Entity Light Batch. Vanilla resolves chunk light levels per entity, per frame, acquiring a lock and allocating each time. Optimum collects sample coordinates from all visible entity renderers after each frame, groups them by chunk, and resolves them in a single batched pass under one lock acquisition per chunk segment. Zero per-frame allocation. 42-67% CPU reduction for the light lookup path at 32-512 entities.
Shader State Cache. Vanilla uploads viewMatrix and waterWaveCounter to the GPU and resolves the Animation UBO for every entity, every frame. Optimum uploads once per render pass and exposes the cached state through client API. Each renderer reads the cache when shader and pass match. 83% reduction in uniform upload and UBO lookup cost at 32+ entities.
Name-Tag Frustum Reuse. Vanilla runs a frustum visibility check per HUD element per entity (name tag, health bar, debug info). Optimum reuses the entity.IsRendered flag set during the render pass instead of recomputing SphereInFrustum per entity per frame.
Water Foam Grid Reduction. Foam edge detection on water and lava surfaces uses a depth comparison grid. Vanilla samples a 5x5 area (25 depth reads per water fragment). Optimum shrinks this to 3x3 (9 reads). The foam edge is slightly sharper but visually indistinguishable in motion. In scenes with significant water coverage (ocean biomes, rivers), this saves millions of texture reads per frame.
Repulsion Distance Gate. Client-side entity repulsion physics (the force that prevents entities from overlapping) skips entities beyond a configurable range (default 64 blocks). Repulsion at that distance has zero visual impact because the entities are too small to see overlap. The distance slider in settings controls the threshold. Togglable.
Animation Check Reorder. Vanilla tests frustum visibility before testing distance for entity animation updates. Frustum intersection is more expensive than a distance squared comparison. Optimum reverses the order: test distance first, skip the frustum check if the entity is already too far. The result is identical (same entities get animated), the cost is lower.
Weather Wind Throttle. Wind calculations (used for grass/leaf sway, particle drift, ambient audio panning) run every frame in vanilla. Optimum caches the result and reuses it for 4 frames. Wind changes slowly enough that a 66ms stale value is imperceptible. Togglable in settings.
Particle Distance Gate. Particle emitters beyond 48 blocks stop spawning. At that range, individual particles are sub-pixel and invisible. Reduces CPU and GPU load in chunk-dense areas with many forges, campfires, and torches. Togglable in settings.
Ambient Sound Position Gate. When the player stands still, ambient sound source positions do not change. Vanilla recalculates them every frame regardless. Optimum skips the update when the player position delta is zero.
Fly Sound Volume Deduplication. The flight/glide sound adjusts volume based on velocity. Vanilla pushes a new volume value to the audio engine every frame. Optimum skips the update when the delta is below 1%. The audio engine cannot reproduce sub-1% volume differences through speakers.
Server GC with DATAS. Optimum switches the client from Workstation GC to Server GC with Dynamic Adaptation To Application Sizes (DATAS). Server GC collects 73% fewer times and promotes zero objects to Gen1 under allocation pressure. DATAS prevents unbounded heap growth on machines with limited RAM. Mean throughput trades roughly 10% for reduced P99 frame spikes caused by Gen2 collections.
BlockPos Reuse in Particle Ticks. Ticking blocks spawn particles in a loop. Vanilla allocates a new BlockPos struct per particle per tick. Optimum reuses a single BlockPos instance across the loop, zeroing GC pressure from this path.
Mat4f.Multiply Inlining. Thirteen hot 4x4 matrix methods (Multiply, Translate, Scale, Rotate, etc.) carry [MethodImpl(AggressiveInlining)]. These methods run 50,000+ times per frame during entity rendering and mesh transforms. The inlining hint eliminates call/ret overhead and enables the JIT to fold the multiplication into the caller.
Optimum ships modified GLSL shaders in assets/game/shaders/. These replace the vanilla shaders at deploy time. They produce identical visual output to vanilla (or output within rounding error) and have no runtime toggle.
-
godrays.fsh: sample count capped by quality level -
chunkshadowmap.fsh: alpha discard threshold raised from 0.02 to 0.15 -
cloudvolumetric.fsh: march steps capped at 100 (vanilla: 200) -
chunkliquid.fsh: 3x3 foam grid (vanilla: 5x5)
Version 0.2.4 shipped SSAO and bloom blur shaders (bilateralblur, blur) that darkened the scene. Version 0.2.5 removed them.
#9710: Mouse Wheel at Low Sensitivity. Vanilla casts the high-precision wheel delta to int before applying sensitivity. At sensitivity values below 1.0, the int truncation creates dead zones where scrolling does nothing. Optimum keeps the float precision through the full calculation chain.
#8874: Prospecting Dialog Mouse Capture. The prospecting results dialog registers mouse click handlers but does not deregister them when closed. After closing the dialog, clicks get consumed by the invisible handler. Optimum skips disabled composers in the GuiDialog bounds check.
#8901: Health Tooltip Decimal. The health tooltip formats max health as an integer, hiding the decimal. When max health is not a whole number (e.g. 14.5 from armor), the tooltip rounds down. Optimum shows the decimal.
Background FPS Focus Debounce. The background FPS limiter fired during world load when the window flickered focus state. Optimum adds a 300ms debounce before clamping to the background cap, preventing false triggers during loading screens and rapid alt-tab sequences.
Frame Pacing Timer Resolution. The spin-loop tail used unconditional busy-spin on all hardware. On machines with 5 or fewer cores, this starved other threads. Optimum gates the spin tail behind Environment.ProcessorCount > 5 and calls timeBeginPeriod(1) on Windows for 1ms sleep resolution.
VS Roofing LOD Fix. Roof blocks from VS Roofing 1.6.3 use BlockEntityMicroBlock but set canChisel = false. The chisel LOD gate checked canChisel with a default of true, replacing roof meshes with cubes. Optimum reads the attribute and skips LOD substitution when false.
Linux Font Rendering. Optimum recompiled cairo-sharp.dll from source, producing different codegen than Anego's build. Glyph shapes (the "pointy g" report) differed on Linux. Optimum now ships vanilla's pristine cairo-sharp.dll and .pdb without modification.