Ludeon Forums

Ludeon Forums

  • March 29, 2020, 12:14:13 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [1.1] Update Unity for multithreading  (Read 1874 times)

HelloKitty

  • Muffalo
  • *
  • Posts: 12
  • Refugee
    • View Profile
[1.1] Update Unity for multithreading
« on: October 01, 2019, 09:38:32 AM »

During this year Unity introduced performance improvements, which seem to include multithreading. I'm no C# expert, but if this could be incorporated into Rimworld, this would massively improve the playability of the game. Mods are really what make Rimworld what it is, and when there are a lot of them and some years have passed, performance often gets a gamebreaking impact. If such a patch was released as DLC, I'd buy it twice.
Logged

vzoxz0

  • Colonist
  • ***
  • Posts: 293
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #1 on: October 24, 2019, 10:11:57 AM »

There are cleaning mods for this -- multithreading wouldn't fix it, either.
Logged

Pangaea

  • Colonist
  • ***
  • Posts: 414
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #2 on: October 24, 2019, 01:39:12 PM »

This fairly recent post by Tynan could indicate this happens in the future.

I have to admit I'm kind of stumped and frustrated that apparently Apple is now breaking working software.

I hope a future RimWorld update will fix these issues; we'll probably update the Unity version at some point and that might help. But it's not something that'll be released super soon. I'm sorry I can't fix this now, I just have no insight into the problem and can't reproduce it at all.
Logged

HelloKitty

  • Muffalo
  • *
  • Posts: 12
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #3 on: February 17, 2020, 10:18:21 PM »

"Getting Started with the Job System in Unity 2019"
https://youtu.be/C56bbgtPr_w

Bumping for the Great Salvation of Mankind. Isn't it lovable how it goes from 7 fps to 240 in just a couple clicks? The job system has been out for over a year. As I understand this wasn't implemented in the 1.1 update...
Logged

MSDOS

  • Muffalo
  • *
  • Posts: 1
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #4 on: February 21, 2020, 02:36:34 PM »

There are cleaning mods for this -- multithreading wouldn't fix it, either.
Rimworld uses an outdated version of the framework 3.5 that does not support multithreading. What does it mean to initialize mods in one thread in turn. In this case, the minimum load on the computer processor, which does not allow the use of multicore processors in full. It's time to switch to the new version of the framework 4.
In addition, the old framework will not allow modders who understand multithreading to make an effective modification to quickly loading mods that will use the computer 100%. Sorry for google translator :).
« Last Edit: February 21, 2020, 02:38:54 PM by MSDOS »
Logged

Serenity

  • Colonist
  • ***
  • Posts: 812
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #5 on: February 22, 2020, 01:30:56 PM »

Just because you enable support for something doesn't mean it's used. Generally when people ask that games make more use of multi-threading they have no idea what they are talking about it. It's not that simple and in some situations makes things actually worse.
Logged

HelloKitty

  • Muffalo
  • *
  • Posts: 12
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #6 on: February 25, 2020, 01:52:04 PM »

Just because you enable support for something doesn't mean it's used.
Whom is this addressed to? Did you watch the video?
Logged

Elrood

  • Muffalo
  • *
  • Posts: 13
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #7 on: March 06, 2020, 04:46:13 AM »

If you never ever worked with legacy code while trying to change base architecture from single to multi-threaded, than you have no idea how much work it takes, how hard it can be, how many bugs you are going to introduce and how long it will take to get any gains without making future development 10 times harder.

Rimworld uses an outdated version of the framework 3.5 that does not support multithreading. What does it mean to initialize mods in one thread in turn. In this case, the minimum load on the computer processor, which does not allow the use of multicore processors in full. It's time to switch to the new version of the framework 4.
In addition, the old framework will not allow modders who understand multithreading to make an effective modification to quickly loading mods that will use the computer 100%. Sorry for google translator :).
Not true. .Net 3.5 support threading well enough - for example System.Threading.Thread, Threadpools, etc.
Problem may have been with Unity and with how incredibly hard it is to make good multithreaded application which is more complicated than a demo of how nice multithreading is.
Logged

HelloKitty

  • Muffalo
  • *
  • Posts: 12
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #8 on: March 06, 2020, 05:30:05 PM »

If you never ever worked with legacy code while trying to change base architecture from single to multi-threaded, than you have no idea how much work it takes, how hard it can be, how many bugs you are going to introduce and how long it will take to get any gains without making future development 10 times harder.
I actually worked with exactly that. In java. Took years. So what? Doesn't mean it'll take as long for Rimworld, especially since the platform is ready.
Logged

Whifflepits

  • Drifter
  • **
  • Posts: 21
  • Refugee
    • View Profile
Re: [1.1] Update Unity for multithreading
« Reply #9 on: March 08, 2020, 12:16:12 PM »

If you never ever worked with legacy code while trying to change base architecture from single to multi-threaded, than you have no idea how much work it takes, how hard it can be, how many bugs you are going to introduce and how long it will take to get any gains without making future development 10 times harder.
I actually worked with exactly that. In java. Took years. So what? Doesn't mean it'll take as long for Rimworld, especially since the platform is ready.

Doesn't mean that working on Multithreading takes away from development on other parts of the game either. It's strictly background technical work, which can be contracted out. Assuming you hire the right person, it'll even be done cheaper. Tynan would probably spend less time supervising a contractor to multithread the game than he would trying to optimize current performance.

Multithreading would be nice. You get a colony with 30+ people, couple hundred animals and Randy throws a raid at you things chug no matter what you're running. 4.5-5ghz with DDR4 3800-4000? Doesn't matter, you're still in the single-digit frames. And it's all AI scripts/pathing just smashing your CPU. Want an example just go and take a hundred animals and change their area all at once, no raid needed. The instant stuttering is almost impressive.

No mods necessary.
Logged