Skip to content

Conversation

neon-nyan
Copy link
Member

@neon-nyan neon-nyan commented Sep 3, 2025

UpdateIsAvailable-Campaign

Hi there, it's neon-nyan here~

It's been almost 3 weeks since the last preview update. To commemorate Genshin Impact 6.0 (aka: Luna I) update, we have decided to use a new codename for this release as: "Luna"

With this release, we are bringing a long-awaited feature, the Plugin System. This will catapult the development of Collapse to become not only an exclusively third-party launcher for HoYoverse/miHoYo titles, but also others in the future.

Without further ado, let's get into details regarding this update!

What's New?

Plugin System for Other Non-miHoYo Titles Support, by @neon-nyan

3 Months, 9000+ of lines changes later, we have finally finished the first iteration of Plugin System implementation. For now, only basic functionalities implemented into this plugin system as per the v0.1-update1 API Standard, including:

  • Game Installation
  • Game Update/Preload

Note: Other features like Game Repair, Game Caches and Game Settings are going to be implemented in the future.

We are planning to make our own in-house plugins which will bring support to two games are expected to be finished once the Luna release releases to Stable:

  • Heaven Burns Red
    Developed and Maintained by: Collapse Project Team (@neon-nyan)
    Status: Completed
  • Wuthering Waves
    Developed and Maintained by: Collapse Project Team (@Cryotechnic)
    Status: Under Development

This implementation took more time due to a NativeAOT implementation of the system. We are trying to make the plugin to not only works inside of our code, but also usable for any code/launchers implementation out there (if they want to).

We are making the compiled plugin footprint as small as possible by removing any dependencies with .NET Reflections, stripping out .NET Runtime and implementing COM-Like interfaces to bridge the communication with plugins and the launcher, making the plugin compiled as a native library instead of a .NET standard library. With this, we are achieving 6-7 MB for the plugin library.

The plugin can be managed by using the Plugin Manager menu under the App Settings. Here's how it works:

2025-09-14.21-51-48.webm

PS: Plugin download for Heaven Burns Red will be available soon. Join our official Discord to get you hands on the early access~ 👀

Bring Back NativeAOT Build

Due to .NET issues in #104583, we are unable to ship NativeAOT build to preview. Fortunately, the latest .NET 9 Runtime comes with a fix and the UI hang issue has been fixed in most scenarios.

Publishing a NativeAOT Build brings some benefits, including faster cold start-up time, slight improvements on overall code performance (which relies on frequent inline calls) and smaller compiled code.

This demo shows an improvement to the cold start-up time while the launcher is launched. We took Stable v1.82.31 as a baseline to the comparison and as a result, old ILCompile build start-up finished in 916 milliseconds while NativeAOT build start-up finished in just 466 milliseconds.

ComparisonAOTvsNonAOT.webm

This also results in a much smaller build as most of the .NET runtime code are stripped. Here's the comparison of the build size between two builds (with debug symbols removed):

image

Revamp Post-Download Behavior Settings, by @gablm

We have added few options on how the launcher will do after game installation/update. You can also set the Download Speed Limit while performing game installation or update.

image

Cached API Response for Application-wide Functions, by @neon-nyan

Tired of waiting for the launcher to load up each of the regions? Now, you can make it faster. With the new HTTP Cache method, you can make game region loadings much faster (even almost immediate). Previously, this feature is only available for few functionality, including Game Repair and Cache Updates. Now, every API calls from the launcher can be cached so the launcher loads everything much-much faster.

2025-09-14.22-10-08.webm

What's Changed?

  • [Removed] Taking out CODING from CDN Mirror list
  • [Imp] Recompile Static Libraries with MSVC for NativeAOT builds, by @neon-nyan
  • [Imp] Update .NET components NuGet to 9.0.9, by @bagusnl @neon-nyan
  • [Imp] Update WindowsAppSDK to 1.8-stable, by @neon-nyan
  • [Imp] Improve DBHandler reliability and error handling, by @bagusnl
    • Implements a retry mechanism with exponential backoff for database operations
    • Adds detailed logging for debugging and troubleshooting
    • Uses internal methods for querying and storing data to streamline error handling
    • Integrates with Sentry for exception reporting
    • Improves stream expiration handling
  • [Imp] Decouple Hashing Extensions from Collapse Launcher's Main Code, by @neon-nyan
  • [Imp] Improve app-wide logger extensions, by @neon-nyan
    • Remove memory allocation entirely by writing string directly to Win32 handles
    • Add asynchronous variant for the overloads
    • Add DefaultInterpolatedStringHandler overload for passing interpolated string.
  • [Imp] Improve Sentry Logging, by @bagusnl
    • Now the telemetry will upload only the last 100 lines from the log instead of sending everything to Sentry. This will reduce time and guarantee the log is successfully sent for analysis.
    • If multiple errors occurs, the exceptions will be queued and sent one-by-one. This avoid collisions between other reports being sent at the same time.
  • [Imp] Improve I/O Performance on Sophon submodule, by @neon-nyan
    • Use OS-level file caching
    • Limit FileStream handle's access and share parameter
    • Automatically increase FileStream's buffer depends on target file size
    • Move ChunkStream.CopyToAsync into Task.Factory and run it synchronously in the background
    • Increase maximum buffer size budget on patch mode from 4 MiB to 32 MiB
    • Allocate only a certain amount of buffer based on target data size (this to avoid buffer overprovision, causing memory and CPU usage spikes)
  • [Fix/Imp] Ignore assets that marked as "unused/deleted" on ZZZ Game Installation/Update and Game Repair, by @neon-nyan
  • [Fix] NotSupportedException error while performing Game Repair on Honkai Impact 3rd and Honkai: Star Rail, by @neon-nyan
  • [Fix] Legacy Sophon won't recognize already existed files while installing games from scratch, by @neon-nyan
  • [Locale] Update Localizations for vn_VN, es_ES/419, ja_JP, id_ID, zh_CN, by Localizers ❤

transifex-integration bot and others added 30 commits June 29, 2025 17:20
100% reviewed source file: 'en_US.json'
on 'es_419'.
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
100% reviewed source file: 'en_US.json'
on 'id_ID'.
+ Add "Loaded Plugins Information" section on the "about" panel
+ (OOT) Change locale ID as flag
+ Fix crash on SettingsCard and SettingsExpander due to invalid MeasureOverride()
100% reviewed source file: 'en_US.json'
on 'es_419'.
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
100% reviewed source file: 'en_US.json'
on 'zh_CN'.
100% reviewed source file: 'en_US.json'
on 'id_ID'.
100% reviewed source file: 'en_US.json'
on 'zh_CN'.
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
100% reviewed source file: 'en_US.json'
on 'es_419'.
- Only assert in DEBUG
- Remove warning about CA2256 https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2256
- Remove unused field

Signed-off-by: Bagus Nur Listiyono <[email protected]>
- [SettingsCard] Break on Debug when s != null

Signed-off-by: Bagus Nur Listiyono <[email protected]>
Only shows plugin name, author and version for now
Of course it's not Microsoft if their code doesn't produce bugs :)
neon-nyan and others added 29 commits September 13, 2025 11:24
Also reduce overhead due to lookup on ResourceDictionary. Now the dictionary should be cached.
This is achieved by switching BitmapSource for the background image to WriteableBitmap. With this, we can access an immediate buffer on the image instance instead of re-reading it to Bitmap twice.

We also add an extension on Win32.WinRT submodule to cast IBufferByteAccess from WriteableBitmap.PixelBuffer (IBuffer) since it wasn't accessible from WindowsAppSDK out of the box
This was actually a really old bug that I just realized. In the meantime, I forgot to set all the API response cached so the caches always misses. With these changes, the loading of each regions will be instant if cache available (or with aggressive cache mode enabled)
Yeah, the compiler complains about goto but decided to say nothing on the logs WHATSOEVER. So we think this might due to SDK or NuGet update, but NO. The error was caused by this method where it calls goto statement to jump branch. used to invalidate the pointer.

WHAT
IN
THE
ACTUAL
FUCK
???
about 50% faster on checking Hi3 Cache (1.2ms -> 550ms) by not copying and casting the results twice
This fixes an issue where some games with no latest package for normal update (ex: Genshin) isn't available and Sophon sometimes didn't get forcefully applied.

This was caused by unfinished task after the URL is re-associated.
Also fixes Sentry commit release pinning
@neon-nyan neon-nyan merged commit 1690f2e into preview Sep 16, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants