Race The Sun

Race The Sun

View Stats:
2.147.483.647 Points = Game ends?
I was wondering why so many players have the same amount of points in all-time-highscore. There are now 22 people in Normal and 4 in Hardcore with the exact amount of points above. Is this the end of this "endless" racer or some cheap exploit?
< >
Showing 1-7 of 7 comments
Leonard Mar 5, 2015 @ 2:09pm 
It is simply the highest possible number an integer of that type can store.They could have made it so that there can be a higher number but that would use more space.
EdgeCrusher Mar 5, 2015 @ 3:06pm 
I don*t dig the math, but good to hear that these points seem to be achieved honorably. Still a bit disappointing, flying like mad for an hour or so to share your rank with a lot of other players. On the other hand it is then probably time quiting to play this addictive game...
RedShadow Mar 6, 2015 @ 4:27am 
Originally posted by EdgeCrusher:
I don*t dig the math, but good to hear that these points seem to be achieved honorably. Still a bit disappointing, flying like mad for an hour or so to share your rank with a lot of other players. On the other hand it is then probably time quiting to play this addictive game...

Math is kinda simple, once you know how a number is stored in a computer memory.

It looks like this number is a signed long.

Signed means the values can range from before and after zero (negative numbers as well as positive).

And long means a big integer, which means a big number. So the devs thought they would need a big number. Good. But not good enough, you will see later why.

A signed long is 4 bytes. 1 byte is 8 bits. A bit is a 0 (zero) or 1 value.
So it's like a 32 bits lenght number.

With 32 bits you got something like this:
0000 0000 0000 0000 0000 0000 0000 0000
It should be 32 zeros.

And this can range from all these zeros above, to a full value like this:
1111 1111 1111 1111 1111 1111 1111 1111
32 ones.

This will represent all the possible values, hence the max value that can be reached.
Which is (2^31) - 1 = 2,147,483,647

Why the power 31 and not 32 ?
Because you need one bit to tell if the number is positive or negative.
Yep, this wastes 1 bit for that.

Why the -1 ?
Because here we count the 0 (zero) value.

An unsigned long would have been able to hold one more bit. Which is what the devs should have done since a score is rarely (never) negative.

With an unsigned long we would have been able to double the max score up to 4,294,967,295.

A little bit more challenging right?
:happymeat:
Last edited by RedShadow; Mar 12, 2015 @ 1:11pm
Arckal Mar 8, 2015 @ 1:47am 
Interesting explanation dude :D
EdgeCrusher Mar 8, 2015 @ 6:12am 
Thanks for your detailed response. Doubling max score won`t make any difference to me, for i`m playing this like some sort of short term meditation. Interesting anyway this computer witchery...
Wieke Mar 12, 2015 @ 8:49am 
Originally posted by RedShadow:
Because we start at power 0 (zero). From 0 to 31 you indeed have 32 stuff. Here 32 bits.

Why the -1 ?
Because you need one bit to tell if the number is positive or negative.
Yep, this wastes 1 bit for that.

I'm pretty sure you got the explenaitions mixed up, there are 2^32 possibilities half of which are used for negative numbers which leaves 2^31 possibilities for positive numbers which you could then use to count to 2^31 - 1 if you start counting at 0. Makes you wonder why they didn't use an unsigned integer, it's not as if they need to be able to record negative scores.
Last edited by Wieke; Mar 12, 2015 @ 8:50am
RedShadow Mar 12, 2015 @ 1:09pm 
Originally posted by Wieke:
Originally posted by RedShadow:
Because we start at power 0 (zero). From 0 to 31 you indeed have 32 stuff. Here 32 bits.

Why the -1 ?
Because you need one bit to tell if the number is positive or negative.
Yep, this wastes 1 bit for that.

I'm pretty sure you got the explenaitions mixed up, there are 2^32 possibilities half of which are used for negative numbers which leaves 2^31 possibilities for positive numbers which you could then use to count to 2^31 - 1 if you start counting at 0. Makes you wonder why they didn't use an unsigned integer, it's not as if they need to be able to record negative scores.

Guess you are right. The -1 is just cuz we start at 0. The ^31 instead of ^32 is the negative sign.
Yep I mixed the explanations :happymeat: Thx bro
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Mar 5, 2015 @ 2:00pm
Posts: 7