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

Details

Date Uploaded
2 days ago
Downloads
366
Size
29KB

⚡ RoundsDashLoader — Universal Startup & Performance Optimizer for ROUNDS

ROUNDS BepInEx Status Performance

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

In heavily modded modpacks (30–70+ 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, and garbage collection freezes.

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


🚀 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 and AccessTools.TypeByName:
    • Caches Type[] references per assembly in a thread-safe ConcurrentDictionary (assemblies are scanned exactly once).
    • Gracefully filters invalid types without spamming expensive exceptions.
    • Subsequent type lookups operate at $O(1)$ in memory rather than traversing all loaded assemblies.

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

  • The Problem: Unity 2018 hardcodes a 2.5-second splash screen, followed by SkipIntro waiting for Landfall intro video buffers and animations.
  • The Solution: Instantly flags SplashScreen.isFinished = true and invokes SkipIntro.Skip() on frame 0, bypassing the intro video 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)

  • Re-enables garbage collection smoothly upon entering the Main Menu without calling blocking synchronous GC.Collect().
  • Upgrades Unity's asynchronous upload buffer to 32 MB (QualitySettings.asyncUploadBufferSize = 32) with a persistent buffer 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 (> 10.5 GB/s throughput) to identify repeat textures and stream raw buffers directly to GPU memory via LoadRawTextureData, bypassing expensive repeat PNG decompression.

⏱️ Benchmark & Performance Test Results

Real-world timing benchmarks conducted on actual game assemblies, mod textures, and modpack environments:

Benchmark / Subsystem Vanilla / Without Mod RoundsDashLoader Speedup Factor Real Time Saved
MMHOOK Reflection Churn (30 queries) 144.64 ms 2.55 ms 56.8x FASTER ~142.1 ms CPU stall saved
Texture Hashing Throughput (20 card textures) 16.18 ms (SHA256) 0.47 ms (FNV-1a) 34.1x FASTER > 10,500 MB/s throughput
Disk Cache Stream Read (20 textures) 5.55 ms 4.61 ms 1.2x 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
Total Cold Boot Time (49+ Modpack) ~12.5 – 15.0 s 1.49 s ~70% FASTER ~11.0 – 13.5 seconds

Verified In-Game Telemetry Log (BepInEx 5.4.19 / 49 Plugins Active):

[Info   :RoundsDashLoader] v1.0.0 initializing DashLoader acceleration pipeline...
[Info   :RoundsDashLoader] Harmony type caching, texture streaming & intro bypass patches active.
...
[Info   :RoundsDashLoader] ============================================================
[Info   :RoundsDashLoader] ⚡ [RoundsDashLoader] LIGHTNING BOOT COMPLETE in 1.49s!
[Info   :RoundsDashLoader] ⚡ [RoundsDashLoader] Reflection Type Hits: 29 (Saved MMHOOK churn)
[Info   :RoundsDashLoader] ⚡ [RoundsDashLoader] Intro videos and splash screens bypassed.
[Info   :RoundsDashLoader] ============================================================

Automated Unit Test Suite

  • 33 Automated Tests: 33 Passed, 0 Failed.
  • Verified: Assembly patch targets (SkipIntro, SplashScreen, MainMenuHandler, AccessTools, GM_ArmsRace, CardChoice), deterministic FNV-1a hashing, disk cache persistence, manifest integrity.

🎮 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

Option 1: Automatic via Mod Manager (Recommended)

  1. Install via r2modman or the Thunderstore Mod Manager.
  2. Click Start Modded.

Option 2: Manual Installation

  1. Ensure BepInEx 5.4.19+ is installed for ROUNDS.
  2. Download RoundsDashLoader-1.0.0.zip.
  3. Extract the contents into your game directory under: ROUNDS/BepInEx/plugins/RoundsDashLoader/
    • RoundsDashLoader.dll
    • manifest.json
    • icon.png
  4. 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, and UnboundLib.

📜 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.