Is there a limit of "days" in GT3?

  • Thread starter Thread starter evanl85
  • 55 comments
  • 4,379 views
Messages
40
Just wondering...I haven't gotten far enough to find out yet, but I remember in Sega GT if you went past a certain amount it'd just stop counting. Thanks


-Evan
 
The answer is "No, but".

The upper limit for speed/distance figures in the game is 2.147 billion. There's a truly fascinating reason behind it which I won't go into. Logically, though, the maximum limit for game days should also be 2.147 billion. You will not reach 2.147 billion game days, so effectively there is NO limit, but... :D
 
Trawl through one of the many Escudo/2 million mph threads. It's in there somewhere...
 
Originally posted by Famine
There's a truly fascinating reason behind it which I won't go into.
It's only truly fascinating to you. Everyone else fell asleep the last time you told us. :p
 
Originally posted by Famine
There's a truly fascinating reason behind it which I won't go into.


Isnt It Because 2.147 billion the Highest Floating Point Value The PS2 Can Process?
 
Well i'm at about 3,600 days into the game and haven't hit any limits yet. :/
 
Originally posted by spock
Isnt It Because 2.147 billion the Highest Floating Point Value The PS2 Can Process?

It's the game itself - it uses values up to 2 to the power 31. The reason why they picked that value is truly tedious, but it means the game doesn't crash when you reach 600 miles on your cars... I'll try and track down the whole explanation somewhere...
 
I've exhausted my looking-powers. Someone else can do it... :D

Nonetheless, 2^31 (2,147,483,648) is the highest value the game will read for speed/distance, so logically it'll also be the highest value for game days...


Okay - best explanation I can manage with my near-zero knowledge of computing matters...

As flat-out says


Originally posted by flat-out
speed is a integer value coded on 32 bits, which means 2^32 values ranging from - 2^31 to + 2^31.
When the speed reaches 2^31 (which is the 2 billion something I mentioned) it exceeds the maximum possible value and causes the software crash.

I assume the next alternative down to coding on 32 bits is coding on 16 bits. Using flat-out's example, this would give 2^16 values, ranging from -2^15 to + 2^15. 2^15 is... 32,768 - so as soon as you reached 32,768 miles (or km...) travelled in total, the game would crash. I don't know about you, but I've gone well past that distance on my games. So that's why the speed and distance blah blah blah blah... :D
 
Originally posted by Famine
I've exhausted my looking-powers. Someone else can do it... :D

Nonetheless, 2^31 (2,147,483,648) is the highest value the game will read for speed/distance, so logically it'll also be the highest value for game days...

And how many laps you can do, someone get Bollocks#999 in here to test that out!
 
Pfft - I'M leading the way in the 100 laps of Complex String...

Might have a crack at the SSR11 one this week too :D
 
I'd rather feed my testes to a Guinea Pig.


Edit: Oddly, that was my 6000th post here... :D
 
Originally posted by Famine
As flat-out says
I assume the next alternative down to coding on 32 bits is coding on 16 bits. Using flat-out's example, this would give 2^16 values, ranging from -2^15 to + 2^15. 2^15 is... 32,768 - so as soon as you reached 32,768 miles (or km...) travelled in total, the game would crash. I don't know about you, but I've gone well past that distance on my games. So that's why the speed and distance blah blah blah blah... :D
Good assumption I would say, but that's not the way it works. Actually it seems to me that most variables in the game are of type 'integer', thus limited to the famous 2,147,483,647. (Sorry Spock, this is 'integer', not 'floating point', but it's indeed a limitation of the PS2 chip. Floatint point would have allowed much higher values.)
This limitation is true for the speed (as those who manage to go past the track borders know), and also for the credits, the number of days...
BTW, that would represent in game-time about 5.8 million years (enough for never being reached).

Daan and others who just don't care, you can jump to the next post or thread unless you fancy a little nap right now, because I'll do the explanation again.
But first I'll put some keywords that should make this stuff easier to find in the future.
Keywords : integer - value - maximum - floating point - 2million - crash - out of range - memory - variable - bit - byte

Explanation :
Computer chips work with 'bits'. A bit is something with a value 0 or 1, nothing else (that's why we call things made out of bits 'binary'.)
A byte is made of 8 bits, so it can have 256 different values : 00000000, 00000001, 00000010, 00000011, 00000100, 00000101... 11111111. The number of values is easily calculated by considering that the first bit can have 2 values, and for each of them the second bit can have again 2 values... So the byte can have 2x2x2x2x2x2x2x2 = 2^8 = 256 values).
An integer value is usually stored on 4 bytes (thus 4x8 = 32 bits), then it can take 2^32 values. Half of these values are negative ranging from - 2^31 to -1 (and we don't care in our case), the second half are positive, ranging from 0 to -(2^31)-1. This is how the maximum speed/days/credit/races won... is calculated : 2,147,483,647.
 
Originally posted by flat-out
Explanation :
Computer chips work with 'bits'. A bit is something with a value 0 or 1, nothing else (that's why we call things made out of bits 'binary'.)
A byte is made of 8 bits, so it can have 256 different values : 00000000, 00000001, 00000010, 00000011, 00000100, 00000101... 11111111. The number of values is easily calculated by considering that the first bit can have 2 values, and for each of them the second bit can have again 2 values... So the byte can have 2x2x2x2x2x2x2x2 = 2^8 = 256 values).
An integer value is usually stored on 4 bytes (thus 4x8 = 32 bits), then it can take 2^32 values. Half of these values are negative ranging from - 2^31 to -1 (and we don't care in our case), the second half are positive, ranging from 0 to -(2^31)-1. This is how the maximum speed/days/credit/races won... is calculated : 2,147,483,647.
sleeping-smiley-003.gif
 
Originally posted by daan
sleeping-smiley-003.gif
Thanks for staying till the end Daan, I really appreciate but that's over now, you can wake up and go back home.

...............................................

Daaaaaaaaaaaaan,
yell.gif
WAKE UP !!!
 
Originally posted by flat-out
BTW, that would represent in game-time about 5.8 million years (enough for never being reached).

Can't someone do some 304 editing in MK's to put their day at 2,147,483,647 then try to go to the next day?
 
I did it and I actually checked that this is the maximum value MK program can accept. (If you put the hex value 7FFFFFFF it is converted to 2,147,483,647, if you put the hex value 80000000 -that is if you do +1- it's converted to - 2,147,483,648.) In the game however, the number of days was set to 1. I think there is an internal test on the value and its maximum is much smalller than 2^31.
However, this worked for the credits and I had 2,147,483,647 Cr. It's a pity I already have all cars in my garage...
 
Do you have any proof at all for this, or are you just guessing? The entire first page of this thread explored various valid theories, but no-one stated an absolute value.
 
I think it's 4 anna half.



Oh.... wait a minute.... I've past that. It must be 5932.3 days.
 
Easy to check with an X-port. I'll try 10,000 and post the result. I hope by tomorrow.
 
Flat out comes through with the explanation of the day. I'm surprised they didn't use signed integers and save the space.

Floating point numbers are generally used to store fractions, numbers with decimal points. If you're only going to be using whole numbers, as you would for days, credits, etc, then it makes more sense to use integers as there's less chance of messing them up.
 
Sorry Gamer53, 9999 is not the limit of days in GT3. I set the number of days to 10,000 on my savegame (304 Editing with MK's program), then I played a few races, and I'm now on day 10,004.
The only thing that happens is that I don't fully see the word 'Day' on the screen.
I'll try again with 99,999 ;)

@ Eagle : they are using long integers (32 bits), but only positive values. That's why the theoretical maximum is at 2^31.
I think the real limit takes the number lenght into account.
 
Back