Blondai Posted August 4, 2022 Share Posted August 4, 2022 I'm sure I've seen someone say that the speeds of ships of in KSP2 would not warrant relativistic effects, however if they could, surely by inserting laplaces equations into the game on a ship by ship basis, and obv, having a max speed of C, you could save precious resource on ships, oxygen/snacks etc. Also, you could use General relativity, to have orbits that reflect GR, such as Moho around Kerbol being affected most, I'm sure this may have been discussed already, but coming back to forum ready for KSP2. Maybe some clever Moddershall in the future will help, I wouldn't know how it affects orbit calculations/projections. I don't mind either way really, I'm totally aboard the hype train. Link to comment Share on other sites More sharing options...
Maria Sirona Posted August 12, 2022 Share Posted August 12, 2022 Max speed of C would deny the fun from pwople like Danny2462 Link to comment Share on other sites More sharing options...
t_v Posted August 12, 2022 Share Posted August 12, 2022 Just now, Maria Sirona said: Max speed of C would deny the fun from pwople like Danny2462 Or make breaking physics even more fun and mind-bending. As you approach C, your perceived speed still goes up linearly, which means you can still "go faster than light" from your own perspective. Other things move at the speed of light but space is also compressed, making your speed higher Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 12, 2022 Share Posted August 12, 2022 On 8/4/2022 at 11:20 AM, Blondai said: however if they could, surely by inserting laplaces equations into the game on a ship by ship basis You have to put it like that, trying to sound like a Star Trek captain, instead of just stating it in plain English? On 8/4/2022 at 11:20 AM, Blondai said: Also, you could use General relativity, to have orbits that reflect GR, such as Moho around Kerbol being affected most, N-body only. Link to comment Share on other sites More sharing options...
t_v Posted August 12, 2022 Share Posted August 12, 2022 On 8/4/2022 at 6:20 AM, Blondai said: Also, you could use General relativity, to have orbits that reflect GR, such as Moho around Kerbol being affected most, I think that planets orbiting stars won't ever get fast enough to experience serious relativistic effects. As for ships, I actually don't know how things would be affected. If space is compressed, do you experience stronger attraction along the axis that you are traveling along relative to the axes that you are not traveling along? In either case, by the time you are moving that fast, your orbit isn't going to deflect much at all. 7 minutes ago, Bej Kerman said: You have to put it like that, trying to sound like a Star Trek captain, instead of just stating it in plain English? Kind of, in order to be precise. Laplace's equations can be applied in a way that allows you to calculate the gravitational field at any point outside of a hypothetical spherical, non-rotating, non-charged mass, which everything in KSP falls into, approximately. This would allow for time dilation as a result of gravity to be calculated, but the thing is that the same effect can be created by using much simpler functions that mirror the behavior of the complex one. Link to comment Share on other sites More sharing options...
daninplainsight Posted August 12, 2022 Share Posted August 12, 2022 18 minutes ago, t_v said: On 8/4/2022 at 6:20 AM, Blondai said: Also, you could use General relativity, to have orbits that reflect GR, such as Moho around Kerbol being affected most, I think that planets orbiting stars won't ever get fast enough to experience serious relativistic effects. As for ships, I actually don't know how things would be affected. If space is compressed, do you experience stronger attraction along the axis that you are traveling along relative to the axes that you are not traveling along? In either case, by the time you are moving that fast, your orbit isn't going to deflect much at all. Blondai was probably not thinking of objects orbits going really fast, but was instead referring to the real-life perturbations on the orbit of Mercury accounted for by general relativity. The likely issue with that, though, is that relativistic effects only account for minute differences in how orbits change over long periods of time, and it would be really resource-intensive to simulate those for low payoff. Using the Mercury example, effects predicted by general relativity only account for 43 arcsec of perihelion precession per century (periapsis shifts in orbit by 0.00012° per year), and having that level of precision wouldn't be all that helpful from a gameplay perspective, and certainly not worth the computational cost to achieve it. Since I believe the plan is to keep planets on rails like in KSP1 and not dynamically calculate planetary positions, this would add a mountain of computational cost. The issue of time dilation does seem to come up a lot on this forum, though, and the consensus seems to be that while it would be cool if time dilation got implemented, there's a lot of questions as to how you could actually implement it in a way that makes for fun gameplay and wouldn't cause all of your stuff in the background go wild when you were focused on a vessel moving at a high fraction of c. The devs haven't commented on time dilation at all, as far as I know. Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 12, 2022 Share Posted August 12, 2022 42 minutes ago, daninplainsight said: there's a lot of questions as to how you could actually implement it in a way that makes for fun gameplay and wouldn't cause all of your stuff in the background go wild when you were focused on a vessel moving at a high fraction of c. Care to clarify? We can already accelerate time up to 100,000x in KSP 1 - focusing on a vessel going 458m/s below c (unlikely scenario) would cause the background to accelerate 500-600x. How is that any more "wild" than just accelerating time a smidge in KSP 1? Link to comment Share on other sites More sharing options...
whatsEJstandfor Posted August 12, 2022 Share Posted August 12, 2022 1 hour ago, Bej Kerman said: Care to clarify? We can already accelerate time up to 100,000x in KSP 1 - focusing on a vessel going 458m/s below c (unlikely scenario) would cause the background to accelerate 500-600x. How is that any more "wild" than just accelerating time a smidge in KSP 1? Stuff moving slower relative to the near-lightspeed vehicle would be moving through time faster. So, supposing you have a vessel moving at 0.9c and you focus on it in real-time, it'd be like you're time-warping everything else in your universe by ~2x. And that factor would have to scale non-linearly, too, so no more nice integer multiples of time warp; you'd have to allow for objects at non-relativistic speeds to smoothly ramp up in their timewarps as your focused vessel approaches c. Plus, at more reasonable speeds, the time dilation would be pretty negligible. If a vessel is traveling at, say, .25c relative to the rest of the objects in the Kerbiverse, those other objects would only appear to be moving through time about 3% faster. Tbh I think the whole mechanic is 1. too annoying to implement efficiently and 2. doesn't provide enough interest or fun to even be worth it. Unless Intercept has managed to solve the problem of every object in the Kerbuniverse being able to timewarp by its own arbitrary fractional amount, and to compute all those effects in real time, I think time dilation is simply a non-starter. Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 12, 2022 Share Posted August 12, 2022 Just now, whatsEJstandfor said: you'd have to allow for objects at non-relativistic speeds to smoothly ramp up in their timewarps as your focused vessel approaches c Just now, whatsEJstandfor said: Unless Intercept has managed to solve the problem of every object in the Kerbuniverse being able to timewarp by its own arbitrary fractional amount These are made-up problems. A. Computers do not have as much trouble with fractions as humans, and B. KSP already does "arbitrary fractional" time warp for the transitions between warp factors - especially low warp factors. Link to comment Share on other sites More sharing options...
whatsEJstandfor Posted August 12, 2022 Share Posted August 12, 2022 Just now, Bej Kerman said: These are made-up problems. A. Computers do not have as much trouble with fractions as humans, and B. KSP already does "arbitrary fractional" time warp for the transitions between warp factors - especially low warp factors. I am a literal computer scientist and I can promise this is a harder problem than you think Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 12, 2022 Share Posted August 12, 2022 31 minutes ago, whatsEJstandfor said: 34 minutes ago, Bej Kerman said: These are made-up problems. A. Computers do not have as much trouble with fractions as humans, and B. KSP already does "arbitrary fractional" time warp for the transitions between warp factors - especially low warp factors. I am a literal computer scientist and I can promise this is a harder problem than you think Ok, nice. It's still not even a problem in the first place though, so there's no reason to claim that it is. As I just said, KSP 1 already does arbitrary time warp for the transitions between warp factors. KSP 2 is its own game, I know, but KSP 2 will be coming from developers with more experience; this won't be a problem. It isn't a problem. Link to comment Share on other sites More sharing options...
Blondai Posted August 15, 2022 Author Share Posted August 15, 2022 To be honest, I was worried people would mis-interpret or argue, personally, I'm quite happy for the reasons given by daninplainsight for GR, I was thinking of implementing a simple ratio for planets orbit relative to distance to the star. But obv that would not affect our little kerbal base, so yeah, implementing it would have minimal effect for too much hassle. I see what whatsEJstandfor has said, about needing every object being warped by a fractional amount, and agree with it, if this is possible, personally I like the idea of large colony ships and realistic Sub-C travel, I am quite fascinated by Laplaces equations and relativity, the Twin Paradox was always a fave when studying Astrophysics, which explains my interest. But I was never a computer scientist, so wanted input from other Kerbal fans. Thanks All Link to comment Share on other sites More sharing options...
daninplainsight Posted August 15, 2022 Share Posted August 15, 2022 On 8/12/2022 at 1:09 PM, Bej Kerman said: On 8/12/2022 at 12:19 PM, daninplainsight said: there's a lot of questions as to how you could actually implement it in a way that makes for fun gameplay and wouldn't cause all of your stuff in the background go wild when you were focused on a vessel moving at a high fraction of c. Care to clarify? We can already accelerate time up to 100,000x in KSP 1 - focusing on a vessel going 458m/s below c (unlikely scenario) would cause the background to accelerate 500-600x. How is that any more "wild" than just accelerating time a smidge in KSP 1? I did some number crunching (which I failed to do before asserting things would break in the background, oops), and yeah, you can get to a very large fraction of c without your Lorentz factoring breaking 100,000, so from a gameplay perspective any alarms you set could pause the game in a fairly straightforward way and let you deal with it before returning to your relativistic ship (probably). But to reach a Lorentz factor of 100,000 your vessel would have to be going 99.999999995% of c, or just 15 millimeters/s below c. Reaching those speeds (or even even the c - 458m/s) by accelerating constantly in one direction at 1g would take years from the perspective of the traveler and decades or centuries from the perspective of an inertial observer. I won't comment on the technical feasibility of implementing a system that can handle time dilation. However, especially with cheats enabled (like infinite fuel), the devs wouldn't want to rule out the possibility of very high Lorentz factors, even though the vast majority of players would experience a more physically realistic max Lorentz factor on the order of 1.03 or less, like what whatsEJstandfor said. An added wrinkle to any implementation of relativistic physics that I don't think anyone has brought up before is length contraction; at high fractions of c that would be extremely jarring to players that have never visualized it before. In my limited experience it would also probably be more difficult to implement than a simple time dilation system since, after all, we already have time warp. Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 15, 2022 Share Posted August 15, 2022 6 minutes ago, daninplainsight said: On 8/12/2022 at 6:09 PM, Bej Kerman said: On 8/12/2022 at 5:19 PM, daninplainsight said: there's a lot of questions as to how you could actually implement it in a way that makes for fun gameplay and wouldn't cause all of your stuff in the background go wild when you were focused on a vessel moving at a high fraction of c. Care to clarify? We can already accelerate time up to 100,000x in KSP 1 - focusing on a vessel going 458m/s below c (unlikely scenario) would cause the background to accelerate 500-600x. How is that any more "wild" than just accelerating time a smidge in KSP 1? I did some number crunching (which I failed to do before asserting things would break in the background, oops), and yeah, you can get to a very large fraction of c without your Lorentz factoring breaking 100,000, so from a gameplay perspective any alarms you set could pause the game in a fairly straightforward way and let you deal with it before returning to your relativistic ship (probably). But to reach a Lorentz factor of 100,000 your vessel would have to be going 99.999999995% of c, or just 15 millimeters/s below c. Reaching those speeds (or even even the c - 458m/s) by accelerating constantly in one direction at 1g would take years from the perspective of the traveler and decades or centuries from the perspective of an inertial observer. I won't comment on the technical feasibility of implementing a system that can handle time dilation. However, especially with cheats enabled (like infinite fuel), the devs wouldn't want to rule out the possibility of very high Lorentz factors, even though the vast majority of players would experience a more physically realistic max Lorentz factor on the order of 1.03 or less, like what whatsEJstandfor said. An added wrinkle to any implementation of relativistic physics that I don't think anyone has brought up before is length contraction; at high fractions of c that would be extremely jarring to players that have never visualized it before. In my limited experience it would also probably be more difficult to implement than a simple time dilation system since, after all, we already have time warp. I'm impressed with the level of detail you went into, kudos Link to comment Share on other sites More sharing options...
Nazalassa Posted August 24, 2022 Share Posted August 24, 2022 (edited) On 8/15/2022 at 6:56 PM, daninplainsight said: Reaching those speeds (or even even the c - 458m/s) by accelerating constantly in one direction at 1g would take years from the perspective of the traveler and decades or centuries from the perspective of an inertial observer. Well, I don't think so. Using the relation v = a t where a is the acceleration (in meters per second squared), v the speed at the end (in meters per second) and t the time (in seconds), we get: v = 9.809 t However, v = c = 300,000,000 so: 300,000,000 = 9.809 t t = 300,000,000 / 9.809 t ≃ 30584157.5 seconds or 354,4 days, which is a little less than a year (0.9698 year to be more precise) We have proved by calculations that it takes a little less than a year to reach light speed with an acceleration of 1G, from the perspective of an inertial observer. From the perspective of the traveler it would take a little less time (I don't really know how much... Perhaps 0.8 years?) (the math errors has been corrected) Edited August 24, 2022 by Nazalassa Math errors corrected Link to comment Share on other sites More sharing options...
t_v Posted August 24, 2022 Share Posted August 24, 2022 15 minutes ago, Nazalassa said: We have proved by calculations that it takes a little less than two years to reach light speed with an acceleration of 1G, from the perspective of an inertial observer. From the perspective of the traveler it would take a little less time (I don't really know how much... Perhaps 1.6 years?) From the perspective of the traveller, they would continue accelerating at a constant rate forever (it might change as TWR changes), but space would steadily be compressed around them. Still, if they used a meter stick on their home planet as a reference, they would see themselves accelerating at the same rate relative to that meter stick. But, what they would actually see is their acceleration slowing down from their own perspective, as they are accelerating past compressed planets and any amount of acceleration on the outside is shortened and reduced. The other thing that stops them from getting to light speed from the outside is that as the travelers approach light speed, they also slow down in time so their acceleration slows down dramatically. (sorry for that explanation which doesn't entirely help answer the question of 'is this a useful time span in-game') In short, outside observers see the craft slowly approach c, the craft sees itself accelerating slower due to scaled space, but at the same rate in terms of time elapsed. Link to comment Share on other sites More sharing options...
Nazalassa Posted August 24, 2022 Share Posted August 24, 2022 Yes, but from the point of view of an inertial observer it still takes 354.5 days. Link to comment Share on other sites More sharing options...
daninplainsight Posted August 24, 2022 Share Posted August 24, 2022 20 minutes ago, Nazalassa said: Yes, but from the point of view of an inertial observer it still takes 354.5 days. Actually that's not quite right If your measured velocity approaches c in reference to an inertial observer, the equation v = a t (t = v / a) doesn't hold, so it takes longer than 354.4 days to accelerate to v = c - 458m/s. It's basically due to how spacetime appears to bend to you, as @t_v said. No matter what you measured local "gravity" due to acceleration is, your velocity will never reach c, and your velocity increases less and less with the same energy added to your system. Which is why it takes 6.7 years of proper time (tau) to accelerate to v (actually w according to normal GR convention) = c - 458m/s with an apparent acceleration of alpha = 1g. It's a hyperbolic relation, following tau = (c / alpha) cosh-1(gammamax) Link to comment Share on other sites More sharing options...
FranFranz Posted August 24, 2022 Share Posted August 24, 2022 (edited) Hi everyone, this is my first post on the forum. Not a great writer, here, but I was reading posts for some time now... I am following the discussions about relativity, and I'd like to give my point of view on the thing, which essentially orbits around two points: 1) Technicalities First, I may be wrong, but it doesn't seem to me that special relativity is that hard to implement. For instance, it should be possible to calculate the slowing down of clocks by calculating their proper times (wikipedia) from the path followed by a vessel evaluated with respect to Kerbol, which boils down to a numeric integral easily performed by a computer. It seems some people are focusing on slowing down the rest of the universe from the point of view of the ship (which I agree would be hard to do), while instead one could simulate the slowing down of the time of the ship with respect to the universe. This should be much easier to implement, since one could just use the Lorentz factor to slow down the mission clock, the consumpion rate of resources, and adjust (possibily, I am not sure) the thrust produced by engines. This could be done independently for each ship. I don't know what's your opinion, but I would be already happy to see time slowing down, even without seeing Lorentz contraction or Doppler effects. 2) Education Secondly, and most importatly in my opinion, I wouldn't underestimate the educational value that including SR would bring to the game. The huge success of Kerbal Space Program is deeply rooted in how it makes hard concepts more intuitive, so it seems to me very natural to move forward and include SR effects in the game. Wouldn't it be great if some kid discovers something about special relativity because he/she sees the clock of its creations slow down? Besides, it needs not be a huge effect: a few seconds / minutes over some years mission could be enough to trigger the interest and it does not require large fractions of c to be visibile, especially if one could compare in the GUI the ground clock at Kerbin to the mission clock on the ship. This should be included even if all other SR effects are neglected (which is the case anyway if large fractions of c are prevented somehow). Edited August 24, 2022 by FranFranz Link to comment Share on other sites More sharing options...
Nazalassa Posted August 24, 2022 Share Posted August 24, 2022 Bah, anyways math is complcated enough like that :). Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 24, 2022 Share Posted August 24, 2022 1 hour ago, FranFranz said: It seems some people are focusing on slowing down the rest of the universe from the point of view of the ship (which I agree would be hard to do), We can speed the Universe up already with a feature literally every KSP player has used, how would it be difficult to do the same thing here? Link to comment Share on other sites More sharing options...
t_v Posted August 24, 2022 Share Posted August 24, 2022 1 hour ago, FranFranz said: it doesn't seem to me that special relativity is that hard to implement. *snip* I would be already happy to see time slowing down, even without seeing Lorentz contraction or Doppler effects. Welcome to the forums! (I know you've been here for a bit probably, but still). I think that Lorentz contraction and Doppler effects would also be relatively easy to approximate, so all three of them would be nice. However, they are also all complex enough that it isn't a no-brainer to add them. 1 hour ago, FranFranz said: I wouldn't underestimate the educational value that including SR would bring to the game. I think that this is why SR should be in the game - the concepts that people have illustrated above are not very intuitive or well-known, but neither is the reason the sky is blue and yet people from a young age know that the sky is blue (generally) but not that space contracts and time dilates when going fast. Just exposing people to the effects of relativity (through a video game) can allow them to see the effects and understand them, even if they don't understand the math or science behind them. Link to comment Share on other sites More sharing options...
whatsEJstandfor Posted August 25, 2022 Share Posted August 25, 2022 (edited) 3 hours ago, FranFranz said: For instance, it should be possible to calculate the slowing down of clocks by calculating their proper times (wikipedia) from the path followed by a vessel evaluated with respect to Kerbol, which boils down to a numeric integral easily performed by a computer This is where I'm disagreeing. I don't doubt there are efficient algorithms for numerically computing the integrals, but I contend that, if you're going to have SR in the simulation, it needs to be universal. That is, it doesn't just affect your ship, but every other body in the game (artificial, celestial, whatever). So, when focused on a specific ship, it'll need to perform those calculations in real time for hundreds of bodies. Especially for the ones that are orbiting, since their velocity vector is always changing relative to any objects that don't share that orbit. So that's one issue that makes me think it would be left out: the calculations necessary for computing the Lorentz transformation for every other body relative to whatever object you're focused on is too expensive, with too little reward. Another technical issue is time dilation. Suppose you have some interstellar ship very, very close to c (let's say 0.999c for fun), and you switch focus to it. Suppose you spend 5 minutes tinkering with stuff or checking on it, whatever, and then switch back to some object casually orbiting Kerbin. Suddenly, almost two hours have passed. Maybe that would be a fun problem to have to work around, but to me it seems like the game punishing you for simply necessarily having to keep track of multiple vessels. My point is that, while I'm sure Intercept could figure out how to overcome the technical challenges given enough time and resources, I don't see the inclusion of SR to add enough depth to be worth it. And, that if there's a more naive approach (maybe only compute SR effects within some fixed radius around whatever body you're watching, similar to how physics calculations are performed now), that any depth that SR would bring are functionally negated. Edited August 25, 2022 by whatsEJstandfor Link to comment Share on other sites More sharing options...
Bej Kerman Posted August 25, 2022 Share Posted August 25, 2022 2 hours ago, t_v said: Welcome to the forums! (I know you've been here for a bit probably, but still). I think that Lorentz contraction and Doppler effects would also be relatively easy to approximate, so all three of them would be nice. However, they are also all complex enough that it isn't a no-brainer to add them. 3 hours ago, FranFranz said: There are programs from the early 2000s (most of which I discovered through Prof. Andrew J. S. Hamilton's online writings about black holes) that do relativity in real time. Granted, not applying it to a universe full of independent vessels, but over a decade later and with much better developers, we can do better. Link to comment Share on other sites More sharing options...
whatsEJstandfor Posted August 25, 2022 Share Posted August 25, 2022 (edited) 5 hours ago, Nazalassa said: Using the relation v = a t where a is the acceleration (in meters per second squared), v the speed at the end (in meters per second) and t the time (in seconds), we get: When dealing with speeds approaching c, this equation breaks down. The correct equation, assuming the vessel is starting with velocity 0 at time 0, would be v/(sqrt(1-v^2/c^2)) = at Edited August 25, 2022 by whatsEJstandfor Link to comment Share on other sites More sharing options...
Recommended Posts