News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Physics investigations on Stunts

Started by Duplode, December 09, 2008, 01:05:09 AM

Previous topic - Next topic

Duplode

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. (2024 edit: this is not entirely accurate; see these remarks downthread.) 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... ;)

CTG

You have too much time for thinking... :D

Few years ago I calculated the length of tiles to be able to tell the length of the lap (middle line). But those facts about gravity and sizes sounds really mad. :D

Duplode

In fact I had already tried to do those experiments several years ago (long before joining), but they were left incomplete due to lack of knowledge on the game internals. Now that the info was available, I felt compelled to finish them  :)

Quote from: CTG on December 09, 2008, 01:27:28 AM
Few years ago I calculated the length of tiles to be able to tell the length of the lap (middle line).

You mean for the USC stats? I though you just used the time and the average speed data to calculate it...

Chulk

Quote from: CTG on December 09, 2008, 01:27:28 AM
Few years ago I calculated the length of tiles to be able to tell the length of the lap (middle line).
Did you get the same results?

Really some interesting info, Dup. Nice findings!
Yes, it is me. No, I'm not back at racing (for now...)

CTG

#4
Quote from: Duplode on December 09, 2008, 01:33:41 AM
Quote from: CTG on December 09, 2008, 01:27:28 AM
Few years ago I calculated the length of tiles to be able to tell the length of the lap (middle line).

You mean for the USC stats? I though you just used the time and the average speed data to calculate it...

Not for USC stats because everybody uses a different line. I guess it was calculated for a YouTube video as an introduction part with the car&track data and pics (maybe Szeged track with Countach, since that not available).

Quote from: Chulk on December 09, 2008, 01:41:35 AM
Did you get the same results?

As far as I remember it was something like that, just testing with Knight Rider. ;)

Krys TOFF

Interesting, once again it's a part of stunts mystery that is shown public.

Quote from: DuplodeIt is widely known that Stunts cars cannot go faster than 245mph due to game engine restrictions
Nope : max speed is 255mph, but you need lucky bugs to reach it.

zaqrack


dstien

Quote from: Duplode on December 09, 2008, 01:05:09 AM
  • 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  :)
Aha. When I estimated the tile length to be 50 meters I assumed all the cars had real-life proportions.

Quote from: Duplode on December 09, 2008, 01:05:09 AM
  • 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? :)
Remember that shapes are modelled taller than they actually should be. In stressed's 3d view I multiply every Y value by 0.8. The reason for this--although it makes no sense--is probably that the game runs in 320x200 mode but would stretch to 640x480 on a IBM PC. (640 / 480) / (320 / 200) ~= 0.83. I don't think DOSBox stretches the image...

BonzaiJoe

Quote from: Krys TOFF on December 09, 2008, 08:59:50 AM
Interesting, once again it's a part of stunts mystery that is shown public.

Quote from: DuplodeIt is widely known that Stunts cars cannot go faster than 245mph due to game engine restrictions
Nope : max speed is 255mph, but you need lucky bugs to reach it.

I'm not sure the car actually goes that fast, it just says so in the evaluation...

I've had it say something like 340mph once, and believe me I wasn't going that fast :)

Really nice facts, Duplode!
But we can't be quite sure.


Chulk

Quote from: BonzaiJoe on December 09, 2008, 12:53:56 PM
Quote from: Krys TOFF on December 09, 2008, 08:59:50 AM
Interesting, once again it's a part of stunts mystery that is shown public.

Quote from: DuplodeIt is widely known that Stunts cars cannot go faster than 245mph due to game engine restrictions
Nope : max speed is 255mph, but you need lucky bugs to reach it.

I'm not sure the car actually goes that fast, it just says so in the evaluation...

I've had it say something like 340mph once, and believe me I wasn't going that fast :)
I had a replay around 400 once too, after a crash in PG. I think the car doesn't go that fast, just the evaluation page gets confused.
Yes, it is me. No, I'm not back at racing (for now...)

Duplode

#10
Quote from: Chulk on December 10, 2008, 01:02:17 AM
Quote from: BonzaiJoe on December 09, 2008, 12:53:56 PM
Quote from: Krys TOFF on December 09, 2008, 08:59:50 AM
Nope : max speed is 255mph, but you need lucky bugs to reach it.

I'm not sure the car actually goes that fast, it just says so in the evaluation...

I've had it say something like 340mph once, and believe me I wasn't going that fast :)
I had a replay around 400 once too, after a crash in PG. I think the car doesn't go that fast, just the evaluation page gets confused.

I think so as well - 245mph is the limit for sustainable speed - but still it is something to wonder about how the game can possibly get confused with speed readings. Maybe on some  extreme crashes the forces acting on the car are intense enough that the 245mph cap actually gets broken, if only just for a frame...

BTW, just an useful observation on tile lengths. As mentioned, a tile is 205ft long. While giving the value in feet makes sense from a stressed user perspective, track designers may find another approximation more relevant: 205ft = 62.484m. Considering 62.5 = 1000/16, we can say that for all practical purposes 16 tiles = 1 kilometer...

Krys TOFF

Quote from: DuplodeBTW, just an useful observation on tile lengths. As mentioned, a tile is 205ft long. While giving the value in feet makes sense from a stressed user perspective, track designers may find another approximation more relevant: 205ft = 62.484m. Considering 62.5 = 1000/16, we can say that for all practical purposes 16 tiles = 1 kilometer...
Much more practical indeed, km means much more to me than feet. ;)

CTG

Quote from: Krys TOFF on December 10, 2008, 09:47:01 AM
Quote from: DuplodeBTW, just an useful observation on tile lengths. As mentioned, a tile is 205ft long. While giving the value in feet makes sense from a stressed user perspective, track designers may find another approximation more relevant: 205ft = 62.484m. Considering 62.5 = 1000/16, we can say that for all practical purposes 16 tiles = 1 kilometer...
Much more practical indeed, km means much more to me than feet. ;)

The only thing I liked better in FM Towers version of Stunts (watching at YouTube): speedometer with kmh units. So the top speed of Indy is 394 kmh - a lot more than F1 cars in 1990-91.

Krys TOFF

FM Towns, not FM Towers. :D ;D
But there's no PG in FM Towns version...

CTG