Jump to content

Porting KSP to Unity 5


Recommended Posts

Here's an article on the dev team that's working on the game 'Rust'. Seems like it went pretty painlessly and with major improvements to sound and Physx implementation

http://blogs.unity3d.com/2014/11/19/porting-to-unity-5-the-untold-rust-journey/

So Squad, when can we expect a shift over to Unity 5 for KSP?

I think this is a verboten question, you might want to duck.

Link to comment
Share on other sites

This is probably something of the lowest priority for Squad. First, Unity 5 is still being worked on, and second, this probably won't fix most of the gameplay problems.

I remember hearing Squad say multiple times that once Unity 5 is released, they will make it first priority to upgrade.

Link to comment
Share on other sites

Indeed. U5 is not yet released (heck, they're still working on 4.6, U5 isn't scheduled for release until sometime next year) but once it is they'll definitely work on the upgrade, especially to take advantage of the new version of PhysX. As of now, U5 is still in beta.

Link to comment
Share on other sites

This is probably something of the lowest priority for Squad. First, Unity 5 is still being worked on, and second, this probably won't fix most of the gameplay problems.

From what I understood it is a pretty high priority. And how will not multicore and possible better 64bit support not affect gameplay??

It will significantly help the performance issues and the sooner that has been dealt with the better.

I believe they even said that once they get their hands on unity5 that they will focus on it right away.

And if it involves changing some code, it would not make sense to first write that for unity4 just to port it over later as that would be more work.

Link to comment
Share on other sites

Indeed. U5 is not yet released (heck, they're still working on 4.6, U5 isn't scheduled for release until sometime next year) but once it is they'll definitely work on the upgrade, especially to take advantage of the new version of PhysX. As of now, U5 is still in beta.

Where did you hear sometime next year? Last I heard (which was around July) it was supposed to be 4th Quarter 2014. For those counting, that leaves about 5 weeks.

Link to comment
Share on other sites

What I'm dying to know is: when do we get a Unity built with a non-ancient version of mono? the boeheim GC overhead is awfull (and I can't get Unity's mono fork to compile the 'experimental' sgen). Mainstream mono has had multithreaded generational GC for some time now...

On an aside, recompiling mono with '--enable-parallel-mark' (disabled as "causes crashes" in Unity's buildscripts) significantly reduces the "stopping the world" GC hitches for me... no crashes so far :)

Of course the real elephant in the room, as usual, is the single threaded physx...

Edited by steve_v
Link to comment
Share on other sites

On an aside, recompiling mono with '--enable-parallel-mark' (disabled as "causes crashes" in Unity's buildscripts) significantly reduces the "stopping the world" GC hitches for me... no crashes so far :)

Of course the real elephant in the room, as usual, is the single threaded physx...

Whoa, whoa! The hitching issue has been unresolved for as long as I've played the game. It's got better with each version, but is still present.

Is your solution well-known? Might want to write up an idiots guide if it works.

Link to comment
Share on other sites

It's not a solution, it's an experiment.

As far as I can tell, it multithreads part of the garbage collector. At least that's what it does in stock mono.

My experiences are entirely subjective, and only on GNU/Linux. It may well just be placebo ;)

The idiots guide would be:

Check out https://github.com/Unity-Technologies/mono.

Modify external/buildscripts/build_runtime_linux.pl to reverse the --disable-parallel-mark configure flag.

'perl external/buildscripts/build_runtime_linux.pl'. (with -build64=1 if you want 64bit)

Copy eg. 'builds/embedruntimes/linux64/libmono.so' to <KSP_INSTALL_DIR>/KSP_Data/Mono/x86_64/.

See if you can see a difference ;) - probaby not unless you run a lot of mods that create a lot of garbage.

There are a few other things that can be messed with here, for example using __thread rather than libpthreads which may also be slightly faster - see the README.

Unfortunately the changes Unity made to this mono fork means most of the GC related options no longer compile, eg. using sgen or system boehm.

Messing with mono may not do anything usefull at all, or it may eat your kitten. 'at own risk' applies here, but I'd be interested to know if it really does make a difference.

Edited by steve_v
Link to comment
Share on other sites

why can the rust devs have U5 already?

Since the public beta is out, everybody can buy in and start using it.

It's also not forbidden to ship a game with beta unity versions, at least the public ones.

Edited by slumpie
Link to comment
Share on other sites

Since the public beta is out, everybody can buy in and start using it.

It's also not forbidden to ship a game with beta unity versions, at least the public ones.

so do we assume it wasnt really top priority? or are they waiting for full release?

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...