I'm opening this thread as a spin-off from the "Dissecting" one, so we can post file dissections and gameplay experiments on Stunts physical model in a neat way. It could also be useful as a place for experimental CarBlaster questions. The first results I would like to announce are on a pretty basic but very relevant question that can finally be solved with good accuracy now that we have better insight on CarBlaster workings and the graphic files coordinates:
How long a track tile actually is?
The obvious experiment is to race a car through some distance at constant speed, measure how long does it take and calculate the length accordingly, the "constant speed" bit being the troublesome part: Due to truncation of digital speedometer readings to an integer value and to the nature of the rpm curve (defined in steps of 128rpm) it is very hard to be confident about keeping a constant and known speed value, even with tricks such as holding the gas steadily at redline or lowering aero drag to zero (so that the car rolls on forever at constant speed). Moreover, ideally one would prefer to run this test at very low speeds, so that times and positions can be measured with better precision; however, the speed truncation means the relative error of the speedometer is very high at low speeds (if you assume that a reading of 10mph could be anywhere between 10 and 11, that makes for 10% relative error...). Thus, I ended up doing the most obvious procedure, picking the Lada Niva and shooting it to 245mph in a 27-tile long straight, delimited by water terrain so I could check exactly where the tile boundaries were. The actual speed might be slightly higher than 245mph due to truncation, but at such high speeds the effect on the overall result of a 1mph difference would be rather small.
The results attained were as follows: the Lada took 15.4s to cross the 27 tiles at ~245mph (I was very lucky in that the measurement was unusually accurate, for the nose of the car had almost the same relative position to the start and finish lines when crossing them). Some math reveals that the straight was (assuming exact 245mph speed) 1.048 mile long, and thus each tile would have 0.03882 mile.
And now for the interesting stuff, during which I'll use imperial units so the numbers get prettier. Since one mile is exactly 5280 feet, that means one tile measures 204.95 feet, very close to an integer number... since we should expect a slightly higher speed than 245mph due to truncation, it is perfectly reasonable to admit the developers made it so that each tile has exactly 205 feet, or 62.484 meters. That, in turn, triggers a cascade of interesting implications:
Some nice little things I, and possibly others, were curious about were clarified with those tests. Hopefully the informations can also be useful when people start to design track/scenery elements to scale...
How long a track tile actually is?
The obvious experiment is to race a car through some distance at constant speed, measure how long does it take and calculate the length accordingly, the "constant speed" bit being the troublesome part: Due to truncation of digital speedometer readings to an integer value and to the nature of the rpm curve (defined in steps of 128rpm) it is very hard to be confident about keeping a constant and known speed value, even with tricks such as holding the gas steadily at redline or lowering aero drag to zero (so that the car rolls on forever at constant speed). Moreover, ideally one would prefer to run this test at very low speeds, so that times and positions can be measured with better precision; however, the speed truncation means the relative error of the speedometer is very high at low speeds (if you assume that a reading of 10mph could be anywhere between 10 and 11, that makes for 10% relative error...). Thus, I ended up doing the most obvious procedure, picking the Lada Niva and shooting it to 245mph in a 27-tile long straight, delimited by water terrain so I could check exactly where the tile boundaries were. The actual speed might be slightly higher than 245mph due to truncation, but at such high speeds the effect on the overall result of a 1mph difference would be rather small.
The results attained were as follows: the Lada took 15.4s to cross the 27 tiles at ~245mph (I was very lucky in that the measurement was unusually accurate, for the nose of the car had almost the same relative position to the start and finish lines when crossing them). Some math reveals that the straight was (assuming exact 245mph speed) 1.048 mile long, and thus each tile would have 0.03882 mile.
And now for the interesting stuff, during which I'll use imperial units so the numbers get prettier. Since one mile is exactly 5280 feet, that means one tile measures 204.95 feet, very close to an integer number... since we should expect a slightly higher speed than 245mph due to truncation, it is perfectly reasonable to admit the developers made it so that each tile has exactly 205 feet, or 62.484 meters. That, in turn, triggers a cascade of interesting implications:
- Using stressed to make experiments with the track tiles, I verified each tile is 1024 points (internal coordinates/stressed units) long (track element graphics are usually slightly longer to generate some overlap and prevent any graphical glitches at the tile junctions). Now, the size of a stressed unit can be found by doing 205/1024 and, surprisingly enough, the result is almost exactly 0.2 feet! (the actual value is 0.2002ft; it would be exact should the tile length be 1025 points, but of course an odd-length tile would not be convenient at all).
- The height of a ramp/hill/etc. is 450 points; using the 205/1024 conversion factor that would amount to 90.09ft, or 27.46m. One might wonder about what Stunts gravity would actually be like expressed into numbers then. Using the fact that a car, when not affected by any weird bugs, takes ~1.45s to drop from a hilltop to the ground, Stunts' gravity acceleration would be 26.1m/s^2, some 2.66 times the real-life value... counter-intuitive, isn't it?
- It is widely known that Stunts cars cannot go faster than 245mph due to game engine restrictions. Converting that speed to internal Stunts units (points per frame) gives 89.83 points/frame. That is, a car running at 245mph covers a distance almost equal to its length in 0.05s (the Indy, for instance, is 98 points long). Now the need for an artificial speed limit in order to avoid excessively jumpy motion at 20 frames per second appears to be perfectly natural...
- And finally: have you ever had the impression that Stunts cars are a bit too large for the tracks they race on? Well, that's not just an impression anymore: Lancia, one of the shortest original cars, is 79 points long, which amounts to 15.8ft or 4.82m, surely much larger than the real car. Larger cars like the Corvette would be well over 6 meters... The reason for those distortions is pretty clear: just like the very tall hills with strong gravity, the game designers have done so because it looks better at low resolutions. And nobody was supposed to notice anyway
Some nice little things I, and possibly others, were curious about were clarified with those tests. Hopefully the informations can also be useful when people start to design track/scenery elements to scale...