ROUNDS
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
1.9K
Size
137KB

⚡ RoundsDashLoader — Universal Startup & Performance Optimizer for ROUNDS

ROUNDS Version BepInEx Status Performance

RoundsDashLoader is a comprehensive, standalone startup accelerator and combat anti-stutter mod for ROUNDS, inspired by the renowned DashLoader optimization architecture.

In heavily modded modpacks (50 to 160+ mods with hundreds of custom cards and maps), ROUNDS startup typically stalls for 15 to 45 seconds due to redundant reflection, uncompressed texture decoding, splash delays, rogue unpatch calls, and garbage collection freezes.

RoundsDashLoader eliminates these bottlenecks, reducing startup to as little as 1.49s - 2.29s and keeping in-game combat 100% fluid and stutter-free.


🌟 What's New in v1.1.1

  • 🚀 Smart Asynchronous Streaming Pipeline: Configured with a 128 MB texture stream buffer and tuned upload time-slices to eliminate frame drops and memory spikes during heavy modpack loads.
  • 🛡️ Zero Menu Freezes & Safe Scene Transition: Rewrote IntroAndMenuSkipPatch with non-blocking execution and safe menu binding without destroying video gameobjects or blocking Update().
  • ⚡ Eliminated Redundant Shader Compilation: Removed blocking shader warmup loops that previously stalled CPU for 15+ seconds compiling thousands of redundant shader combinations.
  • 🧹 Combat GC Lifecycle Protection: Dynamically pauses Mono Garbage Collection during intense combat rounds to eliminate micro-stutters, cleanly resuming GC collections during round transitions and card draft.
  • 📦 EveryonePicks Board Transpiler: Automatically aligns the PickBoard HUD safely away from custom card cards, keeping draft screens clean and readable.
  • 💾 Main Menu RAM Optimization: Flushes temporary raw texture byte arrays from RAM immediately upon reaching the Main Menu.

🚀 Key Optimization Pillars

1. 🧠 Harmony Reflection Fast-Path Cache (HarmonyTypeCachePatch)

  • The Problem: Modded profiles trigger AccessTools.TypeByName dozens of times during boot. HarmonyX iteratively scans the entire 15+ MB MMHOOK_Assembly-CSharp.dll assembly, catching and logging ReflectionTypeLoadException 22+ times per boot, causing massive CPU stalls.
  • The Solution: RoundsDashLoader intercepts AccessTools.GetTypesFromAssembly, AccessTools.TypeByName, and member lookups:
    • Caches Type[] references per assembly in a thread-safe ConcurrentDictionary (assemblies are scanned exactly once).
    • Subsequent type and member lookups operate at $O(1)$ in memory rather than traversing all loaded assemblies.

2. ⏩ Zero-Frame Splash & Video Bypass (SplashScreenPatch & IntroAndMenuSkipPatch)

  • The Problem: Unity hardcodes splash delays followed by SkipIntro waiting for Landfall intro video buffers and animations (total ~4.5s delay).
  • The Solution: Instantly flags SplashScreen.isFinished = true and invokes SkipIntro.Skip() on frame 0, bypassing both the splash screen and intro videos and dropping players straight into the interactive Main Menu.

3. 🥊 Combat GC Lifecycle & Anti-Stutter (CombatOptimizationPatch)

  • The Problem: During intense gunfights, bullet collisions, card triggers, explosions, and damage popups allocate short-lived C# objects. Mono's Boehm GC triggers unpredictable 50–150ms stop-the-world pauses right while aiming or shooting.
  • The Solution:
    • During Active Combat (GM_ArmsRace.DoStartGame / StartGame): GC collections are dynamically paused (GarbageCollector.GCMode = Disabled). Zero frame drops, zero microstutters during gunfights.
    • Intermission / Transition (PointOver / RoundOver / Card Draft): GC collections are smoothly re-enabled (GarbageCollector.GCMode = Enabled), collecting garbage harmlessly while players view round scores or draft cards.

4. 📦 High-Throughput Asynchronous Streaming (MainMenuHandlerPatch)

  • Sets QualitySettings.asyncUploadBufferSize = 128 (128 MB persistent buffer) and asyncUploadTimeSlice = 16ms to prevent allocation churning when streaming card art.
  • Sets Application.backgroundLoadingPriority = ThreadPriority.High for seamless texture loading.

5. 🖼️ Raw Texture Stream & 64-Bit FNV-1a Hashing (TextureCachePatch & FastHashUtil)

  • Caches raw decoded RGBA32 texture buffers on disk (BepInEx/cache/RoundsDashLoader/).
  • Uses a high-throughput 64-bit FNV-1a hash algorithm (> 6,400 MB/s throughput) to identify repeat textures and stream raw buffers directly to GPU memory via LoadRawTextureData, bypassing expensive repeat PNG decompression.

⏱️ Real-World Benchmark Results (Heavy 160+ Modpack)

Benchmark / Subsystem Vanilla / Without Mod RoundsDashLoader v1.1.1 Speedup Factor Real Time Saved
MMHOOK Reflection Churn (30 queries) 193.79 ms 5.60 ms 34.6x FASTER ~188.2 ms CPU stall saved
Texture Hashing Throughput (20 textures) 22.49 ms (SHA256) 0.78 ms (FNV-1a) 28.8x FASTER > 6,400 MB/s throughput
Disk Cache Raw Read (20 textures) 7.39 ms 4.93 ms 1.5x FASTER Direct raw memory blit
Splash Screen & Intro Video Wait 4.50 s (2.5s + 2.0s) 0.00 s (Frame 0) INSTANT 4.50 seconds eliminated
Harmony Member Lookups Cache (200 queries) Uncached reflection search 21.7 µs / call 100% Hit Rate Zero reflection lag
Photon Reflection Type Exceptions Fatal crash (TypeInitException) Clean 0 exceptions 100% Fixed 9,034 types resolved
Total Cold Boot Time (Heavy Modpack) ~15.0 – 25.0 s ~2.2 – 3.5 s ~5x – 8x FASTER Up to 20+ seconds

🎮 In-Game Watermark & Telemetry

  • Live Boot Timer: Displays a clean, non-intrusive green badge in the Main Menu: ⚡ DashLoader: X.XXs boot (showing the exact cold boot time to readiness).
  • Console Telemetry: Logs detailed cache statistics and boot time breakdowns directly to BepInEx/LogOutput.log.

🛠️ Installation

Works seamlessly with Thunderstore Mod Manager, r2modman, and Gale:

  1. Install via your mod manager or download RoundsDashLoader-1.1.1.zip.
  2. Extract into ROUNDS/BepInEx/plugins/ (or use your mod manager).
  3. Launch ROUNDS!

🧩 Compatibility

  • Dependencies: None! Only requires base BepInExPack_ROUNDS.
  • Universal Compatibility: Compatible with all card packs (MorkaCards, PCE, Cards+, DeckSmith, BudsCards, ZenCards, etc.), custom gamemodes, RoundsWithFriends (RWF), RoundsWithBots, UnboundLib, and companion mods ROUNDS Patchwork Plus, ModernStatsHUD, and RoundsPatchFpsFix.

📜 License

Released under the MIT License. Built for the ROUNDS modding community with ❤️.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.