Jump to content

Need help developing a SR plugin


Recommended Posts

SR in this case being special relativity. I'm working on a mod to add other star systems, and as a parallel project I am working on this. Now I haven't gotten too deep into the programming but I've developed some concepts that I think may work for this. First off, I've done some math and decided that there can be a cutoff velocity threshold (currently I have it pegged at 1e5 m/s) where for all intents and purposes, your ship's orbit is a straight line, and the velocity at escape is upwards of 99% the velocity at periapse. This velocity is usually much less than that at which you would experience relativistic effects, so that threshold can be raised even higher.

Anything moving slower than the threshold velocity will operate under the standard orbital mechanics of the game and will experience time passing at the same rate. Above this threshold, each ship experiences time passing at a different rate from the so-called "slow objects" and indeed other ships also moving in the relativistic regime. Above the cutoff velocity, the in-game rails can be replaced by lines of constant velocity, since the gravitational influence of nearby objects is minimal. Perhaps to disguise this fact, the readout can switch to show the ship's velocity as a percentage of the speed of light.

What I'd like to do is have time run for the active ship at a 1:1 rate (1 second of MET per 1 second of simulation time). Therefore, for the slow objects and other objects moving through the relativity regime, time passes at a different rate. My first challenge is to find a way to allow this. That isn't even the hardest part though.

In order for time dilation to work, and effectively reduce the timescales of interstellar travel, I need a way to do length contraction. Currently I do not know how to do this realistically, but I have an idea for how to fake it. Other stars would be effectively stationary with respect to Kerbol, so I can literally shrink the distance between stars along the active vessel's direction of motion, and effect all other ships likewise. Slow moving objects would not be effected, and therefore would orbit along as they always had. Note that doing this would not contract objectsb within these solar systems, just the systems themselves. Like I said, the straight line paths of other fast moving objects would be physically changed to reflect the contraction.

Then there's the matter of energy expenditure. As your velocity gets closer to c, your engines would effectively be providing less thrust. This would also need to be effected.

For this project to work, I need to know if those obstacles can be overcome. Is there any basis in the code for allowing different ships to experience time differently? I'd appreciate the feedback. Thanks!

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...