Jump to content

A (hopefully) simple way that special relativity might be approximated


Recommended Posts

I am obviously not fully in the know about the technical side of KSP2 development, but I have reason to believe that a good enough approximation of special relativity is relatively doable (no pun intended).  Doable enough that I want to try to mod it in if the devs don't implement it.

It's entirely possible that traveling fast enough to experience relativistic effects may not be possible with the engines we will be getting in the future of KSP2.  In the KSP tutorial stream done recently, the example number for the specific impulse of the Crucible was 100,000 seconds.  At that efficiency, assuming that number is to be trusted, you'd need an utterly impossible fuel ratio to get near light speed.  It may very well be that the tyranny of the rocket equation will be the thing  that keeps us below light speed, just as it did in KSP1.  But the theoretical limit on specific impulse is 30,570,000 seconds (corresponding to an effective exhaust velocity of the speed of light), and even if the devs don't provide engines which get anywhere near that point the modders certainly will.  An ideal photon rocket like that would be able to get to light speed with a fuel ratio of barely over 60%.  Plus, it would be a waste to have a whole game where you have realistic interstellar travel between multi light year stars where you don't take the chance to show players why the speed of light is the hard speed limit of the universe.  KSP2 would be improved if it showed people what it feels like to hit up against that speed limit.  That would be super cool.

My proposal is to have a different on-rails model for trajectories that you switch to when  a ship goes above some threshold speed, perhaps 10% the speed of light.  Below that speed, everything works as it does now.  In this high-speed model, trajectories are approximated as straight lines (with gravity being ignored entirely) and time dilation takes effect.  The time dilation itself could be modeled in a very simplistic way where the vessel's speed is used to calculate a lorentz factor, and that lorentz factor is used to scale every time-dependent variable on the ship.  Engine thrust, fuel consumption, RTG lifetime, electrical power production, electrical power consumption, the speed of converter parts, the rate at which heat builds up and dissipates, all that stuff.  Slow the ship down in time relative to the rest of the game.  This would have the effect of making engines weaker and less efficient asymptotically as you approach light speed, making it take infinite delta-v to get to light speed just like how it works in the real world.

It seems pretty straightforward to me.  Which of course in software development means that it will be horrendously complicated at best.  But it's worth a shot.

Edited by mikeman7918
Link to comment
Share on other sites

Interesting approach.

But you would have to take into account multiple frames of reference. If you are currently flying the vessel, the UTC time should be getting slower and slower as you accelerate. But all processes on the current vessel should advance at "normal" speed (relative to you, the Player). 

If you switch to the KSC for example the UTC time advances normal, but Ressource generation, electrical consumption,... on the moving vessel should advance slower.

EDIT:

Basically every vessel and every body has its own frame of reference and you would have to calculate every velocity difference to every other vessel/body. 

I could imagine that this would be very CPU consuming.

Edited by Bingmao
Link to comment
Share on other sites

19 hours ago, Bingmao said:

But you would have to take into account multiple frames of reference.

Not really, no.  One convenient thing about relativity is that all reference frames will agree on all measurable results, so you only actually need to calculate out one of them.

Slowing down universal time doesn't actually make much sense in practice.  This is because it won't matter that time on Kerbin is running slower from the ship's point of view, in order to know that time is running slower on Kerbin the crew of the starship will need to turn around and in the process of accelerating they will Lorentz transform Kerbin into the past from their frame of reference such that by the time they return they will find that more time passed on Kerbin than passed on the starship.  Simply slowing down time for the moving starship as I suggest would have an identical outcome.  Same with any light speed signal sent from Kerbin containing the time, the signal travel time is different in different reference frames due to lightspeed frame invariance and length contraction such that both reference frames agree on what the clock of the starship will be once it gets the message from Kerbin.  There is no point in calculating both reference frames, especially for the effort that it would take to overhaul the physics engine to such a major extent.

I do like the idea of changing sim speed to match the Lorentz factor of the active ship, but that might add some more complications both in theory and in implementation.  The definition of meters and seconds is different in different reference frames, so which one does the navball show as your speed?  I do really like the idea of burning an engine for ages and watching as your speed gets closer and closer to 299,792,458 meters per second without ever reaching it, which would be measured from an external reference frame.  But then from the ship's perspective that speed would be a lie, if you don't simulate length contraction you would see the distance to a distant star ticking down faster than what your speed says.  If you do simulate length contraction it will seem like distant stars spontaneously get closer as you accelerate towards them, and then the distance would tick down slower than what your speed would suggest once you stop accelerating.  That's the tradeoff you'd have to make.

I think it would just be so much cleaner to have the player camera always operate in the "stationary" frame of reference.  Ships at relativistic speeds would just have their clocks slowed down.  Length contraction of the ship itself doesn't matter in the context of the game, good luck trying to stage an actual Barn Paradox scenario to prove that it's not being simulated.  If I end up modding this into the game myself, this is how I will do it.

---

My current thinking is that I will wait until interstellar is released, and if that update does not include any kind of special relativity approximation I will immediately get to work on a mod to add it.  I don't know if I'll be able to pull it off, but I'll give it my all and see what comes of it.  My ultimate goal is to show that it's possible, and maybe I can convince the developers to implement it.  If not, at least there will (hopefully) be a mod for it.

Albert E Kerman shall be proven right!

Edited by mikeman7918
Link to comment
Share on other sites

At .1c the lorentzfactor is barely 1.005. You would need to go over .4c to achieve a noticable factor of 1.1, but I don't think that will be remotely achievable without mods. Since KSP already simplifies classical physics, adding any form of relativity to the base game would therefore be pointless. However, given that there will be mods with relativistic engines, time dilation would be a good addition to limit ship velocity and give players a hint of special relativity.

On 2/4/2024 at 8:45 AM, mikeman7918 said:

good luck trying to stage an actual Barn Paradox scenario to prove that it's not being simulated

I wouldn't underestimate the KSP community. You'd only need a mod to simulate .0000001x time, or build a ridiculously long ship and barn. Would be fun to watch though.

Link to comment
Share on other sites

13 hours ago, MirageNL said:

At .1c the lorentzfactor is barely 1.005. You would need to go over .4c to achieve a noticable factor of 1.1, but I don't think that will be remotely achievable without mods.

I did  acknowledge that in my original post.  Applying math to the spiciest confirmed interstellar-class engines implies that you need utterly impossible fuel ratios to reach relativistic speeds.  But this might only be the case because the devs deemed relativistic physics too hard to add, so they are relying on the tyranny of the rocket equation to keep us slower than light.  There are plenty of theoretical engines that are efficient enough to achieve relativistic speeds though, and it would be cool if the devs could add some.  The KSP2 devs themselves probably think so too, I know that Nertea has previously modded in an antimatter torch drive with a specific impulse that approaches the theoretical limit of 30 million seconds which could get to relativistic speeds easily, and he’s one of KSP2’s main concept designers.

If this ends up in fact being purely the domain of mods, I do hope to be the modder who keeps these hubristic Kerbals below the universal speed limit.  Once the interstellar update releases, I’ll get right on developing that.

13 hours ago, MirageNL said:

I wouldn't underestimate the KSP community. You'd only need a mod to simulate .0000001x time, or build a ridiculously long ship and barn. Would be fun to watch though.

That’s probably true.  Still, it’s a lot of work for a feature that will only be noticed by very few people.

Link to comment
Share on other sites

On 2/4/2024 at 8:45 AM, mikeman7918 said:

I think it would just be so much cleaner to have the player camera always operate in the "stationary" frame of reference. 

Thanks for the clarification. That makes total sense now.

Aha, and with "speed" you mean the speed relative to the star of the system you are currently in

On 2/3/2024 at 3:30 AM, mikeman7918 said:

[...] where the vessel's speed is used to calculate a lorentz factor, [...]

and not relative to a nearby body, as you imply here, that it only works in interstellar travel

On 2/3/2024 at 3:30 AM, mikeman7918 said:

In this high-speed model, trajectories are approximated as straight lines (with gravity being ignored entirely)

 

I am really looking forward to it!

Edited by Bingmao
Typo
Link to comment
Share on other sites

I am a bit confused in that in your initial proposal you just suggest accounting for the Lorentz-factor, but when someone brings up the issue with the relativity of the frames you instead mention Lorentz-transforming to correct. This would make your proposal much less simple than you originally seem to suggest. When do you do the Lorentz-transformation?

It's also worth noticing that you only want to apply when speed exceeds 0.1c - so if I first travel away from Kerbin at 0.9 c (triggering your mechanics) but then return to Kerbin at 0.099c (using normal physics) what happens? When do you do the correction?

In either way I don't think proposal would be good since by forcing the camera to the star's frame of reference you leave out extremely important items, like the fact that from the point of the ship the length contraction indicates that you can reach arbitrarily distant objects in short subjective time, or expressing this differently: from the ship's perspective the engines don't really get less efficient.

With the player camera operating in the stationary frame of reference you also get very weird things happening since it actually moves with the ship, such as a relative velocity of another vessel than the one you are focusing on exceeding c as seen fromt he camera.

tldr; I think it gives the player a very wrong understanding and intuition for special relativity and I don't see any gameplay advantages offsetting this.

The sphere of influence model is also a simplification but one that is much better than preserving the essential features.

Link to comment
Share on other sites

5 hours ago, Bingmao said:

Aha, and with "speed" you mean the speed relative to the star of the system you are currently in

When dealing with speeds this high, it hardly matters what you measure it relative to.  My current thinking if I make this mod is that I'll just use speed relative to world coordinates, which I believe Kerbin and possibly all stars will be stationary with respect to.

2 hours ago, MarcAbaddon said:

I am a bit confused in that in your initial proposal you just suggest accounting for the Lorentz-factor, but when someone brings up the issue with the relativity of the frames you instead mention Lorentz-transforming to correct. This would make your proposal much less simple than you originally seem to suggest. When do you do the Lorentz-transformation?

Time dilation, that's what the Lorentz factor would be for.  It wouldn't be a full Lorentz transformation.

2 hours ago, MarcAbaddon said:

It's also worth noticing that you only want to apply when speed exceeds 0.1c - so if I first travel away from Kerbin at 0.9 c (triggering your mechanics) but then return to Kerbin at 0.099c (using normal physics) what happens? When do you do the correction?

Since I'd only simulate a single frame of reference, what would happen is that the ship would experience less time than Kerbin due to the time dilation it experienced on the way out, and on the way back there'd be no time dilation.  No correction is needed because in the way this gets simulated there is never a paradox.  And this result would be the same as what you'd expect in real life, give or take a small margin of error.

2 hours ago, MarcAbaddon said:

In either way I don't think proposal would be good since by forcing the camera to the star's frame of reference you leave out extremely important items, like the fact that from the point of the ship the length contraction indicates that you can reach arbitrarily distant objects in short subjective time, or expressing this differently: from the ship's perspective the engines don't really get less efficient.

The idea would be to communicate to players why the engines seem to be getting weaker and less efficient, that it's due to time dilation.  If players look at this and ask why the crew can travel light years in arbitrarily short amounts of time from their perspective, they can look it up and learn that from the crew's perspective length contraction will physically shorten the journey.  But I see no reason to portray that given how much effort it would take to program, nor do I see how you'd even do that from a technical point of view.

If you really want a lore explanation, there is a clean one.  In KSP you aren't playing as the Kerbals on the ship, you are playing as the space program director back on Kerbin.

2 hours ago, MarcAbaddon said:

With the player camera operating in the stationary frame of reference you also get very weird things happening since it actually moves with the ship, such as a relative velocity of another vessel than the one you are focusing on exceeding c as seen fromt he camera.

That is true, but personally I don't see that as a big issue.  You'd have to try really hard to even prove that two ships can fly past each other with a relative speed of nearly twice the speed of light.  Anyone trying that hard to test the limits of the game's simulation of special relativity probably already understands special relativity.  99.9% of players would never run into a situation where that matters.  And from a stationary frame of reference, it's not even a wrong prediction.

2 hours ago, MarcAbaddon said:

tldr; I think it gives the player a very wrong understanding and intuition for special relativity and I don't see any gameplay advantages offsetting this.

The sphere of influence model is also a simplification but one that is much better than preserving the essential features.

The main gameplay advantage is that the speed of light would be enforced as a hard speed limit even if the player had arbitrarily efficient engines, doing it in a way that can help players understand why it's impossible.  It would lack length contraction, but players would have no easy way of noticing that anyway.  It would have only one frame of reference, but that's enough to get the measurable results right.  This would make special relativity work in every way that is relevant to a player flying a starship at relativistic speeds between the stars.  They aren't driving relativistic trains into barns or comparing clocks as they fly past another ship here, for our purposes just having time dilation applied to all time-dependent aspects of the ship would do the job quite well.

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