// Management · RimWorld Mod

RimSmooth - 边缘流畅优化

RimSmooth - Edge Smooth Optimization Does your game become increasingly laggy as it progresses?

RimSmooth - Edge Smooth Optimization
Does your game become increasingly laggy as it progresses? Does the frame rate plummet when your colony is fully populated? This mod comprehensively optimizes from 10 dimensions including building, rendering, pathfinding, AI, and data structures, ensuring your colony runs smoothly even at full capacity.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
【1】Building Tick Throttling
Many buildings perform unnecessary updates every frame. This optimization reduces their update frequency on demand:
· Artworks/Statues: Updated once every 30 frames (originally every 6 frames)
· Shelves, Bookshelves, Equipment Racks, Thrones, Nuclear Waste Processors, Instruments: Updated once every 15 frames
· Rage Inducers, Sleep Suppressors, Proximity Detectors: Already low-frequency checked; throttling is safe
· Gene Assemblers, Bio Iron Harvesters: Originally checked every 250 ticks; throttling is safe
· Void Boulders, Containment Platforms, Gravity Engines: Visually/event-driven; throttling is safe
· Ancient Mech Remnants, Steam Geysers: Purely visual + audio; throttling is safe
· Flesh Hearts, Batteries: Heartbeat/timer slightly delayed, core functionality unaffected
· Each building type can be independently enabled or disabled
【2】Faction Behavior Optimization
The game uses a Lord system to manage faction behaviors such as raids, caravans, and visitors:
· Faction Index Acceleration: Direct dictionary lookup instead of sequential traversal search
· Idle Faction Throttling: Idle factions do not require frame-by-frame updates; automatically reduced frequency
【3】Health Interface Caching
· When opening the health panel, all values are calculated only once per frame, eliminating redundant computations
· Recursive ability values (e.g., Manipulation → Movement → Consciousness) are cached layer-by-layer to avoid repeated calculations
【4】Rendering Optimization
· Viewport Clipping: Non-visible objects outside the screen are not rendered, significantly reducing GPU load
· Visual Caching: Mesh data is not rebuilt redundantly within the same frame
· Update Clipping: Mesh updates are not performed for regions outside the viewport
【5】UI Rendering Optimization
· Occlusion Culling: UI elements obscured by full-screen panels are skipped during rendering
· Temperature Display Caching: Mouse-hovered temperature information is not queried redundantly within the same frame
【6】Pathfinding Optimization
· Path Caching: Identical pathfinding requests return cached results, avoiding redundant calculations
· Path Heatmap: Tracks high-frequency paths to provide data for subsequent optimizations
· Flame Tile Indexing: Direct flame position lookup instead of grid-by-grid search
· Door switches automatically clear path caches to ensure pathfinding accuracy
【7】Data Structure Optimization
· Colonist List Caching: Lists are updated directly when colonists are added/removed, avoiding full rebuilds
· Disease Index: Dictionary replaces linear search to accelerate disease/injury queries
· Item List Removal Optimization: Elements to be deleted are swapped to the end before removal, avoiding sequential search
· Faction Relationship Index: Dictionary replaces traversal for accelerated faction relationship queries
· Weather/Event Index: Dictionary replaces traversal for accelerated conditional queries
【8】Incremental Update Optimization
· Resource Counters: Numbers are updated directly when items are added/removed, avoiding full recalculation every 204 ticks
· Wealth Statistics: Extended full recalculation interval to reduce unnecessary computations
· Movable Items List: Reduced polling frequency, updated only when changes occur
· Affinity: Extended full recalculation interval
【9】AI and Caching Optimization
· Mood Calculation Caching: Colonists' mood scores are remembered; recalculations occur only when moods change
· Corpse Throttling: Corpses do not require \"thinking\"; unnecessary ticks are skipped
· Region List Incremental Maintenance: Only changed regions are updated, avoiding full map scans
· Environmental State Caching: Cached results for room and decay rate queries
【10】Tick Distribution Optimization
· Uniform Distribution: Updates for all objects are evenly spread across each frame to prevent sudden frame stutters
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Safety Features:
· All 26 features can be independently enabled/disabled without mutual interference
· All caches have automatic cleanup mechanisms: Cleared upon map removal/archive switching/character death
· All caches have periodic cleanup and size limits to prevent memory leaks
· Reflection Access Protection: Automatically disables corresponding features if game version updates cause missing fields, preventing mod-wide crashes
· In-game settings panel with instant effect application, no restart required
· Problematic features can be disabled at any time
Compatibility:
· Perfectly compatible with RimMT (RimWorld Multi-Threading); enhanced performance when used together
· Compatible with Dead Man's Switch: Automatically excludes humanoids when detected, preventing colony list anomalies or unopenable work tabs; all 26 features can be used simultaneously