You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two users have both reported in the forums that the kOS CPU part draws power even when the KSP game itself is paused. Pause the game with the CX-4181 turned on, go away for a few hours leaving your gaming PC turned on, and come back, and your ship is out of power even though no time has passed on the game clock.
I suspect that Timewarp.fixedDeltaTime is the wrong way to be calculating this, as well, because Updates() happen more (or less if your computer sucks) often than fixed updates. Draining power by one fixed Delta Time step each Update time means people who's frame rate is 2x physics rate are getting charged for electricity doubly, I think.
So there's really two problems at once, if this is happening:
1 - If Update() gets called when the game is paused, then we have to catch that condition instead of running IPU number of instructions each Update while paused. Pausing the gameworld should pause the kOS script.
2 - If running Update() is causing power to drain even when the game is paused (and presumably time isn't passing on the world clock) then that's evidence that we shouldn't be consuming power as if Timewarp.fixedDeltaTime was passing every Update, because clearly it's not. Even without the pausing problem, there's still the framerate problem and something else should be used to calculate power usage.
Power save mode??
Perhaps this is a good opportunity to consider implementing some sort of clock speed power save idea while we're at it. Make the unit drain less power when IPU is lower. We could do this perhaps very easily by doing the electrical charge as a micropayment. Find out how much drain typically happens within one Update(), divide that by 150 to get a tiny drain amount, and then charge that tiny amount just before executing each instruction. This would depend on the floating point numbers being able to operate lots of times on values that small without too much cumulative error, of course.
If this was implemented, then faster computers would take more energy drain, and putting the computer into sleep mode by intentionally reducing IPU to something like 1 (the current gui widget clamps to no lower than 50 but that could be changed), makes it drain less power. With that you could put your script into a mode where pretty much ALL it does is wait to wake itself up in a tiny simple loop, with all Whens, Ons, locks, etc turned off. an IPU of 1 would be enough to run in this mode and then it could put the IPU back to 150 when it wakes up.
The text was updated successfully, but these errors were encountered:
Two users have both reported in the forums that the kOS CPU part draws power even when the KSP game itself is paused. Pause the game with the CX-4181 turned on, go away for a few hours leaving your gaming PC turned on, and come back, and your ship is out of power even though no time has passed on the game clock.
I suspect that Timewarp.fixedDeltaTime is the wrong way to be calculating this, as well, because Updates() happen more (or less if your computer sucks) often than fixed updates. Draining power by one fixed Delta Time step each Update time means people who's frame rate is 2x physics rate are getting charged for electricity doubly, I think.
So there's really two problems at once, if this is happening:
1 - If Update() gets called when the game is paused, then we have to catch that condition instead of running IPU number of instructions each Update while paused. Pausing the gameworld should pause the kOS script.
2 - If running Update() is causing power to drain even when the game is paused (and presumably time isn't passing on the world clock) then that's evidence that we shouldn't be consuming power as if Timewarp.fixedDeltaTime was passing every Update, because clearly it's not. Even without the pausing problem, there's still the framerate problem and something else should be used to calculate power usage.
Power save mode??
Perhaps this is a good opportunity to consider implementing some sort of clock speed power save idea while we're at it. Make the unit drain less power when IPU is lower. We could do this perhaps very easily by doing the electrical charge as a micropayment. Find out how much drain typically happens within one Update(), divide that by 150 to get a tiny drain amount, and then charge that tiny amount just before executing each instruction. This would depend on the floating point numbers being able to operate lots of times on values that small without too much cumulative error, of course.
If this was implemented, then faster computers would take more energy drain, and putting the computer into sleep mode by intentionally reducing IPU to something like 1 (the current gui widget clamps to no lower than 50 but that could be changed), makes it drain less power. With that you could put your script into a mode where pretty much ALL it does is wait to wake itself up in a tiny simple loop, with all Whens, Ons, locks, etc turned off. an IPU of 1 would be enough to run in this mode and then it could put the IPU back to 150 when it wakes up.
The text was updated successfully, but these errors were encountered: