Jump to content

Does KSP have a time limit?


The_8_Bit_Zombie

Recommended Posts

1 hour ago, The_8_Bit_Zombie said:

Or does it just loop back around without messing up anything?

I mean, I guess this is possible.    But I have never heard of anybody hitting the high end of the time variable yet, so I don't know if anything would occur similar to a K2K (Kerbal 2000) problem. 

I curious myself, maybe somebody with more intimate knowledge of how KSP stores time data can speak up....

Link to comment
Share on other sites

There is a limit to the precision of the floating point numbers used that KSP utilizes to display dates.

 

At some point, the precision will be very jittery and that will cause orbital calculations to go haywire. Onrails stuff will break once the seconds in the game are above 100000000000000 seconds, which is a crazy long time. 12 million kerbin years, give or take.

Could happen 10x or 100x earlier, but at some point the precision will just still be good enough for the game to work.

Link to comment
Share on other sites

Well the time is actually calculated in seconds in code and uses a Double.  In c# a double can have a max size is well pretty large.  In fact if you do the math on it you start getting 2.083333333333e-5 days maximum in KSP.  Or 2.9761904761899998e-6 weeks.  Or 5.707762557076712e-8 years.  

Of course this math could be all wrong, since I used googles Seconds to days ---> Days to Weeks ---> and days to years calculations to get these numbers in which case it might not be capable of large numbers. In fact I know its wrong.  But I think you get the point. :)

Good luck hitting that. :)

Edited by malkuth
Link to comment
Share on other sites

6 hours ago, malkuth said:

since I used googles Seconds to days ---> Days to Weeks ---> and days to years calculations

But kerbal time is 6 hours to a day, not 24, so you'll have to throw in a x4 somewhere.    Plus, isn't a Kerbal year 400 days?   If so, you'll have to toss out the weeks too, and just go from days to years. 

 

5 hours ago, Rocket In My Pocket said:

You can't time warp in real life silly!

That's what naps are for!

Link to comment
Share on other sites

https://stackoverflow.com/questions/1848700/biggest-integer-that-can-be-stored-in-a-double
 

Quote

The biggest/largest integer that can be stored in a double without losing precision is the same as the largest possible value of a double. That is, DBL_MAX or approximately 1.8 × 10308 (if your double is an IEEE 754 64-bit double). It's an integer. It's represented exactly. What more do you want?

1.8 × 10308
For comparison, 3.1557 x 1011 is 10,000 years of earth time. So TCIS's suggestion won't work.

2 hours ago, The_Cat_In_Space said:

Another way to find out is to simply go to the tracking station, time warp to max, and just let it run for like an hour.

 

Edited by DeltaDizzy
Link to comment
Share on other sites

The max time value is 2 147 483 647 years, 425 days(*), 5 hours, 59 minutes, 59 seconds (UT = 19760285526235197):

MShwgdH.png

 

One second more (UT = 19760285526235198), and the time becomes negative - probably due to the year being calculated as a signed integer and at that point flipping over (dec 2147483648 = hex 0x80000000):

QY01YTs.png

 

Which the game surprisingly still seems to be ok with for almost an entire year... at which point time stops completely. And the game, I might add:

VNmbQRh.png

 

(*: the save screen and MET indicators show days in ordinals, so it's 425 and not 426)

Edited by swjr-swis
425 vs 426
Link to comment
Share on other sites

16 hours ago, swjr-swis said:

probably due to the year being calculated as a signed integer

I find that kind of surprising.  For values that you don't want to ever be negative, why not force an unsigned int?   

Unless of course, the devs asked themselves "What fool would even reach that high of a value?  Let's leave it signed so we can have easier error handling!"

And the player base responded "That fool would be us!  Challenge accepted!"

 

If I have learned anything from playing KSP, is that the devs have designed this game to perform pretty well at reasonable activities, and us fools have shown them time and time again, that we do not do reasonable things. 

 

Link to comment
Share on other sites

1 hour ago, Gargamel said:

If I have learned anything from playing KSP, is that the devs have designed this game to perform pretty well at reasonable activities, and us fools have shown them time and time again, that we do not do reasonable things. 

If we all kept ourselves limited to what is generally considered 'reasonable', we'd never have tried flight, let alone space. Or a game about space.

 

Space. I like space. So much space. Space. Are we in space yet? Spaaace! Space.

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