The Performance Updates: Difference between revisions

From Resonite Wiki
Rewrite a bit
Rewrite more
Line 1: Line 1:
(This article is written in past-tense even though the performance updates have not been released yet)
The performance updates are a series of updates in response to [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/706 Issue 706].
 
The performance updates are a series of updates made to the game in response to [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/706 Issue 706].


== The Issue ==
== The Issue ==
Prior to the issue being closed, the game used a single Unity process which ran [[FrooxEngine]] in a MonoBehavior (Unity component).
The main goal of the performance updates is to separate FrooxEngine from Unity so that FrooxEngine can benefit from a faster runtime in .NET 9+.
 
The main issue with this was that if Unity crashed it would take down FrooxEngine with it.


The game when running under Unity was using a C# runtime called "Mono", which was very slow. The performance updates would change the runtime to .NET 9.
Prior to separation, if Unity crashes it takes down FrooxEngine with it. Another problem is that Unity uses a slower runtime called Mono which reduces the performance of FrooxEngine considerably, as it runs FrooxEngine in a MonoBehavior (Unity component).


== The Solution ==
== The Solution ==
Frooxius decided to create a series of updates that were separated into different parts. The main focus of the updates were to separate Unity and FrooxEngine by bringing things simulated partly by Unity fully into FrooxEngine.
Frooxius has devised a series of updates separated into different parts. Each stage brings more systems from Unity into FrooxEngine. These are pre-requisites for the separation.


These major Steps were:
The major steps:
* [[PhotonDust]] (Particles update)
* [[PhotonDust]] (Particles update) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/587 Issue 587]
* [[Awwdio]] (Audio update)
* [[Awwdio]] (Audio update) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2430 Issue 2430]
* Unity Connectors -> Inter Process Communication (Last stage and final release)
* Unity Connectors -> Inter Process Communication (Last stage and final release)


These updates changed core components of the game, and allowed FrooxEngine to work as entirely standalone without relying on Unity for audio or particles. The game engines were then separated into two separate processes. Resonite now boots directly, and boots it's render engine as a separate EXE. FrooxEngine then sends data into a shared memory file, which the render engine accesses.
These updates change core components of the engine, and allow it to work entirely standalone without relying on Unity.


This change allowed FrooxEngine (A now separate exe) to have it's code compiled into a new runtime (same code different executor). This marked a major turning point in the game, and also allowed for more freedom when making systems or new content.
The engines will be separated into different processes and communicate via a shared memory file.


== Resources ==
== Resources ==
<youtube>https://www.youtube.com/watch?v=9cx2-VtL_LM</youtube>
<youtube>https://www.youtube.com/watch?v=9cx2-VtL_LM</youtube>

Revision as of 11:59, 11 June 2025

The performance updates are a series of updates in response to Issue 706.

The Issue

The main goal of the performance updates is to separate FrooxEngine from Unity so that FrooxEngine can benefit from a faster runtime in .NET 9+.

Prior to separation, if Unity crashes it takes down FrooxEngine with it. Another problem is that Unity uses a slower runtime called Mono which reduces the performance of FrooxEngine considerably, as it runs FrooxEngine in a MonoBehavior (Unity component).

The Solution

Frooxius has devised a series of updates separated into different parts. Each stage brings more systems from Unity into FrooxEngine. These are pre-requisites for the separation.

The major steps:

These updates change core components of the engine, and allow it to work entirely standalone without relying on Unity.

The engines will be separated into different processes and communicate via a shared memory file.

Resources