July 8, 2013

Kerbal Space Program Modding

At the time of writing (KSP 0.20.2) modding Kerbal Space Program is actually rather trivial.

When I say trivial, there is a very nasty catch to the whole modding process. You need to be relatively familiar with some of the Unity Engine code AND you need to be ready to figure out how to use undocumented code. Fortunately, there is a nice guy in the modding community who has come along and helped ease this process by creating some XML documentation on github.

It isn't really enough, because the documentation is very skimpy and the biggest issue is figuring out how everything hooks together. Of course, if you plan to simply add a few parts to KSP that is a very dead simple and well documented process. On the other hand, if you plan to add a complex new set of features to KSP, you are going to have to learn by example from the source code of other mods.

If the guys at Squad (people who created KSP) really want to make plugin developers not cry, and do a better job of modding the game, they need to publicly expose some of there API so that modders have a much smaller learning curve.

I looked at a few mods and re-created the sub-assembly mod to work with the 0.20 plugin system as a test. My next task is to port it over to Scala to test my Scala -> IKVM -> KSP workflow.

I'm at a disadvantage already because of a lack of experience with C#, but I've used the language before and can easily learn it because of my experience working in a number of languages. Right now I'm really curious to see if I can easily integrate JVM languages as a viable modding option for KSP. I mentioned IKVM in my previous post, but I also came across jni4net.

My current issue with IKVM is the huge amount of bloat required to simply add a minor feature to KSP (I have to add in 5MB of dll just to log "hello, world" from Java. On the other hand, jni4net acts as a bridge between the languages using proxy classes and is significantly smaller, but its Windows only, requires 64-bit java, etc.

The end result, my only real option is to use IKVM if I want to develop mods for KSP using a JVM language.


1 comment :

  1. The King Casino: Slots, Table Games, Roulette
    At The King Casino you will find ボンズ カジノ everything you love about slots and table 바카라 games and more. From the 더킹카지노 classics like blackjack, roulette, baccarat, and baccarat to the

    ReplyDelete