Hello everyone, it really has been a while.
Been busy both online as offline, and trying to spend more time offline with my family and friends.
This post will be a quite technical since a lot of complicated issues have been going on behind the scenes.
Sorry for the delay!
Before we get started
Since I haven't done this for a while, here is a song recommendation that I've been listening to on repeat while programming Haru:
While the current SPT-AKI team was working on the server, it became very clear that development could not continue without migration to TypeScript.
The project has reached a state where the source code became unmaintainable, and this needs an immediate fix.
The migration towards TypeScript has been successful, but there is plenty of unstable and untested code, as well as a lot of duplication.
When will the server be stable enough? No clue since my involvemnt with SPT-AKI is very limited, but I know for sure that it won't be early.
It won't be happening. After the SPT-AKI team moved to BepInEx, I could no longer reliably protect the bundle loading mechanism due to BepInEx's feature of assembly prepatching (meaning my security can get patched out before I get a chance to validate it).
I've considered: 我考虑过如下的备选方案：
– implementing request counting
– server masking with request piping (running a hidden server so modders can't modify it)
– runtime compilation of C# scripts sent over by the server (dropped because its a huge security risk)
– improving the existing login system to block requests from outside the game
– server endpoint randomization to prevent endpoints from being discovered
– using C++ to directly inject bundles into Unity (very difficult)
While this all combined would make for a very hardened loading mechanism, it has a glaring issue:
NinjaRipper could just be used to extract the models and textures.
There is no way I can detect this program reliably.
And thus, I dropped it.
In the past 3 weeks I've been working on the project (mostly) in silence, with guiding advice of the SPT-AKI team.
After many long nights of hard work and many energy drinks, the project has reached the major milestone of being able to boot into the game and reaching the main menu.
This is quite a feat since I am writing everything from scratch, no previous code is being borrowed or reused.
Currently I am refactoring the server together with Shirito with the
advice from Alex and Waffle.Lord to conform to more enterprise-level
programming standards, such as usage of Dependency Injection (DI),
seperation of concerns, following SOLID principles and the likes.
After pondering for a long time and discussing these issues with members from the SPT-AKI team, I decided to go for the following principles:
– run the server embedded into the client (users don't need to start the server anymore)
– use enterprise patterns and principles (avoid architecture mistakes of SPT-AKI)
– load data from memory, not disk (improves performance heavily)
– core project is self-contained (only rely on EFT assemblies)
– only provide the bare minimum (allow others to write plugins to expand on functionality)
– use testing to ensure stability
– no backwards compatability with Aki (reduces complexity)
These have been (partially) implemented and are functional.
As impressive as all of these points sound, it has impact on the end-user in significant ways:
– Haru is never going to reach feature-parity with Aki. Modders will have to port over functionality or write an even better system than Aki provides. This is a concious decision to reduce complexity (Aki is tremendously complex!) and allow further customization of the experience.
– Save files cannot be transfered over (incompatible data layout)
– Complex mods will be much easier to write, but simple mods will require more effort (C# vs JS)
-复杂的模组编写会更简单，但是简单的模组编写会更困难一些（C# vs JS）
Will Haru be open-source? I do not know.
To be frank, the contributions made on Aki are… always appriciated but rarely of good quality which adds up over time.
I don't like having my code stolen either, so I'll have to enforce signed commits before releasing it so I can prove all the hard work I've done to be mine.
For now, the license is CC BY-NC-ND 4.0, you can see on Creative Commons official website (
目前，Haru的许可证是CC BY-NC-ND 4.0, 具体可以在Creative Commons官网[链接]查看该许可证具体囊括什么。