Jump to content

max number of year?


lammatt

Recommended Posts

since 0.23.5 they made a kerbal day = 6hour (as it supposes to be, i had no idea they made it 24hr before.)

is the max number of years still 58? or is it 58x4= 233?

Edited by lammatt
Link to comment
Share on other sites

The maximum time listed is always 2,147,483,647 seconds (or half of a 32-bit integer). That's 99,420 Kerbin days, or about 233 Kerbin years.

O... didnt realize the limitation comes from the 32bit data entries. but rethinking after reading your answer,...of cos it works that way, what was i thinkimg,...>.<

thanks bro.

Link to comment
Share on other sites

O... didnt realize the limitation comes from the 32bit data entries. but rethinking after reading your answer,...of cos it works that way, what was i thinkimg,...>.<

thanks bro.

Generally, unless a pre hard-coded limit is added (for example money earned for doing x) the limit is always the upper/half-upper of the bit system in use. :-)

Link to comment
Share on other sites

That happens at 233 years?

Some players might have reached this with normal play, if they do many long missions over multiple months

it'll probably go back to 0yr and just introduce some glitch into the game because of the extra 1 in the next digit (which shouldnt be there)

Link to comment
Share on other sites

It would take 6 hours at constant 100,000x time warp to even get to that point. And half of a 32-bit integer is the hard limit for displayed time; the game appears to be able to keep track of time units larger than that for overall elapsed time.

Link to comment
Share on other sites

Hmmm...I didn't know about this when I randomised my start time. I started in Kerbin year 27, so have already lost about half my duration...

That said, the way I play I'm unlikely to hit the limit. It's a bigger problem for one-mission-at-a-time players.

Link to comment
Share on other sites

wow thats bizzare. why not store seconds, minutes, hours, days, months, and years all separately?

store right now for example as:

25s; 44m; 12h; 11d; 6mn; 2014y

seconds/minutes roll back to zero every 60 units, hours roll over every 24, days are coded so the roll over depends on the value of the months, and leap days in february are added based on the value of the year(since it happens every 4 years consistently)

Link to comment
Share on other sites

what do you mean? the system i propose can go 9999999999999999999999999999999999999999999999999999999999.......years

no digit limit. it would out live our sun

i would think a computer can deal with numbers between 1 and 60, 1-24, 1-~30, 1-12, and between 1-100,000,000,000,000. just add 1 to the second counter every second.

Like an odometer with two 60 wheels, a 24 wheel, a 31 wheel, a 12 wheel, and a 100,000,000,000,000,000 wheel.

we could actually make this analog, why couldnt digital do it?

Edited by r4pt0r
Link to comment
Share on other sites

One may know about the Pacman bug that, when going past the 255th level to the 256th one, levels starts to go crazy.

One might also know the Far Lands back in Minecraft Beta, where past x or y = 2^16, terrain generation became crazy.

What will happen depends to where is used the value. Here in KSP I think that the time is used for moving planets and ships. So bad things will happen to them (planets going in crazy directions, ships being eaten by the Long Time Kraken).

Link to comment
Share on other sites

The computer still needs to store the number of years and that number can only be so large, for the same reasons that the number of seconds can only be so large.

I ran into a similar issue with a database a while back. Someone defined the field as Integer Single, instead of Integer Double. Well when I tried to create invoice number 32768, it didn't much like it. Took me a while to figure that one out, because 32767 didn't ring a bell.

Link to comment
Share on other sites

what do you mean? the system i propose can go 9999999999999999999999999999999999999999999999999999999999.......years

no digit limit. it would out live our sun

i would think a computer can deal with numbers between 1 and 60, 1-24, 1-~30, 1-12, and between 1-100,000,000,000,000. just add 1 to the second counter every second.

Like an odometer with two 60 wheels, a 24 wheel, a 31 wheel, a 12 wheel, and a 100,000,000,000,000,000 wheel.

we could actually make this analog, why couldnt digital do it?

You edited after I initially replied and added a bit.

There is no such thing as a "no digit limit" number in a computer, everything is finite. If your year counter could store infinite digits, why bother breaking it up into days, months, years; it is better computationally to just store a number of seconds in that infinite digit number.

The solution is not more values for years, months, days, hours, minutes; that just makes every calculation done with time more complex and error prone. The solution is a second counter with greater capacity. More bits to store the time/date data.

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