Jump to content

Multicore support possible?


Recommended Posts

Unity already supports multiple cores, what it can't do (yet) is split a thread over two or more cores, so the biggest thread (the physics) hammers one core relentlessly.

Your other cores will see much lower use, and might seem to not be used at all by KSP.

Link to comment
Share on other sites

1) yes it is

2) it is very poorly supported

3) It is not something that can be done right now due to unity it's self.

4) this is a very talked about subject that will probally get closed soon.

Link to comment
Share on other sites

I'm really hoping that in the near future the unity engine is upgraded to use multiple threads and cores. Most modern processors have multiple threads if not cores so almost everyone would see a major performance boost.

As of now there isn't much the devs can do. :(

Link to comment
Share on other sites

Well when could we expect this update to Unity?

I'm no expert but considering the high amount of cores in the ps4 and xbox one and that unity is used by several people to make games for these, we could expect sometime in early 2014.

Link to comment
Share on other sites

Just to clarify, EVERY program can use multiple cores. In fact the program cannot do otherwise, its an OS/task thing.

Its multi-threading thats Unity's issue.

Unity supposedly has limited support for multi-threading, but it is not in a section of code that KSP needs to be multi-threaded.

What KSP needs is a multi-threaded Physics Engine.

Unity DID make a multi-threaded physcis engine for PS4, but apparently it is not going to be put into the general release. Which most likely means that PS4 paid for the development.

Unity still uses .NET/mono for christs sake.

Link to comment
Share on other sites

Would it be possible to split up the physics engine into a few separate parts and assign each part a core? I could see possible latency times if one part of the physics is bottlenecking while the other part is not, but it would help a lot more on powerful machines like mine.

Link to comment
Share on other sites

Would it be possible to split up the physics engine into a few separate parts and assign each part a core? I could see possible latency times if one part of the physics is bottlenecking while the other part is not, but it would help a lot more on powerful machines like mine.

As far as i can see KSP uses unitys built in phyics engine. In order to multithread it they'd have to choose a different physics engine like BULLET or ODE.

I dont think this will ever happen, because it would take much time and resources.

Perhaps they manage it to improve performance without switching engines! :)

Link to comment
Share on other sites

That the physics itself cannot be multithreaded doesn't mean nothing can be done. You could take *everything else* (sound, input, rendering, asset loading, etc) and move it off to another core, leaving the physics processing to have core 0 all to itself.

Link to comment
Share on other sites

Anyone know if Squad has considered other engines? I know it'd be a lot of work to move assets, but as the game development progresses, it's going to become more resource intensive, especially as more items are added into physics for more realistic/accurate rockets.

Link to comment
Share on other sites

Unity still uses .NET/mono for christs sake.

What's wrong with .NET?

That the physics itself cannot be multithreaded doesn't mean nothing can be done. You could take *everything else* (sound, input, rendering, asset loading, etc) and move it off to another core, leaving the physics processing to have core 0 all to itself.

The physics engine CAN be multithreaded, in fact, the modern version of PhysX even uses the GPU to do the processing. However, Unity uses and old version of PhysX which had no threading and they still hesitate to upgrade.

Using a different core for the rest of the processing wouldn't help much as the rest is relatively cheap compared to the physics.

Anyone know if Squad has considered other engines? I know it'd be a lot of work to move assets, but as the game development progresses, it's going to become more resource intensive, especially as more items are added into physics for more realistic/accurate rockets.

Unity itself is fine, in fact it's the only engine I know to support such a game (huge world) "out of the box". It's just the physics engine that needs an upgrade. And also, changing the game engine would mean a rediculous amount of work. It also is listed in the list of things not to suggest.

Edited by NeoLegends
Link to comment
Share on other sites

  • 4 weeks later...

While I would absolutely love an update on the physics engine, I've learned to accept frames around 5-8 when my station is within range:

190A29DF098804A352BB85444EBE9CA34D7E2F5B

Current parts count is 544, with 9 Kerbals on board. No particular thought went into parts economy - I just wanted a good way-station in orbit for IP missions.

I've found another thread, pointing out a way to optimise surface water to help increase FPS - and it did help a bit - but I think I'm stuck with single digit frames for now.

Link to comment
Share on other sites

it's always a good feeling when you get somethin' into orbit that winds up looking pretty cool. I surely hope the Unity folks get multithreading whatevers workin' verily soon, though. We need physics running on multiple cores DX

Link to comment
Share on other sites

  • 4 months later...

There are a few tricks that can improve performance. Obviously using less parts is one. But not all parts are equal. In my experience the strut connector, solar panels and RCS thrusters are more expensive than other parts. The strut connector is the worst.

Solar panels can be replaced by RTGs for most use. Reaction wheels can be used instead of RCS except for docking. Strut connectors usually only needed to survive launch, so you can connect them to decouplers and discard them after reaching orbit.

I just finished this station. It's just a prototype, so there is room for improvement. Part count is 819, and it runs around 20 fps on an i7 2600K.

screenshot6.png

Link to comment
Share on other sites

So... multi-core is possible for Unity, but multi-thread is not? Dammit. :(

You're not quite getting the concepts right there. Applications (and libraries like Unity) don't do multi-core directly. Multi-core is a hardware feature dealt with by the OS. Applications can do multi-threading, and the OS then schedules the threads across whatever cores are available. Multi-threading even has (limited) benefits on a single core. That's just scratching the surface of the subject  parallel/multi processing and task/process/thread scheduling is a complex subject. Threads are the common way for a single application instance to make use of more than a single hardware core. Threads are also sometimes called "lightweight processes" or LWPs.

So, what's needed is for Unity to make better use of threading, so that the OS can better schedule the application across multiple cores (or hardware threads, which is a term that I personally hate, as it just confuses things).

Link to comment
Share on other sites

  • 9 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...