MrHappyFace

[1.0.5] BetterTimeWarp v2.2 - Customizable Time Warp, and Lossless Physics Warp

Recommended Posts

Added Lossless Physics, which allows you to keep accurate physics simulation even at high warp (this is the featurefrom TimeControl that @acerola requested)

Thanks! You are great!

Share this post


Link to post
Share on other sites

Please can someone explain me how to use this plugin in very high altitude.. when i want to speed up, it freeze the game as the stock warp.. help ? :(

Share this post


Link to post
Share on other sites
Please can someone explain me how to use this plugin in very high altitude.. when i want to speed up, it freeze the game as the stock warp.. help ? :(

I don't really understand what you mean, could you elaborate?

Share this post


Link to post
Share on other sites

How do you disable Physics? Every time I go past 5x it either lags my computer to death or my craft blows up because the physics can't keep up.

Or:

Can you do an on rail powered (level) flight warp that drains fuel?

Edited by Tontow

Share this post


Link to post
Share on other sites
Can you do an on rail powered (level) flight warp that drains fuel?

If it drains fuel, it's not on-rails ;)

The thing with rails is that the only force acting on the ship is gravity, meaning it's path is known beforehand (i.e., it's an orbit), so you can draw it where it should be without having to calculate how it got there. With thrust, you have to calculate timesteps, and to keep precision then you must calculate that many times more per frame.

Share this post


Link to post
Share on other sites
If it drains fuel, it's not on-rails ;)

The thing with rails is that the only force acting on the ship is gravity, meaning it's path is known beforehand (i.e., it's an orbit), so you can draw it where it should be without having to calculate how it got there. With thrust, you have to calculate timesteps, and to keep precision then you must calculate that many times more per frame.

Not really. You just have to take the heading, alt, speed, and fuel usage to figure out how much fuel you will use up and how fast you will travel in warp.

The craft would stay at the same alt -(I find about 6000 to 7000 is good enough to avoid most, if not all, mountains)- during warp and use the same amount of fuel that it normally would, but with physics disabled so it wouldn't turn into kerbal kibble.

So it would be almost like orbital on rail warp, save for that you need fuel to maintain it and your alt wouldn't decrease or increase. Because no fuel means that you can't maintain your alt.

What is the highest point on Kerbin again? Just use that for the minimum height required for powered in-flight warp and also require that the craft is flying almost level before you can engage it.

Share this post


Link to post
Share on other sites

interesting mod.

some features could be really handy when I build overly big spaceship.

regarding the on-rails-accelleration: how about offering an api so modders with ion-engines can tap into it?

for example nerteas near future propulsion. horribly low thrust at really high efficiency, yet, if nertea could tap into your timewarp-system.

another idea: maybe it is possible to set the joints between the items to fully rigit, as if they were one part. because I don't see any reason why that needs to be calculated during ion-accelleration.

Share this post


Link to post
Share on other sites

regarding the on-rails-accelleration: how about offering an api so modders with ion-engines can tap into it?

I'm not actually using any custom time acceleration, just tapping into KSP's native TimeWarp system, so the API is already in the base game.

another idea: maybe it is possible to set the joints between the items to fully rigit, as if they were one part. because I don't see any reason why that needs to be calculated during ion-accelleration.

IF I ever implemented rails-warpable engines, (I don't really see why though, because really high physical time warp is incredibly stable as long as you're in space) then the fact that it's at on-rails time warp already means that joints are frozen by KSP's code.

However, I don't think on-rails engine simulation is a thing that I will ever include in this mod, because it is incredibly complicated, and falls outside the scope of this mod. It's simple enough if I have one engine that is perfectly aligned with the center of mass, but it gets waaaay more complicated once you take into account off-centered engines, multiple engines, engine heating, etc. A hypothetical on-rails mod could only allow 1 engine at a time, but then off-centered engines are still an issue.

If off-centered engines and torque are completely ignored, and the force is just applied along the mean direction of the engines, then it could work, but that wouldn't be all that fun, because it could be exploited, and it would be unrealistic.

It's technically doable, but it's a project for another time, and an entirely separate mod.

Edit to avoid post spam:

4Chan really likes my mod

oGGYfh4.png

Edited by MrHappyFace
a word was wrong :O !

Share this post


Link to post
Share on other sites

There's a compatability issue with a mod I have installed and exhaust isn't showing up. It's not HotRockets. I'll get back in a second when I figure out which it is XD.

UPDATE: It now appears to be a corrupted save...

Edited by Avera9eJoe

Share this post


Link to post
Share on other sites

Any chance of making it so we can set more warprate times? Preferably up to 20. Currently it only goes up to 8 warprate.

Edited by tempsgk

Share this post


Link to post
Share on other sites

Hi.

How does this compare to TimeControl?

In that mod, physics warp seemed to be capped by CPU performance. If I set it to 20x, it only really went to 4.5-4.7x wjile my CPU is at 100% utilisation. Lower-part ships could physics warp at higher rates.

Does this behaviour exist in this mod too?

Share this post


Link to post
Share on other sites
Hi.

How does this compare to TimeControl?

In that mod, physics warp seemed to be capped by CPU performance. If I set it to 20x, it only really went to 4.5-4.7x wjile my CPU is at 100% utilisation. Lower-part ships could physics warp at higher rates.

Does this behaviour exist in this mod too?

Time Control uses a custom built system for customized physics time warp, while this mod just hijacks the stock system. The stock system has been in development for many years, and is less buggy.

In the stock game, physics simulated at the same physics fps in real time no matter what. That means that in high physics (>1) warp, physics is less accurate. This way, there is no major extra CPU usage at higher speeds. It's like zooming in and out in a game. If you zoom out, then you can see more, but with less resolution for smaller things, and if you zoom in, you can clearly see every detail of the things around you, but you see less overall.

Lossless physics in this mod basically rescales the "resolution" of the physics as you warp so that you can see more stuff (time passes faster), but without sacrificing any accuracy.

If you want to run an ion engine for a few hours of in-game time, and the craft is relatively simple, then you can just run 20x phys-warp without lossless-physics and get an hour of burning done in 3 minutes. This kind of physics warp shouldn't slow your computer too much, but it still can by a small amount.

If the craft is less stable, the you'd want to use lossless-physics. If your computer is slow, then you can set the lossless physics to 1/4 accuracy, but if you have a slightly beefier computer, then you could run 20x phys-warp at accuracy setting 1, and keep most of your physics accuracy. I say most because even the best computer wouldn't perform perfectly.

Final Answer:

If you're using lossless physics, then that's an expected side effect. The CPU usage goes up when the warp goes up. If your computer can't handle that, then disable lossless physics, and you shouldn't experience any major increases in CPU usage, but you'll be sacrificing accuracy.

If you don't have lossless physics enabled, and your game still lags above 10x or 20x phys-warp, try restarting your game, and if that doesn't work, your computer. If none of that works, or you have an old computer or weak CPU, then I can't help you as it's a limitation of KSP's physics engine, and your computer. :(

Share this post


Link to post
Share on other sites
Time Control uses a custom built system for customized physics time warp, while this mod just hijacks the stock system. The stock system has been in development for many years, and is less buggy.

In the stock game, physics simulated at the same physics fps in real time no matter what. That means that in high physics (>1) warp, physics is less accurate. This way, there is no major extra CPU usage at higher speeds. It's like zooming in and out in a game. If you zoom out, then you can see more, but with less resolution for smaller things, and if you zoom in, you can clearly see every detail of the things around you, but you see less overall.

Lossless physics in this mod basically rescales the "resolution" of the physics as you warp so that you can see more stuff (time passes faster), but without sacrificing any accuracy.

If you want to run an ion engine for a few hours of in-game time, and the craft is relatively simple, then you can just run 20x phys-warp without lossless-physics and get an hour of burning done in 3 minutes. This kind of physics warp shouldn't slow your computer too much, but it still can by a small amount.

If the craft is less stable, the you'd want to use lossless-physics. If your computer is slow, then you can set the lossless physics to 1/4 accuracy, but if you have a slightly beefier computer, then you could run 20x phys-warp at accuracy setting 1, and keep most of your physics accuracy. I say most because even the best computer wouldn't perform perfectly.

Final Answer:

If you're using lossless physics, then that's an expected side effect. The CPU usage goes up when the warp goes up. If your computer can't handle that, then disable lossless physics, and you shouldn't experience any major increases in CPU usage, but you'll be sacrificing accuracy.

If you don't have lossless physics enabled, and your game still lags above 10x or 20x phys-warp, try restarting your game, and if that doesn't work, your computer. If none of that works, or you have an old computer or weak CPU, then I can't help you as it's a limitation of KSP's physics engine, and your computer. :(

Convincing enough. Will install.

Sorry if my answer is short compared to yours. Many times I write several paragraphs to explain something I'm passionate about, like on reddit, and feel cheated when I get no response or a very small one. Rest assured, I read all of it.

Speaking of computer performance, can I suggest a mod here or would you prefer a different channel?

Share this post


Link to post
Share on other sites

am i the only one for whom using this to warp faster than 100k means insta-kraken upon returning to realtime?

loving the phys warp though!

Share this post


Link to post
Share on other sites
am i the only one for whom using this to warp faster than 100k means insta-kraken upon returning to realtime?

Nope that's happened to others as well. I don't really have a clue on how to fix it, but you could try slowly reducing the time warp down to below 100k before going down to 1x. Not sure if that'd work though, but it might.

Share this post


Link to post
Share on other sites

Hm, I must have missed something, because I can't warp neither higher nor lower than x1 whilst executing a burn. Is there some sort of magic setting I've missed? A key combination which needs to be pressed?

Share this post


Link to post
Share on other sites

quick one guys: still playing in a heavily-modded 0.90 (realism overhaul + several realism mods) - will this work on this old KSP version or is it only 1.00+?

I am launching 9 kiloton rockets and you can imagine the frame rate I'm playing with

Edited by pvnkb1tch

Share this post


Link to post
Share on other sites

You can try, but it's not guaranteed it'll work. I could try to build the code against 0.90 and make a 0.90 version when I get home, but there's no guarantee that'll work either.

Share this post


Link to post
Share on other sites

I tried it but didn't work - with my game setup and mods it prevented me from saving or going back to the space center once a vessel was flown. uninstalled and game went back to working well.

thanks very much for offering to do a 0.90 version - I would really love it but don't want to have you working only for me. if you feel like it I will most certainly appreciate it!! :D

Share this post


Link to post
Share on other sites
Hm, I must have missed something, because I can't warp neither higher nor lower than x1 whilst executing a burn. Is there some sort of magic setting I've missed? A key combination which needs to be pressed?

Never mind me, using right shift (on linux) solved the problem, of course.

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.