Jump to content

Better Timewarp System


Recommended Posts

I thought of a way for timewarp to warp with physics but not lag.

The system would be multiplying :

Crash Resistance,

Speed,

Gravity On Ship,

Air Resistance,

Rotation Speed,

Power Generation Speed.

Then Divide : I forget oops(I have a bad memory but you need to divide something, I think it might be the trajectory speed or something)

Each by the Time Warp Value Set and Each part would also timewarp any other part within 15 meters of it(Only If your in Multiplayer which the config can change that).

This would allow timewarping with rotation and not floating through parts and also be able to use while falling or using thrust.

I am not that good at writing so it could be better.

This would be very nice for KSP.

Link to comment
Share on other sites

For starters, your idea is half there. C# has a distinct inability to program formulas to calculate "I forget oops... trajectory speed or something".

Unless you explain the whole idea, we have no way of figuring out if what you want is even viable.

Link to comment
Share on other sites

The basic problem with physics calculations of any kind during time warp is that the time step for the numerical integration of the physics equations grows large. I don't know what the tilmestep length for physics calculations is in KSP, but I imagine it won't be shorter than order 0.01 s of gameplay time. This means at 10x warp your physics time step rises to 0.1 s and at 100x it's 1 s. A 1 s time step is probably enough for the physics calculations, even simple ones, to become numerically unstable. This would manifest itself as wild uncontrollable oscillations that grow with time, parts heating and cooling in an oscillating manner that grows with time and forces between parts oscillating and growing with time. In a matter of a few seconds of gameplay, your ship would suffer a rapid unplanned disassembly.

If you set your physics bubble to be 15 m from the root part, you have a couple more problems. First, plenty of larger craft are larger than this, so you would have parts on the same craft that are outside the physics bubble. Secondly, if you have a longer time step and only a 15 m physics bubble, interacting ships will travel a significant distance in a single time step. Going back to the 100x example with a 1 s time step, if your relative velocity is 10 m/s, you will travel 10 m in a single computational time step. This means in time step 1 you are outside of the physics bubble. In timestep 2 you are nearly in collision with the other craft and in time step 3 you have passed through it and out the other side. In this scenario the time step interval is simply too coarse to resolve the physics calculations that might need to be done.

In terms of making the calculations numerically stable and allowing some sort of meaningful interaction between craft, the limit on the time acceleration is likely to be somewhere around 4x time acceleration, which is what is currently available.

Link to comment
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.

×
×
  • Create New...