Author Topic: Why doesn't Freespace 2 run in 2099  (Read 4826 times)

0 Members and 1 Guest are viewing this topic.

Offline kode

  • The Swedish Chef
  • 28
  • The Swede
    • http://theswe.de
Why doesn't Freespace 2 run in 2099
that's a shame. I looked forward to still be playing fs2 35 years from now.
Pray, v. To ask that the laws of the universe be annulled in behalf of a single petitioner confessedly unworthy.
- Ambrose Bierce
<Redfang> You're almost like Stryke 9 or an0n
"Facts do not cease to exist because they are ignored."
- Aldous Huxley
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH

 

Offline YodaSean

  • 27
  • i am so special
    • http://www.geocities.com/radioactiveyeti
Why doesn't Freespace 2 run in 2099
A quick search on the internet for 2038 found the problem :)

Quote

The Year 2000 problem is understood by most people these days because of the large amount of media attention it received.

Most programs written in the C programming language are relatively immune to the Y2K problem, but suffer instead from the Year 2038 problem. This problem arises because most C programs use a library of routines called the standard time library (time.h). This library establishes a standard 4-byte format for the storage of time values, and also provides a number of functions for converting, displaying and calculating time values.

The standard 4-byte format assumes that the beginning of time is January 1, 1970, at 12:00:00 a.m. This value is 0. Any time/date value is expressed as the number of seconds following that zero value. So the value 919642718 is 919,642,718 seconds past 12:00:00 a.m. on January 1, 1970, which is Sunday, February 21, 1999, at 16:18:38 Pacific time (U.S.). This is a convenient format because if you subtract any two values, what you get is a number of seconds that is the time difference between them. Then you can use other functions in the library to determine how many minutes/hours/days/months/years have passed between the two times.

...A signed 4-byte integer has a maximum value of 2,147,483,647, and this is where the Year 2038 problem comes from. The maximum value of time before it rolls over to a negative (and invalid) value is 2,147,483,647, which translates into January 19, 2038. On this date, any C programs that use the standard time library will start to have problems with date calculations.

This problem is somewhat easier to fix than the Y2K problem on mainframes, fortunately. Well-written programs can simply be recompiled with a new version of the library that uses, for example, 8-byte values for the storage format. This is possible because the library encapsulates the whole time activity with its own time types and functions (unlike most mainframe programs, which did not standardize their date formats or calculations). So the Year 2038 problem should not be nearly as hard to fix as the Y2K problem was.



not that I really understand what it means :confused:

I guess freespace 2 uses that time.h thingy for the game loop or something.

edit:  after rereading this apparently it isn't hard to fix, you just recompile the program with a new time library from what I understand, this should be fixed in the next freespace open release(or whatever you call it)
« Last Edit: July 20, 2003, 12:56:51 am by 244 »

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Why doesn't Freespace 2 run in 2099
Use fs2_open's bug reporting system, Bugzilla :nod:
-C

  

Offline phreak

  • Gun Phreak
  • 211
  • -1
Why doesn't Freespace 2 run in 2099
well i was right, just used 2^32 instead of 2^31

ill look into this :blah:
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord