Jump to content

Low calculation mode for better performance


Recommended Posts

Is it possible to create a mode where there's less frequency and precision of calculations?

I'm using a I5, 8GB RAM, intel hd 520 graphics, and it runs great on a low res for the early cycles. But obviously as the game progresses, more and more calculations are needed, and it gets laggy. I also know people with better computers also have lag issues later on. So I see some sort of low calculation mode, if that's viable, as a solution. If you could manually set the frequency and precision of calculations that would be even better As well as setting the dups on a different calculation frequency, so they can react faster, than the gases and liquids.

So with less calculations, the gameplay would take a hit, but that has to be better than lagging. So for example, you could calculate the temperate of water every 1 second, or even 5 seconds. Currently I believe, the game is set to calculate water temp, multiple times per second.

You could also have your base running on normal calculation mode, and the rest of the map on lower calculations.

It would be awesome if something like this could be implemented, as this games fantastic, and I won't be getting a good pc any time soon. Thanks.

 

 

20 minutes ago, Sasza22 said:

I`m not an expert but i doubt something like that can be done without fundamental changes to the system. If the system does something every 0.25s changing parts of it to less frequency might be impossible.

The game contains multiple lists where each list contains a bunch of tasks. One list is called every 200 ms, one is called every 1000 ms, another one every 4000 ms and so on. The current system doesn't allow switching list or leave a list (that would be awesome though).

However it is technically possible to reduce the workload. Take for instance the item temperature sensor from Sensory Overload. It is called every 200 ms. Each time it is called, it is told how many seconds passed since last call (around 0.2 unless the CPU can't keep up). The mod adds that to a counter and that way it knows how much time passed since last call. I added a config file setting to set the update frequency and it will only update the value once the time has passed. Default is 0.15 (hence always below the 0.2), but you can set it to 5 seconds if you like and then it will only loop the items on the floor once every 5 seconds. Usually the player won't notice a slow update because it always update if an item is added or removed, meaning the timed updates is only about how quickly the sensor detects a change in the temperature of an item.

The problem with this approach is that there is a call every 200 ms where it then notice "no, not yet", which isn't ideal. It's still a boost compared to actually looping all items all the time.

The source code mentions some load balancing in calling the timed updates, but I haven't looked into how it works. I have no intention of modding that part and just being able to set an update frequency for my modded building components is good enough for my needs.

21 hours ago, Nightinggale said:

The game contains multiple lists where each list contains a bunch of tasks. One list is called every 200 ms, one is called every 1000 ms, another one every 4000 ms and so on. The current system doesn't allow switching list or leave a list (that would be awesome though).

However it is technically possible to reduce the workload. Take for instance the item temperature sensor from Sensory Overload. It is called every 200 ms. Each time it is called, it is told how many seconds passed since last call (around 0.2 unless the CPU can't keep up). The mod adds that to a counter and that way it knows how much time passed since last call. I added a config file setting to set the update frequency and it will only update the value once the time has passed. Default is 0.15 (hence always below the 0.2), but you can set it to 5 seconds if you like and then it will only loop the items on the floor once every 5 seconds. Usually the player won't notice a slow update because it always update if an item is added or removed, meaning the timed updates is only about how quickly the sensor detects a change in the temperature of an item.

The problem with this approach is that there is a call every 200 ms where it then notice "no, not yet", which isn't ideal. It's still a boost compared to actually looping all items all the time.

The source code mentions some load balancing in calling the timed updates, but I haven't looked into how it works. I have no intention of modding that part and just being able to set an update frequency for my modded building components is good enough for my needs.

I somewhat understood what you wrote, but that seems promising.

17 hours ago, Aeglefire said:

I really want to play and enjoy this game, but the low performance really hurts me. :( I wish this game ran like Don't Starve or Invisible, Inc. :( 

me too

17 hours ago, Aeglefire said:

I really want to play and enjoy this game, but the low performance really hurts me. :( I wish this game ran like Don't Starve or Invisible, Inc. :( 

You compare a beta (ONI) to a final released and more optimized game (D.S.). Thats not how it works. 

Second, in ONI there are tons more calculations to make. Its just a completely different type of game. 

And final: Wait for release. Its soon. We´ll see what the devs will have done in terms of optimisation.

On 22.06.2019 at 1:30 AM, Nightinggale said:

The problem with this approach is that there is a call every 200 ms where it then notice "no, not yet", which isn't ideal. It's still a boost compared to actually looping all items all the time.

I'm not sure about pathfinding, but all simulation(temperature, state of matter, mass, and all stuff with world cells) of the world state calculating in separate c++ dll, it is called each 200ms in "UnsafeSim200ms(float dt)" and it called by simple condition from "SimEveryTick(float dt)"(both in Game.cs) - this is basically your point where you can slow down frequency of world simulation, you can try to mod it, and it might work, but i'm suspect this is not main performance problem of the game, simulation of world quite fast unless you turn your map into boiling mess of lava and metals.

I think main performance issue is pathfinding and dupe tasks/AI and such stuff.

On 24/06/2019 at 12:17 PM, D.L.S. said:

I'm not sure about pathfinding, but all simulation(temperature, state of matter, mass, and all stuff with world cells) of the world state calculating in separate c++ dll, it is called each 200ms in "UnsafeSim200ms(float dt)" and it called by simple condition from "SimEveryTick(float dt)"(both in Game.cs) - this is basically your point where you can slow down frequency of world simulation, you can try to mod it, and it might work, but i'm suspect this is not main performance problem of the game, simulation of world quite fast unless you turn your map into boiling mess of lava and metals.

I think main performance issue is pathfinding and dupe tasks/AI and such stuff.

I'm trying a colony with just 3 dupes and will see how that goes

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...