News:

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

Main Menu

Wiki Catalogue Of Composite Track Elements

Started by mrdries, March 21, 2024, 04:35:49 PM

Previous topic - Next topic

mrdries

This one works too. It's the same hill. But now with a helix instead of a bridge corner.

That's the weird thing about Stunts. It doesn't allow you to mess up the hills. But Stunts messes up the hills itself.  :)

You cannot view this attachment.

You cannot view this attachment.

mrdries

Is it actually possible, as an experiment, to move the terrain elements to another menu?

I mean, what if Stunts was modified, so that the terrain elements would be in, let's say, the F10 menu, then you could mess with the hills. Cause they'd be no longer a terrain element. Though I suppose you would no longer be able to put a road on a hill, since they'd be no longer a terrain element.

But what if you would do the opposite? What if you'd move track elements to the terrain menu, would they act as if they were a terrain element? Since then, you could put a "terrain element" which was a track element before, like a road, and put something on top of it. As you would do with a terrain element.

Cas

Uhm... there are many ways in which we can imagine this, how real it could be. First, let's get to the most achievable. Say we modify existing track element graphics to incorporate terrain elements instead. The physics would remain those of the original elements we've removed, but otherwise, they'd be visible just like terrain elements. You would be able to combine them with other terrain elements, such as placing a hill on top of a hill or on top of water. Even water on top of a hill. Of course, this would be entirely visual. One step beyond, we can imagine extending the list instead of replacing elements if we can find where this is hard-coded. This would require us to specify which physics model will be assigned. We'd have to copy that of one of the existing track elements.

Doing it the other way would be analogous. If replacing an existing, say, hillside terrain element, on placing a road on whatever track element we had placed there, Stunts would try to combine them and would render the road-on-a-slope sprite instead. There's a translation function somewhere in the code that tells you what you obtain when you place something on a hillside.

If we could actually get to modify the physics model of track/terrain elements, then it's not clear what would happen with combined track+terrain elements. My guess is that track elements on top of hills would act the same as on the ground, just higher, but combined elements on hillside blocks would try to find the corresponding translation. If the combination is not specified, you'd get an empty block that would have the physics of.... I don't know. I think probably the physics of the track element when placed on the ground.
Earth is my country. Science is my religion.

mrdries

#78
Quote from: Cas on August 20, 2024, 03:45:09 PMUhm... there are many ways in which we can imagine this, how real it could be. First, let's get to the most achievable. Say we modify existing track element graphics to incorporate terrain elements instead. The physics would remain those of the original elements we've removed, but otherwise, they'd be visible just like terrain elements. You would be able to combine them with other terrain elements, such as placing a hill on top of a hill or on top of water. Even water on top of a hill. Of course, this would be entirely visual. One step beyond, we can imagine extending the list instead of replacing elements if we can find where this is hard-coded. This would require us to specify which physics model will be assigned. We'd have to copy that of one of the existing track elements.

Doing it the other way would be analogous. If replacing an existing, say, hillside terrain element, on placing a road on whatever track element we had placed there, Stunts would try to combine them and would render the road-on-a-slope sprite instead. There's a translation function somewhere in the code that tells you what you obtain when you place something on a hillside.

If we could actually get to modify the physics model of track/terrain elements, then it's not clear what would happen with combined track+terrain elements. My guess is that track elements on top of hills would act the same as on the ground, just higher, but combined elements on hillside blocks would try to find the corresponding translation. If the combination is not specified, you'd get an empty block that would have the physics of.... I don't know. I think probably the physics of the track element when placed on the ground.

I suppose there's nothing specific about a terrain element. Somewhere in the code, it must have been specified that a hill would let a track element on that hill, be placed higher.

Perhaps, it if it would be possible to give the "hill terrain element" the physics of the bridge track element, then Stunts might let you put a bridge on a "bridge". Or roadblocks on a bridge. Tunnel on a bridge. Just like you can put a bridge or a tunnel on a hill. And sometimes the tunnel would be perpendicular to the tunnel on it. But you'd no longer have a "normal hill"

Or just the same, if the "id" or "object" of the hill, whatever the terminology is, would be switched with the "id" of the bridge, same thing might happen.

Same thing goes for the "valley" instead of the hill. I mean, the basic dark green terrain tile. Switch the physics of that terrain tile, or switch the "id", and you could have the same things. Same for the water tiles. And there are quite a few of them.

I'm sure these things are hard to do. But thanks for the reply.

mrdries

#79
Then again, a bridge on a "bridge" wouldn't work. Since Stunts determines the height of the graphics, I think, by the upper left corner of track element on it. That was Krys TOFF's trick. That's why the bridge graphics appeared lower than the physical bridge, creating an invisible bridge.

Though the physics of an icy crossroad, for one of the water terrain elements, you know, those filled with half water and half land, could give you road blocks on ice, corkscrew partially on ice, Tunnel on ice. With the crossroads, vertical and horizontal are covered. So if you'd put a tunnel, vertical or horizontal, on a terrain element with the physics of an icy crossroad, the surface of the tunnel would always be slippery. Although... the road surface of the tunnel might overwrite the terrain element's surface. So I guess that wouldn't work either.

However... road blocks may work. The physics of road blocks as a terrain element. And they may perhaps be placed horizontally and vertically. Then you'd have road blocks in a tunnel, pipe and such..

Although... the physics of a water terrain element, as scenery, would let you put water on a hill. That's true. Though I'm not sure you'd still drown in that water.

Cas

In theory, every one of these things can be done with enough modifications to the source code. The thing is there's a point at which it becomes easier to just rewrite the physics engine altogether. Now, if we're talking about things that can be done by only modifying data files, the graphics of terrain and track elements can be changed, although some elements combine more than one shape and that has to be taken into account. Which ones do and how many shapes is something that's hard coded and requires source code modification to change.

Changing the physics of track and terrain elements, in principle, appears to inevitably require source code modifications, although there is a plane/wall model that's represented in data files, yet seems to link directly to data that's on the executable itself.

The physics engine is the most complex and difficult to analyse part of the whole code in Stunts. Trying to obtain a different behaviour in any way other than just rewriting the whole thing means effort and very often, the acceptance of significant limitations. I should be a hacker and we should've got this solved back around 2005. Now we're all old guys, ha, ha... but we still dream  8)
Earth is my country. Science is my religion.

mrdries

No worries. At least you have a good time racing. I had a good time messing with tracks and track elements. Didn't know it was that hard to get it done.

Here's a last trick. It deflects the car as you drive over it. Since there's kind of a hole in the road...

May work with a corner too...

You cannot view this attachment.

You cannot view this attachment.

mrdries

Pits and bumps work. Especially when you hit the hill or pit diagonally. If you try it with a corkscrew or a loop, there's weird behavior. You could crash or make it to the other side.

Here, it is shown with a spin. I'm flying through the air because of the bump. I think you could do a huge jump if you do it at high speed.

You cannot view this attachment.

You cannot view this attachment.

You cannot view this attachment.

mrdries

Yeah... all works...

I didn't know.

You cannot view this attachment.

You cannot view this attachment.

alanrotoi


mrdries

Quote from: alanrotoi on August 24, 2024, 07:34:12 PMDoes it make you crash against the roof?

No, you see part of the hill in the tunnel. You drive up, straight through the roof along the hill. And you can land on the roof of the tunnel a bit further.

alanrotoi


mrdries

Yeah, this is surprisingly neat.

You can go up a hill and down a hill with about any track element.

You cannot view this attachment.

You cannot view this attachment.

dreadnaut

This corner-hill to tunnel can be fun, if your car has enough grip

You cannot view this attachment.

mrdries

Quote from: dreadnaut on August 25, 2024, 02:34:08 PMThis corner-hill to tunnel can be fun, if your car has enough grip

You cannot view this attachment.

That's fun to drive.

Weird thing is though, at first the track didnt' work.
I then loaded the track through Bliss, saved it again, (named it d2), and then it did work.