![]() |
Time limit above 999, random characters in timer - Printable Version +- CC Zone - Chip's Challenge Forum (https://forum.bitbusters.club) +-- Forum: Chip's Challenge (https://forum.bitbusters.club/forum-4.html) +--- Forum: General Discussion (https://forum.bitbusters.club/forum-13.html) +--- Thread: Time limit above 999, random characters in timer (/thread-1235.html) |
Time limit above 999, random characters in timer - Eric119 - 27-Aug-2017 Quote:Signed and unsigned integers have the same bit representations; the difference is how the bits are interpreted (see https://en.wikipedia.org/wiki/Two's_complement). Yes, I think something like this must be the case. Presumably the game checks whether the time limit is greater than 0 to see whether the level is timed. This, probably, also explains why the digits become yellow: the time remaining is <= 15 seconds. Quote:* I was a bit ambiguous above; it is the time bonus points that overflow, which starts as early as time=3277. (since 32770 > 32767) It is not unique to time limits above 32768, and in fact there is no discontinuity between the time bonus points at time=32767 (-10) and time=32768 (0). Ah, OK. Note that this is fully consistent with signed 16-bit arithmetic. With either signed or unsigned, we are working modulo 65536, and the only difference is what range of values we normalize the final result to. Or, more concretely, -2^15 * 10 is divisible by 2^16, so when coerced to the range [-2^15, 2^15) we get 0. Time limit above 999, random characters in timer - NiHaoMike - 27-Aug-2017 The strange stuff happening when the hundreds digit is above 9 seems to be an effect of pointer arithmetic. The idea being that when CPU is scarce, pointer arithmetic is a very efficient way to implement a lookup table. Since the table only has 9 digits defined, beyond that the program would simply (try to) read whatever happened to be in RAM at the spots beyond 9. The real question is whether or not someone could come up with a level that would actually use a significant part of a slightly more than 9 hour limit and still be interesting to play. Time limit above 999, random characters in timer - M11k4 - 29-Aug-2017 Quote:The real question is whether or not someone could come up with a level that would actually use a significant part of a slightly more than 9 hour limit and still be interesting to play.And the real answer is no. ![]() Time limit above 999, random characters in timer - 1033Forest - 07-Sep-2017 Highest possible time limit = 32767 32767 * 1.17 = 38337.39 seconds real time 38337.39 seconds = 10.649275 hours (10:38:57) |