Jump to content

How to break the "68 years limit"(about 2^31s)?


Recommended Posts

I do not believe that KSP uses integers to represent time, but single precision floating point numbers. A 32-bit float has an upper limit of about 3.4e38 or 10^31 yr. However, the precision at that time would be rather low and the practical limits are much lower. If we assume that KSP can function with a maximum timestep of 2^-10 seconds (probably a very conservative estimate, the real limit is likely much higher), then the time when you can no longer achieve that level of precision from a 32-bit float is about 2^140 s or 4.4e34 yr.

Even at 100,000 times time acceleration, that's trillions of times the age of the universe.

Link to comment
Share on other sites

UT is stored as a double.

Even better. That means we have a trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion trillion times the life of the universe to work with :).

Link to comment
Share on other sites

I do not believe that KSP uses integers to represent time, but single precision floating point numbers. A 32-bit float has an upper limit of about 3.4e38 or 10^31 yr. However, the precision at that time would be rather low and the practical limits are much lower. If we assume that KSP can function with a maximum timestep of 2^-10 seconds (probably a very conservative estimate, the real limit is likely much higher), then the time when you can no longer achieve that level of precision from a 32-bit float is about 2^140 s or 4.4e34 yr.

Even at 100,000 times time acceleration, that's trillions of times the age of the universe.

The "68 years limit" seems to only affect the UT number that shows in Tracking Station. The game's still running after reaching that limit.

If that's right, the only problem is we have a lot of time but a clock to express it properly.

Edited by Cesrate
Link to comment
Share on other sites

The "68 years limit" seems to only affect the UT number that shows in Tracking Station. The game's still running after reaching that limit.

Then there might be a way to overide the display function.

Link to comment
Share on other sites

Good idea. Can modder do this?

I wonder... at what moment can a plugin get into and do the update job. Because you have to update that right between the vanilla KSP UI update codes and the render calls. Otherwise your modification won't affect that.

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