News:

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

Main Menu

The 'canned' spin out physics

Started by Niels007007, November 17, 2023, 12:12:37 PM

Previous topic - Next topic

Niels007007

Hello,

I have no idea how deep people have gotten into figuring out how the game physics work, but the 'fake spin out' physics have always bothered me. Sure they are part of what makes Stunts, but you overdo it one bit, and without warning you loose all grip and find yourself off the track. Maybe with the LM002 you can stop it if you countersteer the first frame you feel the slide starting, but mostly you're a passenger.

Have the physics and maybe the spin out logic been found / analyzed at all?

Cas

Hi, Niels!  Welcome to the forum!

The physics engine hasn't been analysed... at all, I would say. But the game behaviour has been observed carefully and the structure of game files does show signs that lead us in the direction of what information the engine handles, so we do have a vague idea of how it works. And of course, some pipsqueaks are very skilled and know how to exploit these bugs, so they know them well to some extent.

Graphics and other aspects are a lot better understood than physics
Earth is my country. Science is my religion.

Niels007007

Hey Cas,

Of course it is an ancient game, and compared to say, Test Drive 3, it has constant timing and pretty good car handling relatively.

I was a physics developer for a racing sim, and ironically for a long time, games were much too hard to control once the car started sliding.

Of course again, STUNTS is not a 'sim' and in 1992 I didn't know any better. The understeer in the game is not bad, there is a limit too how sharp you can turn, and if you turn more, the tires make more noise and it takes more time for the car to go straight again, so you are rewarded if you minimize the understeer.

The oversteer seems very very fake, just suddenly 'if speed > x and steering >y then grip = 0.5 while following some partially predefined path..

I thought maybe there is a 'grip' value found in deconstructing the game, and maybe you see it change when the 'canned oversteer' comes in.. So maybe you can overwrite it with something else.. I'm no programmer so what do I know..

At the other end, why would you 'mess'  with a 30 year old game.. Maybe my desire to just have a bit more feel of the 'limit' by adjusting this fake oversteer is silly, I can go back to my modern sim and tweak its physics..

KyLiE

Welcome @Niels007007!  The physics parameters for the individual cars have been well documented.  Unfortunately though, information on how the physics engine works is rather thin on the ground.  It's mainly limited to identifying behaviour rather than explaining how it actually works.  Your idea of identifying the grip value for spinning out is interesting and may well be entirely possible for someone with the right skills and enough time on their hands. :)

Daniel3D

It is possible but very difficult to analyse the physics engine.
The game has been disassembled into assembly code and that is "readable".
I've spent hours reading this. (I'm not a programmer so my understanding is rudimentary) what I understand is that most of the physics are simplified.
Grip is as far as is understand either there, or gone when speed/turning values exceed the grip value.
The LM002 has different grip modifiers so it has more grip on grass and therefore recovers quicker.
Other cars that when the loose grip on the road slide especially on grass.
There is no drifting in stunts  8)
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Niels007007

Do the fast drivers 'feel' the limit? I mean when I attack my 20 minute rally stages, it is all about how fast I dare to go. Slightly too fast, or with too much steering, and I spin. This is made even more difficult by having to 'tap'  the steering, so maybe you hold down the steering a bit too long and you cross the threshold of the 'spin out' routine..

It would be amazing if instead of just sliding off, you could correct it and loose some speed and time, which would be more in line with reality as well..

I'm still having more fun with Stunts than I would have with WRC 23 however I bet.. :D

Cas

Like the guys said, we're pretty aware about what the car parameters intend to represent, but we haven't really read and analised the engine code (of the physics part). The work necessary seems so huge that it becomes discouraging. For this reason, and because the engine has limitations and we would have to create mods freely... and also because we'd like a native binary for modern OSs, I've been doing some work with the purpose of developing a new engine that would read the original data files and imitate Stunts while allowing for modding comfortably.

All the menus, track editor, etc., are relatively easy things to redo, so the difficulty lies in graphics rendering and physics. I've been able to create a graphics engine that recreates Stunts decently and allows for some more features, but I'm stuck with the physics part mainly because of collision. So if you know where to learn about 3D collision in a simple way, something that can help for a game like Stunts, I'd like to know about that.

Of course, creating a new physics engine from scratch would mean it wouldn't be compatible with original replays, that is, playing a Stunts replay on the new engine would produce a different path and vice-versa, but this isn't serious if we consider that replays across different versions of Stunts itself aren't compatible either. We still consider all those to be Stunts. So as long as the new engine feels like Stunts, it should be OK.
Earth is my country. Science is my religion.

KyLiE

Quote from: Niels007007 on November 18, 2023, 03:51:45 PMDo the fast drivers 'feel' the limit?

The limit is usually gauged by the skidding sound.  However, when using Ad Lib or Sound Blaster as the sound device, this is non-existent on dirt, ice and grass.  For this reason, if I'm racing on a track with a lot of dirt or ice, I'll use the Roland MT-32 for sound.

It is possible to correct a slide, but it's quite difficult without replay handling.  I wouldn't consider it realistic either.

Niels007007

Roland has skid sounds on dirt! I had no idea.. Will try that.

I found with the Countach I did 'save' a few slides on dirt. Very hard though.

Daniel3D

#9
Quote from: Niels007007 on November 19, 2023, 02:20:53 PMRoland has skid sounds on dirt! I had no idea.. Will try that.

I found with the Countach I did 'save' a few slides on dirt. Very hard though.
There is also a "fixed" vce file for soundblaster that adds the skidding sounds to grass. Since it was just a missing line in the file. It's not the original sound but a adapted base skidding sound. (Attached below)

(topic link Here)
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

Quote from: Niels007007 on November 17, 2023, 08:11:40 PMAt the other end, why would you 'mess'  with a 30 year old game.. Maybe my desire to just have a bit more feel of the 'limit' by adjusting this fake oversteer is silly, I can go back to my modern sim and tweak its physics..
Well understanding the mechanisms can help. But changing it is not a light matter.
For instance, there is a slight difference between left steering and right steering (referred to as the 'left corner bias") fixing this (or any physics) will make all past replays unplayable.

I did a tweak on purpose for a version that doesn't allow 'continue driving ' from the replay menu to differentiate the replay files. But that is about the extent.

Another available adaptation that makes it possible to design cars with different colours for the speedometer and tachometer needle is made so it's fully reverse compatible.

In the process of re-engineering and hopefully upgrading the game a bit. The spin out physics could be 'fixed' and Connected to a switch.
So that the legacy gameplay stays available. But we're not there yet.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)