Cities: Skylines

Cities: Skylines

Loading Screen Mod [Test]
leftbehind 5 Sep, 2019 @ 3:55pm
Idea: Mod swim lanes
There are different categories of mods.

Some that update assets (eg. NExt, extra vehicle effects, MOM, .....) obviously need to run sequentially.

However, there's a bunch of other mods that could possibly be run in parallel, for example eye candy mods, etc.

By "run" I mean the events that are fired at them. Currently all mods get event one after another (as far as I can tell) which eats lots of time.

If we had swim lanes, would it be possible to have 2 or maybe 3 groups of mods getting their events at the same time? The mods in each swim lane would run sequentially, but the swim lanes themselves would run in parallel. (hope that make some sense?)

Swim lane 1 would be, by default, all mods.

Over time, with testing, some mods could be moved to swim lane 2. Maybe via config text file so end users can do the testing to see what works and what doesn't?

Possibly even some of the 'asset changing' mods could be run in parallel if they don't change same type of asset? Eg. Network changing mods in one swim lane, prop/building changing mods in another?

Furthermore, would it be possible to provide shorter asset lists to some mods (based on the swim lane they are in) somehow? So instead of trawling through 4000 assets, a road altering mod would only see a list of road assets?

Just some random ideas, probably not worth the effort but though I'd mention it just in case.
< >
Showing 1-2 of 2 comments
thale5  [developer] 8 Sep, 2019 @ 10:10am 
I would like to see something like this but it probably requires Cities Skylines 2. The biggest obstacle right now is Unity version 5. Its API is not thread-safe at all, so anything that deals with Unity must run on the main thread. Not all mods need Unity but the big ones do.

The multi-threaded loader pipeline in this mod overcomes Unity's limitations by calling the Unity API on the main thread and doing everything else, as much as possible, on other (custom) threads.

Also the simulation part of the game is single-threaded (apart from path finding). Portions of it could certainly be parallelized but it is very demanding work.
leftbehind 9 Sep, 2019 @ 10:41am 
Yes, kvakvs on TM:PE team is keen to investigate moving some of the in-game stuff to separate threads where possible. If you know of any good starting points please let him know, he's in the Skylines.Code discord and TM:PE discord also.
< >
Showing 1-2 of 2 comments
Per page: 1530 50