Jump to content

[1.8-1.11] KSPBurst - Burst compiler for Kerbal Space Program


dkavolis

Recommended Posts

KSPBurst

Burst compiler for Kerbal Space Program

KSPBurst by itself will not provide any performance benefits. Mods will need to use Unity job system and decorate the jobs with [BurstCompile] to get any improvements.

The Burst compiler is archived to prevent KSP from trying to load its dynamic libraries. The archive is extracted the first time the mod runs to <path to KSP>/PluginData/KSPBurst@<mod version>-<archive name>. Burst standard outputs can be found in <path to KSP>/Logs/KSPBurst/ and KSP.log.

Repository: https://github.com/KSPModdingLibs/KSPBurst/

Installation

Download the latest release from the GitHub releases and extract the archive into your KSP directory. plugins_only version does not contain the compiler, use it only if KSPBurst is a hard dependency and download size is an issue.

Alternatively, KSPBurst can be installed from CKAN using KSPBurst identifier. plugins_only version is indexed as KSPBurst-Lite.

Compiler version requires Mono, you can download it from here.

Burst compiler version can be changed by replacing existing com.unity.burst@<version>.zip archive with a different one. The mod expects the archive to follow <package name>@<package version>.<extension> naming scheme, where <package name> contains burst. If a matching archive was not found, KSPBurst will default to using a compiler matching <path to KSP>/PluginData/*burst*/package/.Runtime/bcl.exe with the greatest package version.

Burst packages can be found here.

Modders

KSPBurst can be bundled with other mods. Bundling plugins_only version will keep the file size down but users will need to download the compiler version for Burst benefits.

Burst compatible Unity plugins and their dependencies are also bundled:

Configuration Options

All configuration options present in KSPBurst.cfg map directly to bcl.exe command line options. If ModuleManager is present, patched options will be used.

  Reveal hidden contents

Building

Prerequisites

  1. KSP installation
  2. python
  3. Unity Editor 2019.2.2f1 (if building Unity packages)

Configuration

Tools read mod configuration options from config.json, users should create config.json.user and override the values there:

Option Description
unityBuildDir relative path to unity project build directory
kspMin minimum compatible KSP version
kspMax maximum compatible KSP version
version KSPBurst version
versionTemplate relative path to version template file
unityPackages list of bundled unity packages
unityDependencies list of managed plugins that unity packages depend on

Tools

tools contains python scripts:

Script Description
post_build.py copy libraries to the mod directory, archive the Burst package if it exists and copy the mod to KSP installation
version.py update version information in source files and ReadMe
package.py package mod into an archive at archives/, outputs 2 versions, one with and one without the Burst compiler

Building the Mod

  1. Clone KSPBurst

  2. Create Directory.Build.props.user in the root directory with

    <Project>
      <PropertyGroup>
        <KSP_DIR>path to KSP</KSP_DIR>
      </PropertyGroup>
    </Project>

    Depending on the platform you may also need to set DATA_DIRNAME to match your installation.

  3. If not building Unity packages, go to to step 7

  4. Open Unity project at Unity/KSPBurst in Unity Editor

  5. Build the Unity project and note the build directory

  6. Create config.json.user in root directory with

    {
      "unityBuildDir": "<relative path to unity build directory in step 5>"
    }

     

  7. Build KSPBurst with your IDE or from command line, the mod will be copied your KSP installation. If the burst package is present in Unity directory, it may take a while to archive it the first time.

License

Unity plugins are licensed under under the Unity Companion License for Unity-dependent projects--see Unity Companion License.
KSPBurst is licensed under the MIT license

Notes

System.IO.Compression and System.IO.Compression.FileSystem plugins are used for archive decompression and are bundled with Unity Editor.
NuGet package Microsoft.Extensions.FileSystemGlobbing is used for glob pattern matching.

Edited by dkavolis
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 2 months later...

If you took a minute to look at the log file, you would have found this:

  Reveal hidden contents

I have no idea what KSPBurst is, and am not about to do any more research into this.  

I suggest you do the following:

Backup your entire game directory.  This can be done easily by opening up the directory:

C:\Program Files (x86)\Steam\steamapps\common

and moving the Kerbal Space Program directory onto your desktop

Then, use Steam to reinstall it.

Finally, use CKAN to install your mods, a few at a a time, and testing after each install.

Assuming that you manage to get all the mods installed via CKAN that are available via CKAN, make a full backup/copy of the enter game.

Then, install the mods which aren't available, one at a time, and test after each install

If it fails at any of the times you try starting the game, you should have a good idea of the problem.

 

This is NOT a problem with this contract pack, I'm going to ask the moderators to move this into a new thread.

 

Link to comment
Share on other sites

  On 10/28/2021 at 3:16 PM, MirrorsareHard154 said:

https://we.tl/t-d4w3v6CTc1

Nevermind it still brokey, pressing any button, at least once I get to the main menu, KSP never likes inputs when its loading in the first place, still crashes

Expand  

 

  On 10/28/2021 at 4:03 PM, linuxgurugamer said:

If you took a minute to look at the log file, you would have found this:

  Reveal hidden contents

I have no idea what KSPBurst is, and am not about to do any more research into this.  

I suggest you do the following:

Backup your entire game directory.  This can be done easily by opening up the directory:

C:\Program Files (x86)\Steam\steamapps\common

and moving the Kerbal Space Program directory onto your desktop

Then, use Steam to reinstall it.

Finally, use CKAN to install your mods, a few at a a time, and testing after each install.

Assuming that you manage to get all the mods installed via CKAN that are available via CKAN, make a full backup/copy of the enter game.

Then, install the mods which aren't available, one at a time, and test after each install

If it fails at any of the times you try starting the game, you should have a good idea of the problem.

 

This is NOT a problem with this contract pack, I'm going to ask the moderators to move this into a new thread.

 

Expand  

Hey folks, I've moved your posts over to this thread, which appears to be for KSPBurst.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...